@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 111 | 111 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 112 | 112 | $mode = GETPOST('mode', 'aZ'); // The display mode ('list', 'kanban', 'hierarchy', 'calendar', 'gantt', ...) |
| 113 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 113 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 114 | 114 | |
| 115 | 115 | $id = GETPOSTINT('id'); |
| 116 | 116 | $ref = GETPOST('ref', 'alpha'); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $object = new MyObject($db); |
| 133 | 133 | $extrafields = new ExtraFields($db); |
| 134 | 134 | $diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; |
| 135 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 135 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 136 | 136 | |
| 137 | 137 | // Fetch optionals attributes and labels |
| 138 | 138 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | // Default sort order (if not yet defined by previous GETPOST) |
| 144 | 144 | if (!$sortfield) { |
| 145 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 145 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 146 | 146 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 147 | 147 | } |
| 148 | 148 | if (!$sortorder) { |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | // Output page |
| 480 | 480 | // -------------------------------------------------------------------- |
| 481 | 481 | |
| 482 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
| 482 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
| 483 | 483 | |
| 484 | 484 | // Example : Adding jquery code |
| 485 | 485 | // print '<script type="text/javascript"> |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | } |
| 617 | 617 | |
| 618 | 618 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 619 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 619 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 620 | 620 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 621 | 621 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 622 | 622 | |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | $formadmin = new FormAdmin($db); |
| 668 | 668 | print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2); |
| 669 | 669 | } elseif ($val['type'] === 'boolean') { |
| 670 | - print $form->selectyesno('search_' . $key, $search[$key] ?? '', 1, false, 1); |
|
| 670 | + print $form->selectyesno('search_'.$key, $search[$key] ?? '', 1, false, 1); |
|
| 671 | 671 | } else { |
| 672 | 672 | print '<input type="text" class="flat maxwidth'.(in_array($val['type'], array('integer', 'price')) ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
| 673 | 673 | } |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 716 | 716 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 717 | 717 | } |
| 718 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 718 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 719 | 719 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 720 | 720 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
| 721 | 721 | $totalarray['nbfield']++; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 55 | 55 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 56 | 56 | $mode = GETPOST('mode', 'aZ'); // The display mode ('list', 'kanban', 'hierarchy', 'calendar', 'gantt', ...) |
| 57 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 57 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 58 | 58 | if (empty($mode)) { |
| 59 | 59 | $mode = 'hierarchy'; |
| 60 | 60 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $object = new Categorie($db); |
| 85 | 85 | $extrafields = new ExtraFields($db); |
| 86 | 86 | $diroutputmassaction = $conf->categories->dir_output.'/temp/massgeneration/'.$user->id; |
| 87 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 87 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 88 | 88 | |
| 89 | 89 | // Fetch optionals attributes and labels |
| 90 | 90 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | // Default sort order (if not yet defined by previous GETPOST) |
| 96 | 96 | if (!$sortfield) { |
| 97 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 97 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 98 | 98 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 99 | 99 | } |
| 100 | 100 | if (!$sortorder) { |
@@ -493,12 +493,12 @@ discard block |
||
| 493 | 493 | */ |
| 494 | 494 | $entry .= '<td class="right" width="30px;">'; |
| 495 | 495 | if ($user->hasRight('categorie', 'creer')) { |
| 496 | - $entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . $param . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type)) . '">' . img_edit() . '</a>'; |
|
| 496 | + $entry .= '<a class="editfielda" href="'.DOL_URL_ROOT.'/categories/edit.php?id='.$val['id'].$param.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type)).'">'.img_edit().'</a>'; |
|
| 497 | 497 | } |
| 498 | 498 | $entry .= '</td>'; |
| 499 | 499 | $entry .= '<td class="right" width="30px;">'; |
| 500 | 500 | if ($user->hasRight('categorie', 'supprimer')) { |
| 501 | - $entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . $param . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?' . $param) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?' . $param) . '">' . img_delete() . '</a>'; |
|
| 501 | + $entry .= '<a class="deletefilelink" href="'.DOL_URL_ROOT.'/categories/viewcat.php?action=delete&token='.newToken().'&id='.$val['id'].$param.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">'.img_delete().'</a>'; |
|
| 502 | 502 | } |
| 503 | 503 | $entry .= '</td>'; |
| 504 | 504 | |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | } else { |
| 566 | 566 | // Mode list |
| 567 | 567 | |
| 568 | - llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-aaa page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
| 568 | + llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-aaa page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
| 569 | 569 | |
| 570 | 570 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 571 | 571 | |
@@ -691,7 +691,7 @@ discard block |
||
| 691 | 691 | } |
| 692 | 692 | |
| 693 | 693 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 694 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 694 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 695 | 695 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 696 | 696 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 697 | 697 | |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 789 | 789 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 790 | 790 | } |
| 791 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 791 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 792 | 792 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 793 | 793 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
| 794 | 794 | $totalarray['nbfield']++; |
@@ -99,9 +99,9 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if ($result < 0) { |
| 102 | - print json_encode(['status' => 'error', 'message' => 'Error updating '. $field]); |
|
| 102 | + print json_encode(['status' => 'error', 'message' => 'Error updating '.$field]); |
|
| 103 | 103 | } else { |
| 104 | - print json_encode(['status' => 'success', 'message' => $field . ' updated successfully']); |
|
| 104 | + print json_encode(['status' => 'success', 'message' => $field.' updated successfully']); |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | } |
| 234 | 234 | if (isModEnabled("ai") && $action == 'edit_extras' && GETPOST('attribute') == $tmpkeyextra && !empty($extrafields->attributes[$object->table_element]["type"][$tmpkeyextra])) { |
| 235 | 235 | if (in_array($extrafields->attributes[$object->table_element]["type"][$tmpkeyextra], array("varchar", "text", "html", "int", 'double', 'price'))) { |
| 236 | - $showlinktoai = "extrafieldfiller"; // 'textgenerationemail', 'textgenerationwebpage', 'imagegeneration', ... |
|
| 236 | + $showlinktoai = "extrafieldfiller"; // 'textgenerationemail', 'textgenerationwebpage', 'imagegeneration', ... |
|
| 237 | 237 | $showlinktoailabel = $langs->trans("FillExtrafieldWithAi"); |
| 238 | 238 | $htmlname = "options_".$tmpkeyextra; |
| 239 | 239 | $onlyenhancements = "textgenerationextrafield"; |
@@ -252,10 +252,10 @@ discard block |
||
| 252 | 252 | print '</tr></table>'; |
| 253 | 253 | print '</td>'; |
| 254 | 254 | |
| 255 | - $cssview = !empty($extrafields->attributes[$object->table_element]['cssview'][$tmpkeyextra]) ? ($extrafields->attributes[$object->table_element]['cssview'][$tmpkeyextra] . ' ') : ''; |
|
| 255 | + $cssview = !empty($extrafields->attributes[$object->table_element]['cssview'][$tmpkeyextra]) ? ($extrafields->attributes[$object->table_element]['cssview'][$tmpkeyextra].' ') : ''; |
|
| 256 | 256 | $html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : ''; |
| 257 | 257 | |
| 258 | - print '<td id="' . $html_id . '" class="valuefield ' . $cssview . $object->element . '_extras_' . $tmpkeyextra . ' wordbreakimp"' . (!empty($cols) ? ' colspan="' . $cols . '"' : '') . '>'; |
|
| 258 | + print '<td id="'.$html_id.'" class="valuefield '.$cssview.$object->element.'_extras_'.$tmpkeyextra.' wordbreakimp"'.(!empty($cols) ? ' colspan="'.$cols.'"' : '').'>'; |
|
| 259 | 259 | |
| 260 | 260 | // Convert date into timestamp format |
| 261 | 261 | if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) { |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | if ($object->table_element == 'societe') { |
| 285 | 285 | $fieldid = 'socid'; |
| 286 | 286 | } |
| 287 | - print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"] . '?' . $fieldid . '=' . $object->id . '" method="post" name="formextra">'; |
|
| 287 | + print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'?'.$fieldid.'='.$object->id.'" method="post" name="formextra">'; |
|
| 288 | 288 | print '<input type="hidden" name="action" value="update_extras">'; |
| 289 | 289 | print '<input type="hidden" name="attribute" value="'.$tmpkeyextra.'">'; |
| 290 | 290 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
@@ -211,10 +211,10 @@ discard block |
||
| 211 | 211 | if (!$error) { |
| 212 | 212 | $donation = new Don($db); |
| 213 | 213 | |
| 214 | - $donation->amount = (float) GETPOST('amount'); |
|
| 214 | + $donation->amount = (float) GETPOST('amount'); |
|
| 215 | 215 | $donation->status = Don::STATUS_DRAFT; |
| 216 | 216 | $donation->public = $public; |
| 217 | - $donation->date = dol_now(); |
|
| 217 | + $donation->date = dol_now(); |
|
| 218 | 218 | $donation->firstname = GETPOST('firstname'); |
| 219 | 219 | $donation->lastname = GETPOST('lastname'); |
| 220 | 220 | $donation->company = GETPOST('societe'); |
@@ -397,8 +397,8 @@ discard block |
||
| 397 | 397 | // Add a specific style or table head for the project row |
| 398 | 398 | if ((isModEnabled('project') || isModEnabled('eventorganization')) && !empty($projectTitle)) { |
| 399 | 399 | print '<tr>'; |
| 400 | - print '<td class="project-label">' . $langs->trans("project") . '</td>'; |
|
| 401 | - print '<td class="project-value">' . dol_escape_htmltag($projectTitle) . '</td>'; |
|
| 400 | + print '<td class="project-label">'.$langs->trans("project").'</td>'; |
|
| 401 | + print '<td class="project-value">'.dol_escape_htmltag($projectTitle).'</td>'; |
|
| 402 | 402 | print '</tr>'; |
| 403 | 403 | } |
| 404 | 404 | |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | // Other attributes |
| 487 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 487 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 488 | 488 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
| 489 | 489 | |
| 490 | 490 | print '<tr id="trseparator"><td colspan="2"><hr></td></tr>'; |