mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
More labels and autofocus for thirdparty and contact forms
This commit is contained in:
parent
1ab938895b
commit
f1853c435b
|
|
@ -439,42 +439,45 @@ else
|
|||
print '<table class="border" width="100%">';
|
||||
|
||||
// Name
|
||||
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%"><input name="lastname" type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname")?GETPOST("lastname"):$object->lastname).'"></td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%"><input name="firstname" type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname")?GETPOST("firstname"):$object->firstname).'"></td></tr>';
|
||||
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
|
||||
print '<td width="30%"><input name="lastname" id="lastname" type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname")?GETPOST("lastname"):$object->lastname).'" autofocus="autofocus"></td>';
|
||||
print '<td width="20%"><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
|
||||
print '<td width="30%"><input name="firstname" id="firstname"type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname")?GETPOST("firstname"):$object->firstname).'"></td></tr>';
|
||||
|
||||
// Company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||
{
|
||||
if ($socid > 0)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Company").'</td>';
|
||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
print $objsoc->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<input type="hidden" name="socid" value="'.$objsoc->id.'">';
|
||||
print '<input type="hidden" name="socid" id="socid" value="'.$objsoc->id.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else {
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||
print $form->select_company($socid,'socid','',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// Civility
|
||||
print '<tr><td width="15%">'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
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>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.dol_escape_htmltag(GETPOST("poste",'alpha')?GETPOST("poste",'alpha'):$object->poste).'"></td>';
|
||||
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>'.$langs->trans("Address");
|
||||
print '</td><td colspan="'.$colspan.'"><textarea class="flat" name="address" cols="70">'.(GETPOST("address",'alpha')?GETPOST("address",'alpha'):$object->address).'</textarea></td>';
|
||||
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)
|
||||
{
|
||||
|
|
@ -490,13 +493,13 @@ else
|
|||
// Zip / Town
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="zipcode">'.$langs->trans("Zip").'</label> / <label for="town">'.$langs->trans("Town").'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
print $formcompany->select_ziptown((GETPOST("zipcode")?GETPOST("zipcode"):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' ';
|
||||
print $formcompany->select_ziptown((GETPOST("town")?GETPOST("town"):$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
print $form->select_country((GETPOST("country_id",'alpha')?GETPOST("country_id",'alpha'):$object->country_id),'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
|
@ -504,7 +507,7 @@ else
|
|||
// State
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
if ($object->country_id)
|
||||
{
|
||||
print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_id');
|
||||
|
|
@ -518,19 +521,25 @@ else
|
|||
|
||||
// Phone / Fax
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input name="phone_pro" id="phone_pro" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_pro")?GETPOST("phone_pro"):$object->phone_pro).'"></td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td><input name="phone_perso" id="phone_perso" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_perso")?GETPOST("phone_perso"):$object->phone_perso).'"></td></tr>';
|
||||
print '<tr><td><label for="phone_pro">'.$langs->trans("PhonePro").'</label></td>';
|
||||
print '<td><input name="phone_pro" id="phone_pro" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_pro")?GETPOST("phone_pro"):$object->phone_pro).'"></td>';
|
||||
print '<td><label for="phone_perso">'.$langs->trans("PhonePerso").'</label></td>';
|
||||
print '<td><input name="phone_perso" id="phone_perso" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_perso")?GETPOST("phone_perso"):$object->phone_perso).'"></td></tr>';
|
||||
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input name="phone_mobile" id="phone_mobile" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_mobile")?GETPOST("phone_mobile"):$object->phone_mobile).'"></td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" id="fax" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("fax",'alpha')?GETPOST("fax",'alpha'):$object->fax).'"></td></tr>';
|
||||
print '<tr><td><label for="phone_mobile">'.$langs->trans("PhoneMobile").'</label></td>';
|
||||
print '<td><input name="phone_mobile" id="phone_mobile" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("phone_mobile")?GETPOST("phone_mobile"):$object->phone_mobile).'"></td>';
|
||||
print '<td><label for="fax">'.$langs->trans("Fax").'</label></td>';
|
||||
print '<td><input name="fax" id="fax" type="text" size="18" maxlength="80" value="'.dol_escape_htmltag(GETPOST("fax",'alpha')?GETPOST("fax",'alpha'):$object->fax).'"></td></tr>';
|
||||
|
||||
// EMail
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td><input name="email" id="email" type="text" size="50" maxlength="80" value="'.(GETPOST("email",'alpha')?GETPOST("email",'alpha'):$object->email).'"></td>';
|
||||
print '<tr><td><label for="email">'.$langs->trans("Email").'</label></td>';
|
||||
print '<td><input name="email" id="email" type="text" size="50" maxlength="80" value="'.(GETPOST("email",'alpha')?GETPOST("email",'alpha'):$object->email).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'</td>';
|
||||
print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -539,16 +548,18 @@ else
|
|||
print '</tr>';
|
||||
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(GETPOST("jabberid",'alpha')?GETPOST("jabberid",'alpha'):$object->jabberid).'"></td></tr>';
|
||||
print '<tr><td><label for="jabberid">'.$langs->trans("IM").'</label></td>';
|
||||
print '<td colspan="3"><input name="jabberid" id="jabberid" type="text" size="50" maxlength="80" value="'.(GETPOST("jabberid",'alpha')?GETPOST("jabberid",'alpha'):$object->jabberid).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(GETPOST("skype",'alpha')?GETPOST("skype",'alpha'):$object->skype).'"></td></tr>';
|
||||
print '<tr><td><label for="skype">'.$langs->trans("Skype").'</label></td>';
|
||||
print '<td colspan="3"><input name="skype" id="skype" type="text" size="50" maxlength="80" value="'.(GETPOST("skype",'alpha')?GETPOST("skype",'alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
print '<tr><td><label for="priv">'.$langs->trans("ContactVisibility").'</label></td><td colspan="3">';
|
||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||
print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0);
|
||||
print '</td></tr>';
|
||||
|
|
@ -570,7 +581,7 @@ else
|
|||
print '<table class="border" width="100%">';
|
||||
|
||||
// Date To Birth
|
||||
print '<tr><td width="20%">'.$langs->trans("DateToBirth").'</td><td width="30%">';
|
||||
print '<tr><td width="20%"><label for="birthday">'.$langs->trans("DateToBirth").'</label></td><td width="30%">';
|
||||
$form=new Form($db);
|
||||
if ($object->birthday)
|
||||
{
|
||||
|
|
@ -582,14 +593,14 @@ else
|
|||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="2">'.$langs->trans("Alert").': ';
|
||||
print '<td colspan="2"><label for="birthday_alert">'.$langs->trans("Alert").'</label>: ';
|
||||
if ($object->birthday_alert)
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert" checked></td>';
|
||||
print '<input type="checkbox" name="birthday_alert" id="birthday_aler" checked></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert"></td>';
|
||||
print '<input type="checkbox" name="birthday_alert" id="birthday_alert"></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
|
|
@ -664,13 +675,15 @@ else
|
|||
print '</td></tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%"><input name="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'"></td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%"><input name="firstname" type="text" size="20" maxlength="80" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td></tr>';
|
||||
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
|
||||
print '<td width="30%"><input name="lastname" id="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'" autofocus="autofocus"></td>';
|
||||
print '<td width="20%"><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
|
||||
print '<td width="30%"><input name="firstname" id="firstname" type="text" size="20" maxlength="80" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td></tr>';
|
||||
|
||||
// Company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Company").'</td>';
|
||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1);
|
||||
print '</td>';
|
||||
|
|
@ -678,15 +691,16 @@ else
|
|||
}
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print '<tr><td><label for="civility_id">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
|
||||
print $formcompany->select_civility(isset($_POST["civility_id"])?$_POST["civility_id"]:$object->civility_id);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></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="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td>'.$langs->trans("Address");
|
||||
print '</td><td colspan="2"><textarea class="flat" name="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
||||
print '<tr><td><label for="address">'.$langs->trans("Address").'</label></td>';
|
||||
print '<td colspan="2"><textarea class="flat" name="address" id="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
||||
|
||||
$rowspan=3;
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
||||
|
|
@ -696,13 +710,13 @@ else
|
|||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="zipcode">'.$langs->trans("Zip").'</label> / <label for="town">'.$langs->trans("Town").'</label></td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' ';
|
||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
|
@ -710,20 +724,25 @@ else
|
|||
// State
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="2" class="maxwidthonsmartphone">';
|
||||
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'state_id');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_pro"])?$_POST["phone_pro"]:$object->phone_pro).'"></td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
|
||||
print '<tr><td><label for="phone_pro">'.$langs->trans("PhonePro").'</label></td>';
|
||||
print '<td><input name="phone_pro" id="phone_pro" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_pro"])?$_POST["phone_pro"]:$object->phone_pro).'"></td>';
|
||||
print '<td><label for="phone_perso">'.$langs->trans("PhonePerso").'</label></td>';
|
||||
print '<td><input name="phone_perso" id="phone_perso" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" type="text" size="18" maxlength="80" value="'.(isset($_POST["fax"])?$_POST["fax"]:$object->fax).'"></td></tr>';
|
||||
print '<tr><td><label for="phone_mobile">'.$langs->trans("PhoneMobile").'</label></td>';
|
||||
print '<td><input name="phone_mobile" id="phone_mobile" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td>';
|
||||
print '<td><label for="fax">'.$langs->trans("Fax").'</label></td>';
|
||||
print '<td><input name="fax" id="fax" type="text" size="18" maxlength="80" value="'.(isset($_POST["fax"])?$_POST["fax"]:$object->fax).'"></td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td><input name="email" type="text" size="40" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td>';
|
||||
print '<tr><td><label for="email">'.$langs->trans("EMail").'</label></td>';
|
||||
print '<td><input name="email" id="email" type="text" size="40" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
|
@ -737,10 +756,12 @@ else
|
|||
print '</tr>';
|
||||
|
||||
// Jabberid
|
||||
print '<tr><td>'.$langs->trans("Jabberid").'</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
print '<tr><td><label for="jabberid">'.$langs->trans("Jabberid").'</label></td>';
|
||||
print '<td><input name="jabberid" id="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -751,23 +772,24 @@ else
|
|||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
print '<tr><td><label for="skype">'.$langs->trans("Skype").'</label></td>';
|
||||
print '<td><input name="skype" id="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
print '<tr><td><label for="priv">'.$langs->trans("ContactVisibility").'</label></td><td colspan="3">';
|
||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||
print $form->selectarray('priv',$selectarray,$object->priv,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Public
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td><td colspan="3">';
|
||||
print '<tr><td valign="top"><label for="note_public">'.$langs->trans("NotePublic").'</label></td><td colspan="3">';
|
||||
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Private
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td><td colspan="3">';
|
||||
print '<tr><td valign="top"><label for="note_private">'.$langs->trans("NotePrivate").'</label></td><td colspan="3">';
|
||||
$doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ class FormCompany
|
|||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$out.= '<select class="flat" name="'.$htmlname.'">';
|
||||
$out.= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||
$out.= '<option value=""> </option>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
|
@ -772,7 +772,7 @@ class FormCompany
|
|||
$maxlength=$formlength;
|
||||
if (empty($formlength)) { $formlength=24; $maxlength=128; }
|
||||
|
||||
$out = '<input type="text" name="'.$htmlname.'" size="'.($formlength+1).'" maxlength="'.$maxlength.'" value="'.$selected.'">';
|
||||
$out = '<input type="text" name="'.$htmlname.'" id="'.$htmlname.'" size="'.($formlength+1).'" maxlength="'.$maxlength.'" value="'.$selected.'">';
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -805,14 +805,14 @@ else
|
|||
print '<tr><td>';
|
||||
if ($object->particulier || $private)
|
||||
{
|
||||
print '<label for="name"><span id="TypeName" class="fieldrequired">'.$langs->trans('LastName').'</span></label>';
|
||||
print '<span id="TypeName" class="fieldrequired"><label for="name">'.$langs->trans('LastName').'</label></span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<label for="name"><span span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></label>';
|
||||
print '<span span id="TypeName" class="fieldrequired"><label for="name">'.$langs->trans('ThirdPartyName').'</label></span>';
|
||||
}
|
||||
print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
||||
print '<input type="text" size="30" maxlength="60" name="nom" id="nom" value="'.$object->name.'" autofocus="autofocus"></td>';
|
||||
print '<input type="text" size="30" maxlength="60" name="nom" id="name" value="'.$object->name.'" autofocus="autofocus"></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>';
|
||||
|
|
@ -831,7 +831,8 @@ else
|
|||
}
|
||||
|
||||
// Prospect/Customer
|
||||
print '<tr><td width="25%"><span class="fieldrequired">'.$langs->trans('ProspectCustomer').'</span></td><td width="25%" class="maxwidthonsmartphone"><select class="flat" name="client">';
|
||||
print '<tr><td width="25%"><span class="fieldrequired"><label for="customerprospect">'.$langs->trans('ProspectCustomer').'</label></span></td>';
|
||||
print '<td width="25%" class="maxwidthonsmartphone"><select class="flat" name="client" id="customerprospect">';
|
||||
$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) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($selected==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
|
||||
|
|
@ -854,7 +855,7 @@ else
|
|||
{
|
||||
// Supplier
|
||||
print '<tr>';
|
||||
print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>';
|
||||
print '<td><span class="fieldrequired"><label for="fournisseur">'.$langs->trans('Supplier').'</label></span></td><td>';
|
||||
print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1);
|
||||
print '</td>';
|
||||
print '<td><label for="supplier_code">'.$langs->trans('SupplierCode').'</label></td><td>';
|
||||
|
|
@ -870,7 +871,7 @@ else
|
|||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">';
|
||||
print '<tr><td><label for="status">'.$langs->trans('Status').'</label></td><td colspan="3">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -883,7 +884,8 @@ else
|
|||
}
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
|
||||
print '<tr><td valign="top"><label for="address">'.$langs->trans('Address').'</label></td>';
|
||||
print '<td colspan="3"><textarea name="address" id="address" cols="40" rows="3" wrap="soft">';
|
||||
print $object->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
|
|
@ -912,7 +914,8 @@ else
|
|||
// Email web
|
||||
print '<tr><td><label for="email">'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="email" id="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
print '<tr><td><label for="url">'.$langs->trans('Web').'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="url" id="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
|
|
@ -934,16 +937,17 @@ else
|
|||
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
$key='idprof'.$i;
|
||||
|
||||
if (($j % 2) == 0) print '<tr>';
|
||||
|
||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||
if(empty($conf->global->$idprof_mandatory))
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
print '<td><label for="'.$key.'">'.$idprof.'</label></td><td>';
|
||||
else
|
||||
print '<td><span class="fieldrequired">'.$idprof.'</td><td>';
|
||||
print '<td><span class="fieldrequired"><label for="'.$key.'">'.$idprof.'</label></td><td>';
|
||||
|
||||
$key='idprof'.$i;
|
||||
print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code);
|
||||
print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code);
|
||||
print '</td>';
|
||||
if (($j % 2) == 1) print '</tr>';
|
||||
$j++;
|
||||
|
|
@ -953,7 +957,7 @@ else
|
|||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||
|
||||
// Assujeti TVA
|
||||
print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
|
||||
print '<tr><td><label for="assujtva_value">'.$langs->trans('VATIsUsed').'</label></td>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
|
||||
print '</td>';
|
||||
|
|
@ -987,11 +991,11 @@ else
|
|||
print '</tr>';
|
||||
|
||||
// Type - Size
|
||||
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'."\n";
|
||||
print '<tr><td><label for="typent_id">'.$langs->trans("ThirdPartyType").'</label></td><td>'."\n";
|
||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Staff").'</td><td>';
|
||||
print '<td><label for="effectif_id">'.$langs->trans("Staff").'</label></td><td>';
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
|
@ -1268,7 +1272,7 @@ else
|
|||
|
||||
// Name
|
||||
print '<tr><td><label for="name"><span class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></label></td>';
|
||||
print '<td colspan="3"><input type="text" size="40" maxlength="60" name="nom" id="name" value="'.dol_escape_htmltag($object->name).'"></td></tr>';
|
||||
print '<td colspan="3"><input type="text" size="40" maxlength="60" name="nom" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>';
|
||||
|
||||
// Prefix
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
|
|
@ -1288,7 +1292,8 @@ else
|
|||
}
|
||||
|
||||
// Prospect/Customer
|
||||
print '<tr><td width="25%"><span class="fieldrequired">'.$langs->trans('ProspectCustomer').'</span></td><td width="25%"><select class="flat" name="client">';
|
||||
print '<tr><td width="25%"><span class="fieldrequired"><label for="customerprospect">'.$langs->trans('ProspectCustomer').'</label></span></td>';
|
||||
print '<td width="25%"><select class="flat" name="client" id="customerprospect">';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($object->client==2?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($object->client==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($object->client==1?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
|
||||
|
|
@ -1323,7 +1328,7 @@ else
|
|||
if (! empty($conf->fournisseur->enabled) && ! empty($user->rights->fournisseur->lire))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>';
|
||||
print '<td><span class="fieldrequired"><label for="fournisseur">'.$langs->trans('Supplier').'</label></span></td><td>';
|
||||
print $form->selectyesno("fournisseur",$object->fournisseur,1);
|
||||
print '</td>';
|
||||
print '<td><label for="supplier_code">'.$langs->trans('SupplierCode').'</label></td><td>';
|
||||
|
|
@ -1361,12 +1366,13 @@ else
|
|||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print '<tr><td><label for="status">'.$langs->trans("Status").'</label></td><td colspan="3">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status);
|
||||
print '</td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
|
||||
print '<tr><td valign="top"><label for="address">'.$langs->trans('Address').'</label></td>';
|
||||
print '<td colspan="3"><textarea name="address" id="address" cols="40" rows="3" wrap="soft">';
|
||||
print $object->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
|
|
@ -1417,16 +1423,17 @@ else
|
|||
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
if (($j % 2) == 0) print '<tr>';
|
||||
$key='idprof'.$i;
|
||||
|
||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||
if(empty($conf->global->$idprof_mandatory))
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
else
|
||||
print '<td><span class="fieldrequired">'.$idprof.'</td><td>';
|
||||
if (($j % 2) == 0) print '<tr>';
|
||||
|
||||
$key='idprof'.$i;
|
||||
print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code);
|
||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||
if(empty($conf->global->$idprof_mandatory))
|
||||
print '<td><label for="'.$key.'">'.$idprof.'</label></td><td>';
|
||||
else
|
||||
print '<td><span class="fieldrequired"><label for="'.$key.'">'.$idprof.'</label></td><td>';
|
||||
|
||||
print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code);
|
||||
print '</td>';
|
||||
if (($j % 2) == 1) print '</tr>';
|
||||
$j++;
|
||||
|
|
@ -1436,7 +1443,7 @@ else
|
|||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||
|
||||
// VAT payers
|
||||
print '<tr><td>'.$langs->trans('VATIsUsed').'</td><td>';
|
||||
print '<tr><td><label for="assjtva_value">'.$langs->trans('VATIsUsed').'</label></td><td>';
|
||||
print $form->selectyesno('assujtva_value',$object->tva_assuj,1);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -1474,7 +1481,7 @@ else
|
|||
//TODO: Place into a function to control showing by country or study better option
|
||||
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
|
||||
print '<tr><td><label for="localtax1assuj_value">'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</label></td><td>';
|
||||
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
||||
if(! isOnlyOneLocalTax(1))
|
||||
{
|
||||
|
|
@ -1483,7 +1490,7 @@ else
|
|||
print '</span>';
|
||||
}
|
||||
|
||||
print '</td><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
|
||||
print '</td><td><label for="localtax2assuj_value">'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</label></td><td>';
|
||||
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
||||
if (! isOnlyOneLocalTax(2))
|
||||
{
|
||||
|
|
@ -1496,7 +1503,7 @@ else
|
|||
}
|
||||
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td colspan="3">';
|
||||
print '<tr><td><label for="localtax1assuj_value">'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</label></td><td colspan="3">';
|
||||
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
||||
if(! isOnlyOneLocalTax(1))
|
||||
{
|
||||
|
|
@ -1509,7 +1516,7 @@ else
|
|||
}
|
||||
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
|
||||
print '<tr><td><label for="localtax2assuj_value">'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</label></td><td colspan="3">';
|
||||
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
||||
if(! isOnlyOneLocalTax(2))
|
||||
{
|
||||
|
|
@ -1521,11 +1528,11 @@ else
|
|||
}
|
||||
|
||||
// Type - Size
|
||||
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
|
||||
print '<tr><td><label for="typent_id">'.$langs->trans("ThirdPartyType").'</label></td><td>';
|
||||
print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Staff").'</td><td>';
|
||||
print '<td><label for="effectif_id">'.$langs->trans("Staff").'</label></td><td>';
|
||||
print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user