diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index dcd853a5356..6d7ef8f1863 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("install", "other", "admin")); +$langs->loadLangs(array("install", "other", "admin", "products")); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 9f5f9a39bdc..024984d98b6 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -452,7 +452,8 @@ if (!empty($arrayfields['p.ref']['checked'])) { if (!empty($arrayfields['cs.fk_user']['checked'])) { // Employee print ''; - print $form->select_dolusers($search_users, 'search_users', 1, null, 0, '', '', '0', '0', 0, '', 0, '', '', 0, 0, true); + print $form->select_dolusers($search_users, 'search_users', 1, null, 0, '', '', '0', 0, 0, '', 0, '', 'maxwidth150', 0, 0, true); + print ''; } // Filter: Type @@ -593,7 +594,7 @@ while ($i < min($num, $limit)) { if (isModEnabled('accounting')) { $typelabelpopup .= ' - '.$langs->trans("AccountancyCode").': '.$obj->type_accountancy_code; } - print ''.dol_escape_htmltag($typelabeltoshow).''; + print ''.dol_escape_htmltag($typelabeltoshow).''; if (!$i) { $totalarray['nbfield']++; } @@ -601,7 +602,7 @@ while ($i < min($num, $limit)) { // Date if (!empty($arrayfields['cs.date_ech']['checked'])) { - print ''.dol_print_date($db->jdate($obj->date_ech), 'day').''; + print ''.dol_print_date($db->jdate($obj->date_ech), 'day').''; if (!$i) { $totalarray['nbfield']++; } @@ -609,7 +610,7 @@ while ($i < min($num, $limit)) { // Date end period if (!empty($arrayfields['cs.periode']['checked'])) { - print ''.dol_print_date($db->jdate($obj->periode), 'day').''; + print ''.dol_print_date($db->jdate($obj->periode), 'day').''; if (!$i) { $totalarray['nbfield']++; } @@ -617,7 +618,7 @@ while ($i < min($num, $limit)) { // Project ref if (!empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { print $projectstatic->getNomUrl(1); } @@ -629,7 +630,7 @@ while ($i < min($num, $limit)) { if (!empty($arrayfields['cs.fk_user']['checked'])) { // Employee - print ""; + print ''; if (!empty($obj->fk_user)) { if (!empty($TLoadedUsers[$obj->fk_user])) { $ustatic = $TLoadedUsers[$obj->fk_user]; @@ -648,7 +649,7 @@ while ($i < min($num, $limit)) { // Type if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { - print ''; + print 'payment_code)).'">'; if (!empty($obj->payment_code)) { print $langs->trans("PaymentTypeShort".$obj->payment_code); } @@ -660,7 +661,7 @@ while ($i < min($num, $limit)) { // Account if (!empty($arrayfields['cs.fk_account']['checked'])) { - print ''; + print ''; if ($obj->fk_account > 0) { $bankstatic->id = $obj->fk_account; $bankstatic->ref = $obj->bref; @@ -683,7 +684,7 @@ while ($i < min($num, $limit)) { // Amount if (!empty($arrayfields['cs.amount']['checked'])) { - print ''.price($obj->amount).''; + print ''.price($obj->amount).''; if (!$i) { $totalarray['nbfield']++; } @@ -695,7 +696,7 @@ while ($i < min($num, $limit)) { // Status if (!empty($arrayfields['cs.paye']['checked'])) { - print ''.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).''; + print ''.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5bf6cec8192..360a6cdcbe2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5162,7 +5162,8 @@ class Form var inputok = '.json_encode($inputok).'; /* List of fields into form */ var page = "'.dol_escape_js(!empty($page) ? $page : '').'"; var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'"; - if (inputok.length>0) { + + if (inputok.length > 0) { $.each(inputok, function(i, inputname) { var more = ""; var inputvalue; @@ -5177,21 +5178,25 @@ class Form options += "&" + inputname + "=" + encodeURIComponent(inputvalue); }); } - if (pageyes.length > 0) { + var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options; + if (pageyes.length > 0) { + // The call to urljump can be slow, so we set the wait cursor + jQuery("html,body,#id-container").addClass("cursorwait"); var post = $.post( pageyes, options, (data) => {$("body").html(data)} ); + console.log("after post"); } - $(this).dialog("close"); + $(this).dialog("close"); }, "'.dol_escape_js($langs->transnoentities($labelbuttonno)).'": function() { var options = "token='.urlencode(newToken()).'"; var inputko = '.json_encode($inputko).'; /* List of fields into form */ var page = "'.dol_escape_js(!empty($page) ? $page : '').'"; var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'"; - if (inputko.length>0) { + if (inputko.length > 0) { $.each(inputko, function(i, inputname) { var more = ""; if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; } @@ -5200,12 +5205,15 @@ class Form options += "&" + inputname + "=" + encodeURIComponent(inputvalue); }); } - if (pageno.length > 0) { + var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options; + //alert(urljump); + if (pageno.length > 0) { var post = $.post( pageno, options, (data) => {$("body").html(data)} ); + console.log("after location.href"); } $(this).dialog("close"); } diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 820dfafdc7e..100799dff95 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -172,27 +172,32 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode "ErrorBadMaskBadRazMonth", "ErrorCantUseRazWithYearOnOneDigit", ); + + $cssforerror = (getDolGlobalString('SOCIETE_CODECLIENT_ADDON') == 'mod_codeclient_elephant' ? 'error' : 'opacitymedium'); + if ($type != 1) { $examplecust = $this->getNextValue($objsoc, 0); - if (!$examplecust) { - $examplecust = '
'.$langs->trans('NotConfigured').'
'; + if (!$examplecust && ($cssforerror == 'error' || $this->error != 'NotConfigured')) { + $langs->load("errors"); + $examplecust = ''.$langs->trans('ErrorBadMask').''; $error = 1; } if (in_array($examplecust, $errmsg)) { $langs->load("errors"); - $examplecust = '
'.$langs->trans($examplecust).'
'; + $examplecust = ''.$langs->trans($examplecust).''; $error = 1; } } if ($type != 0) { $examplesup = $this->getNextValue($objsoc, 1); - if (!$examplesup) { - $examplesup = '
'.$langs->trans('NotConfigured').'
'; + if (!$examplesup && ($cssforerror == 'error' || $this->error != 'NotConfigured')) { + $langs->load("errors"); + $examplesup = ''.$langs->trans('ErrorBadMask').''; $error = 1; } if (in_array($examplesup, $errmsg)) { $langs->load("errors"); - $examplesup = '
'.$langs->trans($examplesup).'
'; + $examplesup = ''.$langs->trans($examplesup).''; $error = 1; } } @@ -202,11 +207,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode } elseif ($type == 1) { return $examplesup; } else { - if ($error == 1) { - return $examplecust.' '.$examplesup; - } else { - return $examplecust.'
'.$examplesup; - } + return $examplecust.'
'.$examplesup; } } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index beca13fb00d..9987f9bc4f0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -345,6 +345,7 @@ class Project extends CommonObject $this->fields['accept_booth_suggestions']['enabled'] = 0; $this->fields['price_registration']['enabled'] = 0; $this->fields['price_booth']['enabled'] = 0; + $this->fields['max_attendees']['enabled'] = 0; } } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 680ab8aff82..ea6abec1175 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1455,24 +1455,19 @@ while ($i < min($num, $limit)) { } } if (!empty($arrayfields['s.nom']['checked'])) { - $savalias = $obj->name_alias; - if (!empty($arrayfields['s.name_alias']['checked'])) { - $companystatic->name_alias = ''; - } print 'global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">'; if ($contextpage == 'poslist') { - print $obj->name; + print dol_escape_htmltag($obj->name); } else { - print $companystatic->getNomUrl(1, '', 100, 0, 1); + print $companystatic->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } print "\n"; - $companystatic->name_alias = $savalias; if (!$i) { $totalarray['nbfield']++; } } if (!empty($arrayfields['s.name_alias']['checked'])) { - print ''; + print ''; print dol_escape_htmltag($companystatic->name_alias); print "\n"; if (!$i) { @@ -1481,7 +1476,7 @@ while ($i < min($num, $limit)) { } // Barcode if (!empty($arrayfields['s.barcode']['checked'])) { - print ''.dol_escape_htmltag($obj->barcode).''; + print ''.dol_escape_htmltag($obj->barcode).''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b8326171eb4..74c4e866008 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -897,6 +897,9 @@ textarea.centpercent { .cursornotallowed { cursor: not-allowed; } +.cursorwait { + cursor: wait; +} .backgroundblank { background-color: #fff; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 47892574efb..c87c9a18e2f 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1046,6 +1046,9 @@ textarea.centpercent { .cursormove { cursor: move; } +.cursorwait { + cursor: wait; +} .cursornotallowed { cursor: not-allowed; }