From 78ce6c0b1cf25fe75f8920e951dbe56d79960eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 19:57:51 +0200 Subject: [PATCH] Added labels on form elements for company creation --- htdocs/core/class/html.formcompany.class.php | 2 +- htdocs/societe/soc.php | 137 +++++++++++-------- 2 files changed, 82 insertions(+), 57 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 7728080c01b..6f868dd81c8 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -453,7 +453,7 @@ class FormCompany if ($resql) { $out.= '
'; - $out.= ''; if ($country_codeid) $out.= ''; $num = $this->db->num_rows($resql); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index a0eec6ffbc8..1308ba24f52 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -772,11 +772,15 @@ else print '
'; print $langs->trans("ThirdPartyType").':     '; print '
'; - print ' '.$langs->trans("Company/Fundation"); + print ''; + print ''; print '     '; - print ' '.$langs->trans("Individual"); + print ''; + print ' '; + print $langs->trans("Individual"); print ' ('.$langs->trans("ToCreateContactWithSameName").')'; print '
'; print "
\n"; @@ -800,7 +804,10 @@ else // Name, firstname if ($object->particulier || $private) { - print ''.$langs->trans('LastName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''.$langs->trans('Prefix').''; @@ -809,8 +816,11 @@ else } else { - print ''.$langs->trans('ThirdPartyName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1 { print ''.$langs->trans('Prefix').''; } @@ -819,9 +829,10 @@ else // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''.$langs->trans('FirstName').''; + print ''; + print ''; print ' '; - print ''.$langs->trans("UserTitle").''; + print ''; print $formcompany->select_civility($object->civility_id).''; print ' '; } @@ -835,11 +846,11 @@ else print ''; print ''; - print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; print ''; $s=$modCodeClient->getToolTip($langs,$object,0); print $form->textwithpicto('',$s,1); @@ -853,11 +864,11 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -883,40 +895,44 @@ else print ''; // Zip / Town - print ''; // Country - print ''; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Email web - print ''; + print ''; + print ''; print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -948,9 +964,9 @@ else print ''; - print ''; + print ''; print ''; // Legal Form - print ''; + print ''; print ''; // Capital - print ''; + print ''; // Local Taxes @@ -1037,7 +1054,7 @@ else */ if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1047,7 +1064,7 @@ else { // Assign a Name print ''; - print ''; + print ''; print ''; @@ -1063,7 +1080,7 @@ else // Ajout du logo print ''; - print ''; + print ''; print ''; @@ -1257,12 +1274,13 @@ else print '
'; $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); print $form->textwithpicto('',$s,1); @@ -873,7 +884,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; - print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); + print '
'; + print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; - if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'state_id'); + print '
'; + if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code); else print $countrynotdefined; print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print ''.$langs->trans('VATIntra').''; - $s = ''; + $s = ''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -988,7 +1004,7 @@ else print '
'.$langs->trans('JuridicalStatus').'
'; if ($object->country_id) { @@ -1001,7 +1017,8 @@ else print '
'.$langs->trans('Capital').' '; + print '
'; print ''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language(($object->default_lang?$object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1); print '
'.$langs->trans("AllocateCommercial").''; $form->select_users((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default print '
'.$langs->trans("Logo").''; print ''; print '
'; // Name - print ''; + print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; } @@ -1283,18 +1301,18 @@ else if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print ''; print ''; print ''; - print '
'.$langs->trans('ThirdPartyName').'
'.$langs->trans("Prefix").''; + print '
'; // It does not change the prefix mode using the auto numbering prefix if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { @@ -1271,7 +1289,7 @@ else } else { - print ''; + print ''; } print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '
'; if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; } else if ($object->codeclient_modifiable()) { - print ''; + print ''; } else { @@ -1315,18 +1333,18 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -1359,14 +1378,14 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -1374,24 +1393,29 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // EMail / Web - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -1424,9 +1448,9 @@ else print ''; // VAT Code - print ''; + print ''; print ''; - print ''; // Capital - print ''; + print ''; + print ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1539,7 +1564,7 @@ else // Logo print ''; - print ''; + print ''; print '
'; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; } else if ($object->codefournisseur_modifiable()) { - print ''; + print ''; } else { @@ -1344,7 +1362,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; + print '
'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,$object->country_code); print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'.$langs->trans('VATIntra').''; - $s =''; + $s =''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -1513,17 +1537,18 @@ else if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('JuridicalStatus').''; + print '
'; print $formcompany->select_juridicalstatus($object->forme_juridique_code,$object->country_code); print '
'.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language($object->default_lang,'default_lang',0,0,1); print '
'.$langs->trans("Logo").''; if ($object->logo) print $form->showphoto('societe',$object,50); $caneditfield=1;