Merge remote-tracking branch 'upstream/develop' into 16b2

This commit is contained in:
Alexandre SPANGARO 2022-06-21 06:16:24 +02:00
commit c5967623a9
47 changed files with 120 additions and 86 deletions

View File

@ -198,7 +198,7 @@ Following changes may create regressions for some external modules, but were nec
* Method fetch_all_resources(), fetch_all_used(), fetch_all_available() of DolResource has been removed (they were not used by core code).
* Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions.
* The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced.
* The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier'
***** ChangeLog for 15.0.2 compared to 15.0.1 *****

View File

@ -1284,7 +1284,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat" name="photo" id="photoinput">';
print '</td></tr>';

View File

@ -480,7 +480,7 @@ print '<div class="centpercent nobordernopadding valignmiddle "><div class="inli
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">';
print '</div>';
@ -522,7 +522,7 @@ print '<div class="centpercent nobordernopadding valignmiddle"><div class="inlin
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">';
print '</div>';

View File

@ -639,7 +639,7 @@ if ($mode == 'login') {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>';
if ($disabled) {

View File

@ -1212,7 +1212,7 @@ if ($mode == 'deploy') {
});
</script>'."\n";
// MAX_FILE_SIZE doit précéder le champ input de type file
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">';
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';
}
print '<input class="flat minwidth400" type="file" name="fileinstall" id="fileinstall"> ';

View File

