Exemplo n.º 1
0
        else
        {
            print '<tr><td><span span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'><input type="text" size="30" maxlength="60" name="nom" value="'.$object->name.'"></td>';
            if (! empty($conf->global->SOCIETE_USEPREFIX))  // Old not used prefix field
            {
                print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'"></td>';
            }
            print '</tr>';
        }
        // If javascript on, we show option individual
        if ($conf->use_javascript_ajax)
        {
            print '<tr class="individualline"><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$object->firstname.'"></td>';
            print '<td colspan=2>&nbsp;</td></tr>';
            print '<tr class="individualline"><td>'.$langs->trans("UserTitle").'</td><td>';
            print $formcompany->select_civility($object->civility_id).'</td>';
            print '<td colspan=2>&nbsp;</td></tr>';
        }

        // Prospect/Customer
        print '<tr><td width="25%"><span class="fieldrequired">'.$langs->trans('ProspectCustomer').'</span></td><td width="25%"><select class="flat" name="client">';
        $selected=isset($_POST['client'])?GETPOST('client'):$object->client;
        if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($selected==2?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
        if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($selected==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
        print '<option value="1"'.($selected==1?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
        print '<option value="0"'.($selected==0?' selected="selected"':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
        print '</select></td>';

        print '<td width="25%">'.$langs->trans('CustomerCode').'</td><td width="25%">';
        print '<table class="nobordernopadding"><tr><td>';
        $tmpcode=$object->code_client;
Exemplo n.º 2
0
     if ($socid > 0) {
         print '<tr><td><label for="socid">' . $langs->trans("ThirdParty") . '</label></td>';
         print '<td colspan="3" class="maxwidthonsmartphone">';
         print $objsoc->getNomUrl(1);
         print '</td>';
         print '<input type="hidden" name="socid" id="socid" value="' . $objsoc->id . '">';
         print '</td></tr>';
     } else {
         print '<tr><td><label for="socid">' . $langs->trans("ThirdParty") . '</label></td><td colspan="3" class="maxwidthonsmartphone">';
         print $form->select_company($socid, 'socid', '', 1);
         print '</td></tr>';
     }
 }
 // Civility
 print '<tr><td width="15%"><label for="civility_id">' . $langs->trans("UserTitle") . '</label></td><td colspan="3">';
 print $formcompany->select_civility(GETPOST("civility_id", 'alpha') ? GETPOST("civility_id", 'alpha') : $object->civility_id);
 print '</td></tr>';
 print '<tr><td><label for="title">' . $langs->trans("PostOrFunction") . '</label></td>';
 print '<td colspan="3"><input name="poste" id="title" type="text" size="50" maxlength="80" value="' . dol_escape_htmltag(GETPOST("poste", 'alpha') ? GETPOST("poste", 'alpha') : $object->poste) . '"></td>';
 $colspan = 3;
 if ($conf->use_javascript_ajax && $socid > 0) {
     $colspan = 2;
 }
 // Address
 if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) {
     $object->address = $objsoc->address;
 }
 // Predefined with third party
 print '<tr><td><label for="address">' . $langs->trans("Address") . '</label></td>';
 print '<td colspan="' . $colspan . '"><textarea class="flat" name="address" id="address" cols="70">' . (GETPOST("address", 'alpha') ? GETPOST("address", 'alpha') : $object->address) . '</textarea></td>';
 if ($conf->use_javascript_ajax && $socid > 0) {
Exemplo n.º 3
0
    print '<input type="hidden" id="type" name="type" value="' . $conf->global->MEMBER_NEWFORM_FORCETYPE . '">';
}
// Moral/Physic attribute
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) {
    print '<tr class="morphy"><td>' . $langs->trans('Nature') . ' <FONT COLOR="red">*</FONT></td><td>' . "\n";
    print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
    print '</td></tr>' . "\n";
} else {
    print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY];
    print '<input type="hidden" id="morphy" name="morphy" value="' . $conf->global->MEMBER_NEWFORM_FORCEMORPHY . '">';
}
// Civility
print '<tr><td>' . $langs->trans('UserTitle') . '</td><td>';
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id') . '</td></tr>' . "\n";
// Lastname
print '<tr><td>' . $langs->trans("Lastname") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="lastname" size="40" value="' . dol_escape_htmltag(GETPOST('lastname')) . '"></td></tr>' . "\n";
// Firstname
print '<tr><td>' . $langs->trans("Firstname") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="firstname" size="40" value="' . dol_escape_htmltag(GETPOST('firstname')) . '"></td></tr>' . "\n";
// Company
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company") . '</td><td><input type="text" name="societe" size="40" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n";
// Address
print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n";
print '<textarea name="address" id="address" wrap="soft" cols="40" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('address')) . '</textarea></td></tr>' . "\n";
// Zip / Town
print '<tr><td>' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td>';
print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1);
print ' / ';
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1);
print '</td></tr>';
Exemplo n.º 4
0
     print $form->selectarray("typeid", $listetype, GETPOST('typeid', 'int') ? GETPOST('typeid', 'int') : $typeid, count($listetype) > 1 ? 1 : 0);
 } else {
     print '<font class="error">' . $langs->trans("NoTypeDefinedGoToSetup") . '</font>';
 }
 print "</td>\n";
 // Morphy
 $morphys["phy"] = $langs->trans("Physical");
 $morphys["mor"] = $langs->trans("Moral");
 print '<tr><td class="fieldrequired">' . $langs->trans("Nature") . "</td><td>\n";
 print $form->selectarray("morphy", $morphys, GETPOST('morphy', 'alpha') ? GETPOST('morphy', 'alpha') : $object->morphy, 1);
 print "</td>\n";
 // Company
 print '<tr><td id="tdcompany">' . $langs->trans("Company") . '</td><td><input type="text" name="societe" size="40" value="' . (GETPOST('societe', 'alpha') ? GETPOST('societe', 'alpha') : $object->societe) . '"></td></tr>';
 // Civility
 print '<tr><td>' . $langs->trans("UserTitle") . '</td><td>';
 print $formcompany->select_civility(GETPOST('civility_id', 'int') ? GETPOST('civility_id', 'int') : $object->civility_id, 'civility_id') . '</td>';
 print '</tr>';
 // Lastname
 print '<tr><td id="tdlastname">' . $langs->trans("Lastname") . '</td><td><input type="text" name="lastname" value="' . (GETPOST('lastname', 'alpha') ? GETPOST('lastname', 'alpha') : $object->lastname) . '" size="40"></td>';
 print '</tr>';
 // Firstname
 print '<tr><td id="tdfirstname">' . $langs->trans("Firstname") . '</td><td><input type="text" name="firstname" size="40" value="' . (GETPOST('firstname', 'alpha') ? GETPOST('firstname', 'alpha') : $object->firstname) . '"></td>';
 print '</tr>';
 // EMail
 print '<tr><td>' . ($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '') . $langs->trans("EMail") . ($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '') . '</td><td><input type="text" name="member_email" size="40" value="' . (GETPOST('member_email', 'alpha') ? GETPOST('member_email', 'alpha') : $object->email) . '"></td></tr>';
 // Password
 if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
     require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
     $generated_password = getRandomPassword(false);
     print '<tr><td><span class="fieldrequired">' . $langs->trans("Password") . '</span></td><td>';
     print '<input size="30" maxsize="32" type="text" name="password" value="' . $generated_password . '">';