Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-17 12:29:23 +00:00
parent d6085fb68a
commit d23e746609

View File

@ -218,17 +218,17 @@ if (empty($reshook) && $action == 'add') {
$error++; $error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."<br>\n"; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."<br>\n";
} }
if (!GETPOST('firstname')) ä{ if (!GETPOST('firstname')) { ä
$error++; $error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."<br>\n"; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."<br>\n";
} }
if (GETPOST('email') && !isValidEmail(GETPOST('email'))) { if (GETPOST('email') && !isValidEmail(GETPOST('email'))) {
$error++; $error++;
$langs->load("errors"); $langs->load("errors");
$errmsg .= $langs->trans("ErrorBadEMail", GETPOST('email'))."<br>\n"; $errmsg .= $langs->trans("ErrorBadEMail", GETPOST('email'))."<br>\n";
} }
$birthday = dol_mktime(GETPOST("birthhour", 'int'), GETPOST('birthmin', 'int'), GETPOST('birthsec', 'int'), GETPOST('birthmonth', 'int'), GETPOST('birthday', 'int'), GETPOST('birthyear', 'int')); $birthday = dol_mktime(GETPOST("birthhour", 'int'), GETPOST('birthmin', 'int'), GETPOST('birthsec', 'int'), GETPOST('birthmonth', 'int'), GETPOST('birthday', 'int'), GETPOST('birthyear', 'int'));
if GETPOSTISSET('birthmonth') && empty($birthday)) { if GETPOSTISSET('birthmonth') { && empty($birthday))
$error++; $error++;
$langs->load("errors"); $langs->load("errors");
$errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n"; $errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n";
@ -548,7 +548,7 @@ jQuery(document).ready(function () {
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
// Type // Type
if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) {
$listoftype = $adht->liste_array(); $listoftype = $adht->liste_array();
$tmp = array_keys($listoftype); $tmp = array_keys($listoftype);
$defaulttype = ''; $defaulttype = '';
@ -560,21 +560,21 @@ jQuery(document).ready(function () {
print '<tr><td class="titlefield">'.$langs->trans("Type").' <FONT COLOR="red">*</FONT></td><td>'; print '<tr><td class="titlefield">'.$langs->trans("Type").' <FONT COLOR="red">*</FONT></td><td>';
print $form->selectarray("typeid", $adht->liste_array(), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); print $form->selectarray("typeid", $adht->liste_array(), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} else { } else {
$adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE);
print '<input type="hidden" id="typeid" name="typeid" value="'.$conf->global->MEMBER_NEWFORM_FORCETYPE.'">'; print '<input type="hidden" id="typeid" name="typeid" value="'.$conf->global->MEMBER_NEWFORM_FORCETYPE.'">';
} }
// Moral/Physic attribute // Moral/Physic attribute
$morphys["phy"] = $langs->trans("Physical"); $morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral"); $morphys["mor"] = $langs->trans("Moral");
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) {
print '<tr class="morphy"><td class="titlefield">'.$langs->trans('MemberNature').' <FONT COLOR="red">*</FONT></td><td>'."\n"; print '<tr class="morphy"><td class="titlefield">'.$langs->trans('MemberNature').' <FONT COLOR="red">*</FONT></td><td>'."\n";
print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1); print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} else { } else {
print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY];
print '<input type="hidden" id="morphy" name="morphy" value="'.$conf->global->MEMBER_NEWFORM_FORCEMORPHY.'">'; print '<input type="hidden" id="morphy" name="morphy" value="'.$conf->global->MEMBER_NEWFORM_FORCEMORPHY.'">';
} }
// Civility // Civility
print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>'; print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>';
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n"; print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
@ -602,10 +602,10 @@ jQuery(document).ready(function () {
// Country // Country
print '<tr><td>'.$langs->trans('Country').'</td><td>'; print '<tr><td>'.$langs->trans('Country').'</td><td>';
$country_id = GETPOST('country_id'); $country_id = GETPOST('country_id');
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
} }
if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
$country_code = dol_user_country(); $country_code = dol_user_country();
//print $country_code; //print $country_code;
if ($country_code) { if ($country_code) {
@ -615,26 +615,26 @@ jQuery(document).ready(function () {
$country_id = $new_country_id; $country_id = $new_country_id;
} }
} }
} }
$country_code = getCountry($country_id, 2, $db, $langs); $country_code = getCountry($country_id, 2, $db, $langs);
print $form->select_country($country_id, 'country_id'); print $form->select_country($country_id, 'country_id');
print '</td></tr>'; print '</td></tr>';
// State // State
if (empty($conf->global->SOCIETE_DISABLE_STATE)) { if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
print '<tr><td>'.$langs->trans('State').'</td><td>'; print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($country_code) { if ($country_code) {
print $formcompany->select_state(GETPOST("state_id"), $country_code); print $formcompany->select_state(GETPOST("state_id"), $country_code);
} }
print '</td></tr>'; print '</td></tr>';
} }
// EMail // EMail
print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
// Login // Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" maxlength="50" class="minwidth100"value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" maxlength="50" class="minwidth100"value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans("Password").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass1" class="minwidth100" value="'.GETPOST("pass1").'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("Password").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass1" class="minwidth100" value="'.GETPOST("pass1").'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass2" class="minwidth100" value="'.GETPOST("pass2").'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass2" class="minwidth100" value="'.GETPOST("pass2").'"></td></tr>'."\n";
} }
// Birthday // Birthday
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>'; print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>';
print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0); print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0);
@ -653,7 +653,7 @@ jQuery(document).ready(function () {
print '</tr>'."\n"; print '</tr>'."\n";
// Add specific fields used by Dolibarr foundation for example // Add specific fields used by Dolibarr foundation for example
if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
$arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+'); $arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+');
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>'; print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1); print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1);
@ -694,8 +694,8 @@ jQuery(document).ready(function () {
}); });
</script>'; </script>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
// $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount // $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount
// Set amount for the subscription // Set amount for the subscription
@ -718,7 +718,7 @@ jQuery(document).ready(function () {
} }
print ' '.$langs->trans("Currency".$conf->currency); print ' '.$langs->trans("Currency".$conf->currency);
print '</td></tr>'; print '</td></tr>';
} }
print "</table>\n"; print "</table>\n";
print dol_get_fiche_end(); print dol_get_fiche_end();
@ -726,9 +726,9 @@ jQuery(document).ready(function () {
// Save // Save
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">';
if (!empty($backtopage)) { if (!empty($backtopage)) {
print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">';
} }
print '</div>'; print '</div>';