@ -1252,7 +1252,7 @@ if ($action == 'create') {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="'.$langs->trans("Upload").'" />';
$out .= ' ';

View File

@ -1275,7 +1275,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat" name="photo" id="photoinput">';
print '</td></tr>';

View File

@ -163,7 +163,7 @@ if ($action == 'edit') {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat" name="photo" id="photoinput">';
print '</td></tr>';

View File

@ -1415,7 +1415,7 @@ if ($action == 'create') {
}
$arrayothercontracts = $object->getListOfContracts('others');
$arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error
/*
* Lines of contracts
@ -1544,9 +1544,9 @@ if ($action == 'create') {
print '<td class="right nowraponall">'.price($objp->pa_ht).'</td>';
}
// Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme)
// Icon move, update et delete (status contract 0=draft,1=validated,2=closed)
print '<td class="nowraponall right">';
if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) {
if ($user->rights->contrat->creer && is_array($arrayothercontracts) && count($arrayothercontracts) && ($object->statut >= 0)) {
print '<!-- link to move service line into another contract -->';
print '<a class="reposition marginrightonly" style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=move&token='.newToken().'&rowid='.$objp->rowid.'">';
print img_picto($langs->trans("MoveToAnotherContract"), 'uparrow');

View File

@ -2126,7 +2126,7 @@ class Contrat extends CommonObject
}
/**
* Return list of other contracts for same company than current contract
* Return list of other contracts for the same company than current contract
*
* @param string $option 'all' or 'others'
* @param array $status sort contracts having these status
@ -2138,7 +2138,7 @@ class Contrat extends CommonObject
{
$tab = array();
$sql = "SELECT c.rowid, c.ref";
$sql = "SELECT c.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c";
if (!empty($product_categories)) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON cd.fk_contrat = c.rowid";
@ -2159,12 +2159,12 @@ class Contrat extends CommonObject
$obj = $this->db->fetch_object($resql);
$contrat = new Contrat($this->db);
$contrat->fetch($obj->rowid);
$tab[] = $contrat;
$tab[$contrat->id] = $contrat;
$i++;
}
return $tab;
} else {
$this->error = $this->db->error();
$this->error = $this->db->lasterror();
return -1;
}
}

View File

@ -4901,9 +4901,11 @@ class Form
* @param int|string $height Force height of box (0 = auto)
* @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones.
* @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section.
* @param string $labelbuttonyes Label for Yes
* @param string $labelbuttonno Label for No
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
*/
public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0)
public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0, $labelbuttonyes = 'Yes', $labelbuttonno = 'No')
{
global $langs, $conf;
@ -5012,7 +5014,7 @@ class Form
$more .= ' checked="checked"';
}
$more .= ' /> ';
$more .= '<label for="'.dol_escape_htmltag($input['name'].$selkey).'">'.$selval.'</label>';
$more .= '<label for="'.dol_escape_htmltag($input['name'].$selkey).'" class="valignmiddle">'.$selval.'</label>';
$more .= '</div></div>'."\n";
$i++;
}
@ -5118,6 +5120,7 @@ class Form
$(this).parent().find("button.ui-button:eq(2)").focus();
},';
}
$formconfirm .= '
resizable: false,
height: "'.$height.'",
@ -5125,7 +5128,7 @@ class Form
modal: true,
closeOnEscape: false,
buttons: {
"'.dol_escape_js($langs->transnoentities("Yes")).'": function() {
"'.dol_escape_js($langs->transnoentities($labelbuttonyes)).'": function() {
var options = "&token='.urlencode(newToken()).'";
var inputok = '.json_encode($inputok).'; /* List of fields into form */
var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'";
@ -5148,7 +5151,7 @@ class Form
if (pageyes.length > 0) { location.href = urljump; }
$(this).dialog("close");
},
"'.dol_escape_js($langs->transnoentities("No")).'": function() {
"'.dol_escape_js($langs->transnoentities($labelbuttonno)).'": function() {
var options = "&token='.urlencode(newToken()).'";
var inputko = '.json_encode($inputko).'; /* List of fields into form */
var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'";
@ -5213,7 +5216,7 @@ class Form
$formconfirm .= '<tr class="valid">';
$formconfirm .= '<td class="valid">'.$question.'</td>';
$formconfirm .= '<td class="valid center">';
$formconfirm .= $this->selectyesno("confirm", $newselectedchoice, 0, false, 0, 0, 'marginleftonly marginrightonly');
$formconfirm .= $this->selectyesno("confirm", $newselectedchoice, 0, false, 0, 0, 'marginleftonly marginrightonly', $labelbuttonyes, $labelbuttonno);
$formconfirm .= '<input class="button valignmiddle confirmvalidatebutton small" type="submit" value="'.$langs->trans("Validate").'">';
$formconfirm .= '</td>';
$formconfirm .= '</tr>'."\n";
@ -8844,9 +8847,11 @@ class Form
* @param int $useempty 1=Add empty line
* @param int $addjscombo 1=Add js beautifier on combo box
* @param string $morecss More CSS
* @return string See option
* @param string $labelyes Label for Yes
* @param string $labelno Label for No
* @return string See option
*/
public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0, $addjscombo = 0, $morecss = '')
public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0, $addjscombo = 0, $morecss = '', $labelyes = 'Yes', $labelno = 'No')
{
global $langs;
@ -8857,6 +8862,7 @@ class Form
$no = "0";
}
$disabled = ($disabled ? ' disabled' : '');
$resultyesno = '<select class="flat width75'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
@ -8864,12 +8870,12 @@ class Form
$resultyesno .= '<option value="-1"'.(($value < 0) ? ' selected' : '').'>&nbsp;</option>'."\n";
}
if (("$value" == 'yes') || ($value == 1)) {
$resultyesno .= '<option value="'.$yes.'" selected>'.$langs->trans("Yes").'</option>'."\n";
$resultyesno .= '<option value="'.$no.'">'.$langs->trans("No").'</option>'."\n";
$resultyesno .= '<option value="'.$yes.'" selected>'.$langs->trans($labelyes).'</option>'."\n";
$resultyesno .= '<option value="'.$no.'">'.$langs->trans($labelno).'</option>'."\n";
} else {
$selected = (($useempty && $value != '0' && $value != 'no') ? '' : ' selected');
$resultyesno .= '<option value="'.$yes.'">'.$langs->trans("Yes").'</option>'."\n";
$resultyesno .= '<option value="'.$no.'"'.$selected.'>'.$langs->trans("No").'</option>'."\n";
$resultyesno .= '<option value="'.$yes.'">'.$langs->trans($labelyes).'</option>'."\n";
$resultyesno .= '<option value="'.$no.'"'.$selected.'>'.$langs->trans($labelno).'</option>'."\n";
}
$resultyesno .= '</select>'."\n";
@ -9365,7 +9371,7 @@ class Form
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$ret .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$ret .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$ret .= '<input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput" accept="image/*"'.($capture ? ' capture="'.$capture.'"' : '').'>';
$ret .= '</td></tr>';

View File

@ -188,7 +188,7 @@ class FormContract
print '<input type="hidden" name="action" value="setcontract">';
print '<input type="hidden" name="token" value="'.newToken().'">';
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty, $showRef);
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>';
}
}

View File

