Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4b2c4d2df3
@ -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();
|
||||
|
||||
@ -452,7 +452,8 @@ if (!empty($arrayfields['p.ref']['checked'])) {
|
||||
if (!empty($arrayfields['cs.fk_user']['checked'])) {
|
||||
// Employee
|
||||
print '<td class="liste_titre">';
|
||||
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 '</td>';
|
||||
}
|
||||
|
||||
// Filter: Type
|
||||
@ -593,7 +594,7 @@ while ($i < min($num, $limit)) {
|
||||
if (isModEnabled('accounting')) {
|
||||
$typelabelpopup .= ' - '.$langs->trans("AccountancyCode").': '.$obj->type_accountancy_code;
|
||||
}
|
||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($typelabelpopup).'">'.dol_escape_htmltag($typelabeltoshow).'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($typelabelpopup).'">'.dol_escape_htmltag($typelabeltoshow).'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -601,7 +602,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
// Date
|
||||
if (!empty($arrayfields['cs.date_ech']['checked'])) {
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -609,7 +610,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
// Date end period
|
||||
if (!empty($arrayfields['cs.periode']['checked'])) {
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
|
||||
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -617,7 +618,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
// Project ref
|
||||
if (!empty($arrayfields['p.ref']['checked'])) {
|
||||
print '<td class="nowrap">';
|
||||
print '<td class="nowraponall">';
|
||||
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 "<td>";
|
||||
print '<td class="tdoverflowmax150">';
|
||||
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 '<td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("PaymentTypeShort".$obj->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 '<td>';
|
||||
print '<td class="toverflowmax150">';
|
||||
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 '<td class="nowrap amount right">'.price($obj->amount).'</td>';
|
||||
print '<td class="nowraponall amount right">'.price($obj->amount).'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -695,7 +696,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
// Status
|
||||
if (!empty($arrayfields['cs.paye']['checked'])) {
|
||||
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||
print '<td class="nowraponall right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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 = '<div class="error">'.$langs->trans('NotConfigured').'</div>';
|
||||
if (!$examplecust && ($cssforerror == 'error' || $this->error != 'NotConfigured')) {
|
||||
$langs->load("errors");
|
||||
$examplecust = '<span class="'.$cssforerror.'">'.$langs->trans('ErrorBadMask').'</span>';
|
||||
$error = 1;
|
||||
}
|
||||
if (in_array($examplecust, $errmsg)) {
|
||||
$langs->load("errors");
|
||||
$examplecust = '<div class="error">'.$langs->trans($examplecust).'</div>';
|
||||
$examplecust = '<span class="'.$cssforerror.'">'.$langs->trans($examplecust).'</span>';
|
||||
$error = 1;
|
||||
}
|
||||
}
|
||||
if ($type != 0) {
|
||||
$examplesup = $this->getNextValue($objsoc, 1);
|
||||
if (!$examplesup) {
|
||||
$examplesup = '<div class="error">'.$langs->trans('NotConfigured').'</div>';
|
||||
if (!$examplesup && ($cssforerror == 'error' || $this->error != 'NotConfigured')) {
|
||||
$langs->load("errors");
|
||||
$examplesup = '<span class="'.$cssforerror.'">'.$langs->trans('ErrorBadMask').'</span>';
|
||||
$error = 1;
|
||||
}
|
||||
if (in_array($examplesup, $errmsg)) {
|
||||
$langs->load("errors");
|
||||
$examplesup = '<div class="error">'.$langs->trans($examplesup).'</div>';
|
||||
$examplesup = '<span class="'.$cssforerror.'">'.$langs->trans($examplesup).'</span>';
|
||||
$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.'<br>'.$examplesup;
|
||||
}
|
||||
return $examplecust.'<br>'.$examplesup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 '<td'.(empty($conf->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 "</td>\n";
|
||||
$companystatic->name_alias = $savalias;
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="tdoverflowmax200">';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companystatic->name_alias).'">';
|
||||
print dol_escape_htmltag($companystatic->name_alias);
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
@ -1481,7 +1476,7 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
// Barcode
|
||||
if (!empty($arrayfields['s.barcode']['checked'])) {
|
||||
print '<td>'.dol_escape_htmltag($obj->barcode).'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->barcode).'">'.dol_escape_htmltag($obj->barcode).'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -897,6 +897,9 @@ textarea.centpercent {
|
||||
.cursornotallowed {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.cursorwait {
|
||||
cursor: wait;
|
||||
}
|
||||
.backgroundblank {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@ -1046,6 +1046,9 @@ textarea.centpercent {
|
||||
.cursormove {
|
||||
cursor: move;
|
||||
}
|
||||
.cursorwait {
|
||||
cursor: wait;
|
||||
}
|
||||
.cursornotallowed {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user