@ -154,7 +154,7 @@ class FormFile
$maxphptoshow = $maxfilesizearray['maxphptoshow'];
$maxphptoshowparam = $maxfilesizearray['maxphptoshowparam'];
if ($maxmin > 0) {
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"';
$out .= ((!empty($conf->global->MAIN_DISABLE_MULTIPLE_FILEUPLOAD) || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple');

View File

@ -832,7 +832,7 @@ class FormMail extends Form
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
// Can add other files
if (!empty($conf->global->FROM_MAIL_USE_INPUT_FILE_MULTIPLE)) {

View File

@ -494,7 +494,7 @@ class FormTicket
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="'.$langs->trans("Upload").'" />';
$out .= ' ';

View File

@ -2249,6 +2249,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
}
}
// Show address and email
if (method_exists($object, 'getBannerAddress') && !in_array($object->element, array('product', 'bookmark', 'ecm_directories', 'ecm_files'))) {
$moreaddress = $object->getBannerAddress('refaddress', $object);
if ($moreaddress) {
@ -2953,6 +2954,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
//$rep .= '</div>';
if ($hookmanager) {
$parameters = array('cid' => $cid, 'socid' => $socid, 'addlink' => $addlink, 'picto' => $withpicto);
$reshook = $hookmanager->executeHooks('printEmail', $parameters, $email);
if ($reshook > 0) {
$rep = '';

View File

@ -178,7 +178,7 @@ class doc_generic_bom_odt extends ModelePDFBom
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -185,7 +185,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="COMMANDE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -170,7 +170,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="CONTRACT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -184,7 +184,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="EXPEDITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -183,7 +183,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="FACTURE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -113,7 +113,7 @@ class mailing_xinputfile extends MailingTargets
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$s .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$s .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$s .= '<input type="file" name="username" class="flat">';
return $s;

View File

@ -173,7 +173,7 @@ class doc_generic_member_odt extends ModelePDFMember
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="MEMBER_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -181,7 +181,7 @@ class doc_generic_product_odt extends ModelePDFProduct
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="PRODUCT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -215,7 +215,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="PROPALE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -177,7 +177,7 @@ class doc_generic_reception_odt extends ModelePdfReception
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="RECEPTION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -173,7 +173,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="COMPANY_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -181,7 +181,7 @@ class doc_generic_stock_odt extends ModelePDFStock
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="STOCK_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -171,7 +171,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= '<input type="hidden" value="TICKET_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
$texte .= '<input type="submit" class="button small reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';

View File

@ -201,7 +201,7 @@ class doc_generic_user_odt extends ModelePDFUser
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="USER_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -41,7 +41,7 @@ if (empty($conf) || !is_object($conf)) {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
?>
<input type="file" name="files[]" multiple>

View File

@ -1062,9 +1062,7 @@ if ($action == 'create') {
print '</form>';
}
} elseif ($id > 0 || !empty($ref)) {
/*
* Affichage en mode visu
*/
// View mode
$object->fetch($id, $ref);
$object->fetch_thirdparty();
@ -1201,7 +1199,7 @@ if ($action == 'create') {
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<table class="border tableforfield centpercent">';
if (!empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) {
// Date Start
@ -1230,7 +1228,7 @@ if ($action == 'create') {
print '<tr><td class="titlefield">';
print $form->editfieldkey("Description", 'description', $object->description, $object, $user->rights->ficheinter->creer, 'textarea');
print '</td><td>';
print $form->editfieldval("Description", 'description', $object->description, $object, $user->rights->ficheinter->creer, 'textarea:8:80');
print $form->editfieldval("Description", 'description', $object->description, $object, $user->rights->ficheinter->creer, 'textarea:8');
print '</td>';
print '</tr>';

View File

@ -70,7 +70,7 @@ $extrafields = new ExtraFields($db);
$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('suppliercard', 'globalcard'));
$hookmanager->initHooks(array('thirdpartysupplier', 'globalcard'));
// Security check
$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
@ -147,6 +147,7 @@ if (empty($reshook)) {
if (!$error) {
$result = $object->insertExtraFields('COMPANY_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
}
@ -170,6 +171,7 @@ if ($id > 0 && empty($object->id)) {
$res = $object->fetch($id);
if ($object->id <= 0) {
dol_print_error($db, $object->error);
exit(-1);
}
}

View File

@ -624,7 +624,7 @@ if ($step == 3 && $datatoimport) {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; ';
$out = (empty($conf->global->MAIN_UPLOAD_DOC) ? ' disabled' : '');

View File

@ -136,6 +136,9 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
-- v16
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_id integer DEFAULT NULL;
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;
ALTER TABLE llx_c_stcomm MODIFY COLUMN code VARCHAR(24) NOT NULL;
ALTER TABLE llx_societe_account DROP FOREIGN KEY llx_societe_account_fk_website;

View File

@ -29,6 +29,8 @@ create table llx_projet_task_time
thm double(24,8),
invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here
invoice_line_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice line id here
intervention_id integer DEFAULT NULL, -- If we need to have an intervention line for each line of timespent, we can save intervention id here
intervention_line_id integer DEFAULT NULL, -- If we need to have an intervention line of timespent line, we can save intervention line id here
import_key varchar(14), -- Import key
datec datetime, -- date creation time
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date

View File

@ -95,6 +95,7 @@ ShowCategory=Show tag/category
ByDefaultInList=By default in list
ChooseCategory=Choose category
StocksCategoriesArea=Warehouse Categories
TicketsCategoriesArea=Tickets Categories
ActionCommCategoriesArea=Event Categories
WebsitePagesCategoriesArea=Page-Container Categories
KnowledgemanagementsCategoriesArea=KM article Categories

View File

@ -189,7 +189,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$texte .= ' <input type="file" name="uploadfile">';
$texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';

View File

@ -334,7 +334,6 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= $db->order($sortfield, $sortorder);
/* If a group by is required
$sql .= " GROUP BY ";
@ -564,7 +563,7 @@ if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
}
foreach ($object->fields as $key => $val) {
$searchkey = empty($search[$key]) ? '' : $search[$key];
$cssforfield = (empty($val['css']) ? '' : $val['css']);
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {

View File

@ -484,7 +484,7 @@ print '</span>';
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; ';
$out = (empty($conf->global->MAIN_UPLOAD_DOC) ? ' disabled' : '');

View File

@ -258,8 +258,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$object->fetch($id_temp, $ref);
$object->timespent_note = GETPOST("timespent_note_line", 'alpha');
$object->timespent_old_duration = GETPOST("old_duration");
$object->timespent_note = GETPOST("timespent_note_line", "alphanohtml");
$object->timespent_old_duration = GETPOST("old_duration", "int");
$object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds
$object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds
if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered
@ -285,8 +285,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$object->fetch($id, $ref);
$object->timespent_id = GETPOST("lineid", 'int');
$object->timespent_note = GETPOST("timespent_note_line");
$object->timespent_old_duration = GETPOST("old_duration");
$object->timespent_note = GETPOST("timespent_note_line", "alphanohtml");
$object->timespent_old_duration = GETPOST("old_duration", "int");
$object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds
$object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds
if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered
@ -1255,10 +1255,11 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '<input type="hidden" name="massaction" value="confirm_createinter">';
if ($projectstatic->thirdparty->id > 0) {
print '<br>';
print '<table class="noborder centpercent">';
print '<tr>';
print '<td class="titlefield">';
print $langs->trans('InterToUse');
print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse');
print '</td>';
print '<td>';
$forminter = new FormIntervention($db);
@ -1267,7 +1268,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '</tr>';
print '</table>';
print '<br>';
print '<div class="center">';
print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> ';
print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
@ -1782,7 +1782,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (!empty($arrayfields['t.note']['checked'])) {
print '<td class="small">';
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>';
print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note).'</textarea>';
} else {
print dol_nl2br($task_time->note);
}
@ -1791,7 +1791,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
$totalarray['nbfield']++;
}
} elseif ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
print '<input type="hidden" name="timespent_note_line" value="'.$task_time->note.'">';
print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note).'">';
}
// Time spent
@ -1820,9 +1820,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
// Value spent
if (!empty($arrayfields['value']['checked'])) {
$langs->load("salaries");
$value = price2num($task_time->thm * $task_time->task_duration / 3600, 'MT', 1);
print '<td class="nowraponall right">';
$value = price2num($task_time->thm * $task_time->task_duration / 3600, 'MT', 1);
print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">';
print price($value, 1, $langs, 1, -1, -1, $conf->currency);
print '</span>';
@ -1884,7 +1884,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
print '&nbsp;';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$task_time->fk_task.'&action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
print img_split('', 'class="pictofixedwidth"');
print '</a>';
}
@ -1996,13 +1996,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (!empty($arrayfields['t.note']['checked'])) {
print '<td class="tdoverflowmax300">';
if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) {
print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>';
print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note).'</textarea>';
} else {
print dol_nl2br($task_time->note);
}
print '</td>';
} elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) {
print '<input type="hidden" name="timespent_note_line" value="'.$task_time->note.'">';
print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note).'">';
}
// Time spent
@ -2020,8 +2020,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
// Value spent
if (!empty($arrayfields['value']['checked'])) {
print '<td class="right">';
print '<span class="amount">';
$value = price2num($task_time->thm * $task_time->task_duration / 3600, 'MT', 1);
print price($value, 1, $langs, 1, -1, -1, $conf->currency);
print '</span>';
print '</td>';
}
@ -2132,13 +2134,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (!empty($arrayfields['t.note']['checked'])) {
print '<td class="small tdoverflowmax300"">';
if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) {
print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>';
print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note).'</textarea>';
} else {
print dol_nl2br($task_time->note);
}
print '</td>';
} elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) {
print '<input type="hidden" name="timespent_note_line_2" value="'.$task_time->note.'">';
print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note).'">';
}
// Time spent
@ -2156,8 +2158,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
// Value spent
if (!empty($arrayfields['value']['checked'])) {
print '<td class="right">';
print '<span class="amount">';
$value = 0;
print price($value, 1, $langs, 1, -1, -1, $conf->currency);
print '</span>';
print '</td>';
}
@ -2166,7 +2170,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '<td class="right">';
$valuebilled = price2num($task_time->total_ht, '', 1);
if (isset($task_time->total_ht)) {
print '<span class="amount">';
print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency);
print '</span>';
}
print '</td>';
}

View File

@ -111,7 +111,7 @@ class RecruitmentCandidature extends CommonObject
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of candidature"),
'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'maxwidth500', 'csslist'=>'minwidth125'),
'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth125 tdoverflowmax200'),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
@ -121,7 +121,7 @@ class RecruitmentCandidature extends CommonObject
'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,),
'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,),
'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax200'),
'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone'),
'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'),
'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,),
'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'),
//'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1),

View File

@ -104,7 +104,7 @@ if (!$sortorder) {
}
// Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search_all = GETPOST('search_all', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha') !== '') {
@ -149,8 +149,6 @@ if ($id > 0 || !empty($ref)) {
$id = $jobposition->id;
}
//include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -229,7 +227,7 @@ $now = dol_now();
//$help_url="EN:Module_RecruitmentCandidature|FR:Module_RecruitmentCandidature_FR|ES:Módulo_RecruitmentCandidature";
$help_url = '';
$title = $langs->trans('ListOfCandidatures');
$title = $langs->trans('RecruitmentCandidatures');
$morejs = array();
$morecss = array();
@ -370,7 +368,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
// Output page
// --------------------------------------------------------------------
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', '');
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
// Part to show record
@ -637,7 +635,7 @@ if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
}
foreach ($object->fields as $key => $val) {
$searchkey = empty($search[$key]) ? '' : $search[$key];
$cssforfield = (empty($val['css']) ? '' : $val['css']);
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {

View File

@ -954,6 +954,7 @@ if ($socid > 0 && empty($object->id)) {
$result = $object->fetch($socid);
if ($result <= 0) {
dol_print_error('', $object->error);
exit(-1);
}
}
@ -2517,7 +2518,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat" name="photo" id="photoinput">';
print '</td></tr>';

View File

@ -4817,7 +4817,7 @@ div#card-errors {
color: #fa755a;
text-align: center;
padding-top: 3px;
max-width: 320px;
/* max-width: 320px; */
}
@ -7615,6 +7615,14 @@ div.clipboardCPValue.hidewithsize {
/* border-bottom: 2px solid var(--colorbackhmenu1) !important; */
border-bottom: 1px solid var(--colortopbordertitle1) !important;
}
div#card-errors {
max-width: unset;
}
#dolpaymenttable {
padding: 5px;
}
}
@media only screen and (max-width: 320px)

View File

@ -530,6 +530,7 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment {
background-color: #eee;
white-space: normal;
color: #888 !important;
height: 60px;
}
.nofocusvisible:focus-visible {
outline: none;
@ -4669,11 +4670,10 @@ div#card-errors {
color: #fa755a;
text-align: center;
padding-top: 3px;
max-width: 320px;
/* max-width: 320px; */
}
/*
* Effect Postit
*/
@ -7299,6 +7299,14 @@ div.clipboardCPValue.hidewithsize {
div.divButAction {
margin-bottom: 0.5em;
}
div#card-errors {
max-width: unset;
}
#dolpaymenttable {
padding: 5px;
}
}

View File

@ -3415,7 +3415,7 @@ if ($action == 'editcss') {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
$texte .= '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
print '</tr></td>';
@ -3641,7 +3641,7 @@ if ($action == 'importsite') {
$maxfilesizearray = getMaxFileSizeArray();
$maxmin = $maxfilesizearray['maxmin'];
if ($maxmin > 0) {
print '<input type="hidden" name="max_file_size" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">';