diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index d6dc0cf58c1a797cfabf35f248975a1e855fd8c4..ac7e7169fd15e01af8209347d62b99f238cd2310 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -288,7 +288,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) dol_fiche_head(); if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 5da8aa6c55a080f43fade38ade7115cc391278c3..48a0cc7bd2cf08b43065c624d5e45bc0653ac284 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -370,7 +370,7 @@ if ($resql) }*/ // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'."\n"; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 3f251e0090b68492badd2743de81747e1df01598..9e16c81dcd5d844d8e923d82c87559d910641092 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -62,7 +62,7 @@ if (! $sortorder) $sortorder = "ASC"; if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 25e49c76745dc54472a5715c2fc2a4c2cea80095..5a875cbba2aa6b3cb0b70a567d83646ad18415de 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -162,12 +162,12 @@ if ($action == 'create') { // Date start print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>'; - print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); + print Form::select_date(($date_start ? $date_start : ''), 'fiscalyear'); print '</td></tr>'; // Date end print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>'; - print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); + print Form::select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); print '</td></tr>'; // Statut @@ -216,12 +216,12 @@ if ($action == 'create') { // Date start print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>'; - print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print Form::select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); print '</td></tr>'; // Date end print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>'; - print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print Form::select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); print '</td></tr>'; // Statut @@ -245,7 +245,7 @@ if ($action == 'create') { * Confirm delete */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); } dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); @@ -263,23 +263,23 @@ if ($action == 'create') { // Label print '<tr><td valign="top">'; - print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print '</td><td colspan="2">'; - print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print "</td></tr>"; // Date start print '<tr><td>'; - print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print '</td><td colspan="2">'; - print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print '</td></tr>'; // Date end print '<tr><td>'; - print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print '</td><td colspan="2">'; - print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print '</td></tr>'; // Statut diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 3e4b69d6624ae637b6b7970b72a22ac7ede56083..3de3e9849e918e1e82c3e07c65f76572273f088e 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -161,9 +161,9 @@ else { print '<div class="liste_titre">'; print $langs->trans('DateStart') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::select_date($search_date_start, 'date_start', 0, 0, 1); print $langs->trans('DateEnd') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::select_date($search_date_end, 'date_end', 0, 0, 1); print '</div>'; print '<table class="noborder" width="100%">'; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index e49c5536979d73b7087ec418f32a643718e134e6..3629a8453df034e79de752828d3a0d5e4a164e6d 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -203,7 +203,7 @@ $formventilation = new FormVentilation($db); * Confirmation to delete the command */ if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -248,7 +248,7 @@ if ($action == 'create') { print '<tr>'; print '<td>' . $langs->trans("Docdate") . '</td>'; print '<td>'; - print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); + print Form::select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '</td>'; print '</tr>'; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b507c4dfffa672701082264e14797d434af8c392..01e14273461a3017b9f7a8b625102255560810e4 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -340,7 +340,7 @@ else { } if ($action == 'delmouv') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { @@ -361,7 +361,7 @@ else { 'default' => $delyear ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); print $formconfirm; } @@ -394,10 +394,10 @@ else { print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>'; print '<td class="liste_titre">'; print $langs->trans('From') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::select_date($search_date_start, 'date_start', 0, 0, 1); print '<br>'; print $langs->trans('To') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::select_date($search_date_end, 'date_end', 0, 0, 1); print '</td>'; print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>'; print '<td>'; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index 10640c1887ab1722b4a2cd47d14ff527999452bf..7e2aec72f1e01bcbd8e5502c840f7961540f6040 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">'; print '<div class="liste_titre">'; print $langs->trans('DateStart') . ': '; -print $form->select_date($search_date_start, 'date_start'); +print Form::select_date($search_date_start, 'date_start'); print $langs->trans('DateEnd') . ': '; -print $form->select_date($search_date_end, 'date_end'); +print Form::select_date($search_date_end, 'date_end'); print '</div>'; print '<div class="liste_titre">'; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; @@ -220,7 +220,7 @@ print '<input type="text" size=7 class="flat" name="search_doc_type" value="' . print '</td>'; print '<td class="liste_titre">'; -print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); +print Form::select_date($search_doc_date, 'doc_date', 0, 0, 1); print '</td>'; print '<td class="liste_titre">'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index f995b2684ee9d2c02e1b144ef0e479473839d256..aec871ac33f2f099fc41fdb9edd3adf89747dea3 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -541,7 +541,7 @@ else { $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); $builddate = time(); $description = $langs->trans("DescFinanceJournal") . '<br>'; - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 8281159818824f9bc2fbce396c99d7fa9a5180cf..f9c7f54308b6b24c6ad496c27e253140ba048b10 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -403,7 +403,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreIncluded"); } - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 670875ec52bf4413b6e4cf066e96ca85ef28b247..f70a7b261a09420d645b3acfaa12fd6be4dd3983 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -418,7 +418,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreNotIncluded"); else $description .= $langs->trans("DepositsAreIncluded"); - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index ade361fdd51786781507f16ff539a4fedea5524a..5ced4aa5f84a81e0eae0940433f715352a0e85dd 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -221,7 +221,7 @@ if ($result) { print '<td class="liste_titre" align="center"><input type="text" class="flat" size="15" name="search_account" value="' . $search_account . '"></td>'; print '<td class="liste_titre" colspan="2"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 564cc4edaf568ddd68ff1e5d59b2a46d10502e7a..cc91fe6cad94330dfc0bb1b2923b63ab205a0c69 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -134,7 +134,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">'; print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>'; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); print '</td><td align="center" width="80">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print "</td></tr>\n"; @@ -147,7 +147,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="constname" value="ADHERENT_MAIL_REQUIRED">'; print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentMailRequired").'</td><td>'; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); print '</td><td align="center" width="80">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print "</td></tr>\n"; @@ -160,7 +160,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="constname" value="ADHERENT_DEFAULT_SENDINFOBYMAIL">'; print '<tr '.$bc[$var].'><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>'; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); print '</td><td align="center" width="80">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print "</td></tr>\n"; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index c55469459a93222659203479174275efed997ce4..a6419883b536a46ecc6361ee1a06c13e1b5b1d9b 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -149,7 +149,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<tr '.$bc[$var].'><td>'; print $langs->trans("EnablePublicSubscriptionForm"); print '</td><td align="right">'; -print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); +print Form::selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); print "</td></tr>\n"; // Type @@ -158,7 +158,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<tr '.$bc[$var].' class="drag"><td>'; print $langs->trans("EnablePublicSubscriptionForm"); print '</td><td width="60" align="center">'; -print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); +print Form::selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); print "</td></tr>\n"; */ // Amount @@ -176,7 +176,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<tr '.$bc[$var].' id="tredit"><td>'; print $langs->trans("CanEditAmount"); print '</td><td align="right">'; -print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); +print Form::selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); print "</td></tr>\n"; if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index fd1bc79926e72e190a8e4048e19eea8f95c05c93..f76caaec0334d2773d5bd71a02f4cea8f1ba8adc 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -338,7 +338,7 @@ abstract class ActionsAdherentCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -385,7 +385,7 @@ abstract class ActionsAdherentCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 7e0b12919980de6bd5768d425e0a8424cb2396ad..702438a9f684a6f3fa647da5172bc136c1aea6c2 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -108,7 +108,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->adherent->supprimer) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); } } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 9ce04013fbe11bc7ce4fed54d8f69b80a74ca4d9..a926d96b2fe26eafb1e21f843fde33a0cafcd96d 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -900,12 +900,12 @@ else // Birthday print "<tr><td>".$langs->trans("Birthday")."</td><td>\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "</td></tr>\n"; // Public profil print "<tr><td>".$langs->trans("Public")."</td><td>\n"; - print $form->selectyesno("public",$object->public,1); + print Form::selectyesno("public",$object->public,1); print "</td></tr>\n"; // Categories @@ -1154,12 +1154,12 @@ else // Birthday print "<tr><td>".$langs->trans("Birthday")."</td><td>\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "</td></tr>\n"; // Public profil print "<tr><td>".$langs->trans("Public")."</td><td>\n"; - print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); + print Form::selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); print "</td></tr>\n"; // Categories @@ -1278,7 +1278,7 @@ else if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } // Confirm create third party @@ -1297,7 +1297,7 @@ else // Create a form array $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } // Confirm validate member @@ -1333,13 +1333,13 @@ else if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); } // Confirm send card by mail if ($action == 'sendinfo') { - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); } // Confirm terminate @@ -1370,7 +1370,7 @@ else $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); } // Confirm remove member @@ -1378,7 +1378,7 @@ else { $formquestion=array(); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } /* @@ -1386,7 +1386,7 @@ else */ if ($action == 'add_spip') { - print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); + print Form::formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } /* @@ -1394,7 +1394,7 @@ else */ if ($action == 'del_spip') { - print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); + print Form::formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); } $rowspan=17; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9563f29d51fbb046c9a7b6756786403e202e643e..2e39e43bc660e0a8b60dd6d4b836842ece1ad233 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -929,7 +929,7 @@ if ($rowid > 0) // Create a form array $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } @@ -974,7 +974,7 @@ if ($rowid > 0) $datefrom=$object->datevalid; } } - print $form->select_date($datefrom,'','','','',"cotisation",1,1,1); + print Form::select_date($datefrom,'','','','',"cotisation",1,1,1); print "</td></tr>"; // Date end subscription @@ -987,7 +987,7 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td>'; - print $form->select_date($dateto,'end','','','',"cotisation",1,0,1); + print Form::select_date($dateto,'end','','','',"cotisation",1,0,1); print "</td></tr>"; if ($adht->cotisation) @@ -1088,7 +1088,7 @@ if ($rowid > 0) // Date of payment print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; - print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); + print Form::select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); print "</td></tr>\n"; print '<tr class="bankswitchclass2"><td>'.$langs->trans('Numero'); diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 301664fab833f9e3b333163bb5206f8562d4b6f7..5f3196521820419330c9a3922fd7456cc5ddf9e9 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -200,7 +200,7 @@ if ($result) // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 6b980a4df1cec555d991a01e7c148054d423d7ce..4fbf65d6128fdd526080fc9eb3ca7cbe382f91e2 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -196,7 +196,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td class="valeur" colspan="3">'; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '</td></tr>'; // Member @@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Date start subscription print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">'; - $form->select_date($subscription->dateh,'datesub',1,1,0,'update',1); + Form::select_date($subscription->dateh,'datesub',1,1,0,'update',1); print '</td>'; print '</tr>'; // Date end subscription print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="2">'; - $form->select_date($subscription->datef,'datesubend',0,0,0,'update',1); + Form::select_date($subscription->datef,'datesubend',0,0,0,'update',1); print '</td>'; print '</tr>'; @@ -295,7 +295,7 @@ if ($rowid && $action != 'edit') //$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>'; $text=$langs->trans("ConfirmDeleteSubscription"); if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); } print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; @@ -307,7 +307,7 @@ if ($rowid && $action != 'edit') // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td class="valeur" colspan="3">'; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '</td></tr>'; // Member diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 403cc3971f317dbb4584016a5f8ea62e8d9b3eb6..b6c07676bad3d7cdeffc1d7d0a4566b000a56262 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -287,7 +287,7 @@ if ($resql) // Action column print '<td class="liste_titre" colspan="2" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index f46b6d0268c77e3a4a21d75ba484dda420543aa7..a8c59995bf4d6bbc212ee296895a2833bb6479da 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -236,11 +236,11 @@ if ($action == 'create') print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>'; print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; - print $form->selectyesno("cotisation",1,1); + print Form::selectyesno("cotisation",1,1); print '</td></tr>'; print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>'; - print $form->selectyesno("vote",0,1); + print Form::selectyesno("vote",0,1); print '</td></tr>'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>'; @@ -297,7 +297,7 @@ if ($rowid > 0) // Ref print '<tr><td width="15%">'.$langs->trans("Ref").'</td>'; print '<td>'; - print $form->showrefnav($object, 'rowid', $linkback); + print Form::showrefnav($object, 'rowid', $linkback); print '</td></tr>'; // Label @@ -634,11 +634,11 @@ if ($rowid > 0) print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40" value="'.dol_escape_htmltag($object->libelle).'"></td></tr>'; print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; - print $form->selectyesno("cotisation",$object->cotisation,1); + print Form::selectyesno("cotisation",$object->cotisation,1); print '</td></tr>'; print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>'; - print $form->selectyesno("vote",$object->vote,1); + print Form::selectyesno("vote",$object->vote,1); print '</td></tr>'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>'; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 71de81958b9042a2f78d2f9b0a11ac3e23001eef..0d5fd409b4968c99434a05a5794fa3daf42a1f7a 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -472,7 +472,7 @@ print '</tr>'; if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>'; - print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); + print Form::selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); print '</td>'; print '</tr>'; } diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index a77fb706a71de6ef419fc485c6b0feef6d8d5843..1bba473b374ccf18907853e8819c962dcecf29b1 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -83,7 +83,7 @@ print "</tr>\n"; $var=!$var; print '<tr '.$bc[$var].'><td>'; print $langs->trans("ClickToDialUseTelLink").'</td><td>'; -print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'<br>'; +print Form::selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'<br>'; print '<br>'; print $langs->trans("ClickToDialUseTelLinkDesc"); print '</td></tr>'; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 14332ceee6306123d97619686e754653460cfb5f..984480a3cef0c6ba4a943c24a955ba4bd700ce9f 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -184,7 +184,7 @@ if ($action == 'edit') $var=false; print '<tr '.$bc[$var].'>'; - print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '</td></tr>'; + print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .Form::selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '</td></tr>'; print '</table>'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 6a02c8516311c2b2e8a14657eb4350a8a5b39e9f..bee98d607a3f6919a24b449ab47081e8b8ebf4f5 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -850,7 +850,7 @@ print "<br>\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -1570,7 +1570,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') { print '<td>'; - print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); + print Form::selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); print '</td>'; } elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) { diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 74164bce35c83666287df87ff8d1b3751c15d2bc..ca1ce3e324ee969192c4e729a038be3b64381408 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -744,7 +744,7 @@ print '<input type="hidden" name="action" value="setforcedate" />'; print '<tr '.$bc[$var].'><td>'; print $langs->trans("ForceInvoiceDate"); print '</td><td width="60" align="center">'; -print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); +print Form::selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); print '</td><td align="right">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />'; print "</td></tr>\n"; @@ -758,7 +758,7 @@ print '<input type="hidden" name="action" value="set_FAC_AUTO_FILLJS" />'; print '<tr '.$bc[$var].'><td>'; print $langs->trans("JSOnPaimentBill"); print '</td><td width="60" align="center">'; -print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); +print Form::selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); print '</td><td align="right">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />'; print "</td></tr>\n"; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 331ff97a6ffc7f28d3c33a00480b242e29cce626..b6c928d5fd373bf85ce7f7b1c3957b7df212bd8a 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -170,7 +170,7 @@ if ($action == 'edit') // Edit // Multilangual GUI $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>'; - print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); + print Form::selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -191,7 +191,7 @@ if ($action == 'edit') // Edit { $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">'; - print $form->selectyesno($searchform[$key],$searchformconst[$key],1); + print Form::selectyesno($searchform[$key],$searchformconst[$key],1); print '</td></tr>'; } print '</table>'; @@ -207,7 +207,7 @@ if ($action == 'edit') // Edit // Show logo $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableShowLogo").'</td><td>'; - print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); + print Form::selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -227,7 +227,7 @@ if ($action == 'edit') // Edit // Disable javascript and ajax $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>'; - print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); + print Form::selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -237,7 +237,7 @@ if ($action == 'edit') // Edit { $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>'; - print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print Form::selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -279,7 +279,7 @@ if ($action == 'edit') // Edit // Hide unauthorized button $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>'; - print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); + print Form::selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -287,7 +287,7 @@ if ($action == 'edit') // Edit // Hide helpcenter link on login page $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>'; - print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -295,7 +295,7 @@ if ($action == 'edit') // Edit // Hide wiki link on login page $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>'; - print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; @@ -303,7 +303,7 @@ if ($action == 'edit') // Edit // Show bugtrack link $var=!$var; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>'; - print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print Form::selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); print '</td>'; print '<td width="20"> </td>'; print '</tr>'; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 7ea89c05757dcd98d9bd728cae14e4aaad160462..d327c2868037af362ae9bf64d910dc5bd0748e17 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -343,7 +343,7 @@ if ($action == 'edit') // Disable $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>'; - print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print '</td></tr>'; // Separator @@ -482,7 +482,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -496,7 +496,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 7da0673b196f196920fffda0ee6160da6071fe31..15b47d5efe820c0821b912782343b53acd91e210 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -249,7 +249,7 @@ if ($action == 'delete') $result = $db->query($sql); $obj = $db->fetch_object($result); - print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); + print Form::formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); } diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 7ff0a5fb358f48b109e4013e68a5e8dc1106a816..918b3d0b5d7b257467bf48050e30e32bc5836197 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -173,7 +173,7 @@ print '<td align="right" width="400">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_RATE_ON_INVOICE_DATE">'; -print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); +print Form::selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print '</td></tr>'; @@ -186,7 +186,7 @@ print '<td align="right" width="400">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_ORIGIN_TX">'; -print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); +print Form::selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print '</td></tr>'; @@ -199,7 +199,7 @@ print '<td align="right" width="400">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="set_MULTICURRENCY_BUY_PRICE_IN_CURRENCY">'; -print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); +print Form::selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print '</td></tr>'; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index c6564d3f4503811e7b09c5d7a1c7ec9d7f378340..e65f74376bbb79de0fe540607eb426572b93c2d6 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -139,7 +139,7 @@ if ($action == 'edit') // Edit // Hide VAT Intra on address $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td>'; - print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print Form::selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); print '</td></tr>'; // Show prof id 1 in address into pdf @@ -156,7 +156,7 @@ if ($action == 'edit') // Edit if ($pid1) { print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>'; - print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); print '</td></tr>'; } @@ -174,7 +174,7 @@ if ($action == 'edit') // Edit if ($pid2) { print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>'; - print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); print '</td></tr>'; } @@ -192,7 +192,7 @@ if ($action == 'edit') // Edit if ($pid3) { print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>'; - print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); print '</td></tr>'; } @@ -210,7 +210,7 @@ if ($action == 'edit') // Edit if ($pid4) { print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>'; - print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); print '</td></tr>'; } @@ -227,31 +227,31 @@ if ($action == 'edit') // Edit // Hide any PDF informations $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>'; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print '</td></tr>'; //Desc $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDescOnPDF").'</td><td>'; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); print '</td></tr>'; //Ref $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("HideRefOnPDF").'</td><td>'; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); print '</td></tr>'; //Details $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDetailsOnPDF").'</td><td>'; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print '</td></tr>'; // Place customer adress to the ISO location $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("PlaceCustomerAddressToIsoLocation").'</td><td>'; - print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); + print Form::selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); print '</td></tr>'; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 54868b03c9b42b821b28d88c8feb61291ed101c0..dfa084357a2ee5bea80f2ad8b0d96c66d86f8c54 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -565,7 +565,7 @@ print '<input type="hidden" name="action" value="setusecustomercontactasrecipien print '<tr '.$bc[$var].'><td>'; print $langs->trans("UseCustomerContactAsPropalRecipientIfExist"); print '</td><td width="60" align="center">'; -print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); +print Form::selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); print '</td><td align="right">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print "</td></tr>\n"; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 1f6e45223b48b14cc894cfd14c0dbe02f39a0cea..1a9eebcaf70e4be673428b8b68f8b07222fe4e14 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -158,7 +158,7 @@ print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("MAIN_PROXY_USE").'</td><td align="right">'; print '</td>'; print '<td class="nowrap">'; -print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); +print Form::selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); print '</td>'; print '</tr>'; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index b1d8cd480a25ac6fe0bdcd200596527d7191751f..672a94151ee38ac6519bad804134b82818996dea 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -177,7 +177,7 @@ if ($action == 'edit') // Disable $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'; - print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print '</td></tr>'; // Separator diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 98ff43360a8d2c732900be8f6bda73a65f26eb56..8613c99e04a248aad8fe7dbdb74f15bca04fe4dc 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -150,7 +150,7 @@ if (! empty($conf->facture->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -170,7 +170,7 @@ if (! empty($conf->commande->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -192,7 +192,7 @@ if (! empty($conf->expedition->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -234,7 +234,7 @@ if (! empty($conf->fournisseur->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -255,7 +255,7 @@ if (! empty($conf->fournisseur->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled)) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">"; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>'; print "</form>\n"; } @@ -314,7 +314,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_INVOICE\">"; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; @@ -329,7 +329,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_ORDER\">"; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; @@ -344,7 +344,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT\">"; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; @@ -373,7 +373,7 @@ if ($virtualdiffersfromphysical) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USE_VIRTUAL_STOCK\">"; - print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); + print Form::selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; @@ -399,7 +399,7 @@ print '<td width="160" align="right">'; print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USERSTOCK_AUTOCREATE\">"; -print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); +print Form::selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; @@ -419,7 +419,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS) print "<form method=\"post\" action=\"stock.php\">"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print "<input type=\"hidden\" name=\"action\" value=\"INDEPENDANT_SUBPRODUCT_STOCK\">"; - print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); + print Form::selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print "</td>\n"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index ffe6e81af3fe5bd97a7bd8ca2ddd7f75b07155f8..6b22ce0dc3fb49ca38d559d6ee721cc637904f32 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -180,7 +180,7 @@ if ($result) if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); } print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'; @@ -198,7 +198,7 @@ if ($result) // Lignes des champs de filtres print '<tr class="liste_titre">'; - print '<td class="liste_titre" width="15%">'.$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).$form->select_date($date_end,'date_end',0,0,0,'',1,0,1).'</td>'; + print '<td class="liste_titre" width="15%">'.Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).Form::select_date($date_end,'date_end',0,0,0,'',1,0,1).'</td>'; print '<td align="left" class="liste_titre">'; print '<input class="flat" type="text" size="10" name="search_code" value="'.$search_code.'">'; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 6dee42be6ac0ee771ba8fdc9140b8aa7a59b22f7..1b88edbb9dcb1355ae840c73ebf6a9c88d61cd37 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -116,12 +116,12 @@ print '<br>'; if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } else if ($action == 'lock') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); } if ($savehandler == 'files') diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 170c37a79bf1098ec359d6c56a0da33e50ed9a52..f0e62f659982cdff1a0b7613bb367cd0a8812334 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -108,7 +108,7 @@ if (preg_match('/^confirm/i',$choice)) { print '<br>'; $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); } diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index f7b29607bd4bf7356a89972c3ca0346e32368ae9..d2e62a5d57f3f5c5af3bb372fe9a7d6147b20b56 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -321,7 +321,7 @@ print "<br>\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); } //var_dump($elementList); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index de60e8b80cf722a9d6b70a3a01b82d70ef3cb828..c6c7548b851933af3dbc8fe868239a7aa37071d7 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -132,7 +132,7 @@ if (! empty($conf->stock->enabled)) print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value) print '<td colspan="2">'; if (empty($conf->productbatch->enabled)) { - print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); + print Form::selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); } else { @@ -166,7 +166,7 @@ if (! empty($conf->service->enabled)) print '<tr '.$bc[$var].'><td>'; print $langs->trans("CashdeskShowServices"); print '<td colspan="2">'; - print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); + print Form::selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); print "</td></tr>\n"; } @@ -177,7 +177,7 @@ if (! empty($conf->receiptprinter->enabled)) print '<tr '.$bc[$var].'><td>'; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print '<td colspan="2">'; - print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); + print Form::selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); print "</td></tr>\n"; } diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index ecb11c3e6ee3e8fa3a94c9a8e1a5dbdd3dfc55a4..7c44898717f91e2737b24433684a48ace20c9507 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -204,7 +204,7 @@ $langs->load("cashdesk"); <input class="button bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="javascript: verifClic('DIF');" /> <?php print $langs->trans("DateEcheance").' :'; - print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); + print Form::select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); print '</div>'; ?> </div> diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index e8ea62f560771957a2b8852ac444d4cca4ae1e1a..ef159b7954c97ae1e482dd2a31321e01e9fb84d3 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -248,7 +248,7 @@ if ($socid) print '<table class="border" width="100%">'; print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">'; - print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); + print Form::showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); print '</td></tr>'; // Alias names (commercial, trademark or alias names) @@ -358,7 +358,7 @@ else if ($id || $ref) // Ref print "<tr>"; print '<td width="15%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($product,'ref','',1,'ref'); + print Form::showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; @@ -418,7 +418,7 @@ else if ($id || $ref) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td class="valeur">'; - print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); + print Form::showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print '</td></tr>'; // Login @@ -492,7 +492,7 @@ else if ($id || $ref) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td class="valeur">'; - print $form->showrefnav($object,'rowid'); + print Form::showrefnav($object,'rowid'); print '</td></tr>'; // Name diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index f3a84eed5d5eb9f54f7176ec2c3191a424ea703d..6560c0a6ed6a4e351cd335f2fb951ad7052c2eb4 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -108,7 +108,7 @@ if ($object->id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); } print($mesg); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a1486ff344ff9707a7bdbd3f84a87effe3b0c587..a72f8a803f3272f45b6b30034d958dd4d5593946 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -182,7 +182,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category'); if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); } print '<table border="0" width="100%" class="border">'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index fa12c1c6b3b0c071296c0a0b280a6710e1c6579f..2b7d7bea1538c9e360a615f8359e8ef40b747d18 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -665,9 +665,9 @@ if ($action == 'create') $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>'; - if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '</td></tr>'; // Date end @@ -678,9 +678,9 @@ if ($action == 'create') $datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); } print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>'; - if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '</td></tr>'; // Status @@ -893,7 +893,7 @@ if ($id > 0) // Confirmation suppression action if ($action == 'delete') { - print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); + print Form::formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); } if ($action == 'edit') @@ -955,16 +955,16 @@ if ($id > 0) // Date start print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td colspan="3">'; - if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); + else if (GETPOST("afaire") == 2) Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + else Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '</td></tr>'; // Date end print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">'; - if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - //else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); - else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + //else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); + else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '</td></tr>'; $userepeatevent=0; // Dev in progress @@ -1168,7 +1168,7 @@ if ($id > 0) // Clone event if($action == 'clone') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); print $formconfirm; } @@ -1180,7 +1180,7 @@ if ($id > 0) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '</td></tr>'; // Type diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 992c23144462c385264049a9acc791f0d81ae41d..349a94511ed7b036fb4e2eb1877f24cde6d89fb1 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -130,7 +130,7 @@ if ($object->id > 0) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '</td></tr>'; // Type diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index ed8227a1cb8431ed83397abacb055668bb679371..145ff7331ddd231435fffc9a92ffbfaabe3ce15c 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -142,7 +142,7 @@ $form=new Form($db); $userstatic=new User($db); $nav=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $now=dol_now(); @@ -320,10 +320,10 @@ if ($resql) //print '<td class="liste_titre"><input type="text" name="search_type" value="'.$search_type.'"></td>'; } print '<td class="liste_titre" align="center">'; - print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); + print Form::select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print '</td>'; print '<td class="liste_titre" align="center">'; - print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); + print Form::select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); print '</td>'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 28a531c6b28fbfaf5bfc39435375e669502eaefa..a3242b8bb3d54b1b441871d877e03153815f2b89 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -261,7 +261,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">'; $nav.='<input type="hidden" name="end_d" value="' . $end_d . '">'; $nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">'; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav.='</form>'; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 621d3ada57ab8501c14599cd4442011a1d7dc6d4..35df5053c1578963d3d70ba12808497b3c3172cb 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -264,7 +264,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">'; $nav.='<input type="hidden" name="end_d" value="' . $end_d . '">'; $nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">'; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav.='</form>'; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index edb5042e358d242c6c6ec96aa26e92bf1ed95796..18341fbeaef40fc997b510fac142129131532914 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -413,7 +413,7 @@ else // Confirmation delete if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); + print Form::formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); } $nblines = count($object->lines); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3988a986f674f222321981d130b3375245d08eef..a687b9a814d3005b3a75301c48537c8eb9c9bb82 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -255,9 +255,9 @@ if ($id > 0) print '<tr>'; print '<td>'; - print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print '</td><td colspan="3">'; - print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print '</td>'; print '</tr>'; } @@ -371,10 +371,10 @@ if ($id > 0) { print '<tr>'; print '<td>'; - print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); + print Form::editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); print '</td><td colspan="3">'; $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; - print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); + print Form::editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); print '</td>'; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 6960a9ced334e7e3bffc91a90d16b486d228b53c..d79ca327990fc6174d5ea6e8bc84ff616ccb0ad5 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -726,17 +726,17 @@ else // Confirmation de la validation du mailing if ($action == 'valid') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset else if ($action == 'reset') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete else if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -783,7 +783,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'<br>'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); } } @@ -793,22 +793,22 @@ else print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '</td></tr>'; // Description - print '<tr><td>'.$form->editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; - print $form->editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '<tr><td>'.Form::editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; + print Form::editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '</td></tr>'; // From - print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; - print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '<tr><td>'.Form::editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; + print Form::editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '</td></tr>'; // Errors to - print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; - print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '<tr><td>'.Form::editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; + print Form::editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '</td></tr>'; // Status @@ -864,7 +864,7 @@ else array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0) ); // Paiement incomplet. On demande si motif = escompte ou autre - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); } /* diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index a992ed73fd256af79d58a9ddcc0fa20ab9cd2f12..83cff6849195be5ec9a9df00fbfbd2ca5bd49387 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -184,7 +184,7 @@ if ($object->fetch($id) >= 0) print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '</td></tr>'; print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>'; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 7ff42a737b4ddfc996b5fa64ab85bef2c08510b1..11e5cddfbad78bd60a1fce12fd6d6aa69758c4a7 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1368,7 +1368,7 @@ if ($action == 'create') // Date print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; - $form->select_date('', '', '', '', '', "addprop", 1, 1); + Form::select_date('', '', '', '', '', "addprop", 1, 1); print '</td></tr>'; // Validaty duration @@ -1416,9 +1416,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); + Form::select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); } else { - $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); + Form::select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print '</td></tr>'; @@ -1671,22 +1671,22 @@ if ($action == 'create') // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen else if ($action == 'reopen') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line else if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal @@ -1714,7 +1714,7 @@ if ($action == 'create') } if (! $error) - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1733,7 +1733,7 @@ if ($action == 'create') // Ref print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Ref customer @@ -1804,7 +1804,7 @@ if ($action == 'create') print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="action" value="setdate">'; - $form->select_date($object->date, 're', '', '', 0, "editdate"); + Form::select_date($object->date, 're', '', '', 0, "editdate"); print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; print '</form>'; } else { @@ -1830,7 +1830,7 @@ if ($action == 'create') print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="action" value="setecheance">'; - $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); + Form::select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; print '</form>'; } else { @@ -1865,9 +1865,9 @@ if ($action == 'create') // Delivery date $langs->load('deliveries'); print '<tr><td>'; - print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); + print Form::editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); print '</td><td colspan="5">'; - print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); + print Form::editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); print '</td>'; print '</tr>'; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index cdeacefafe18983d51f30f0b3b3a8d45f38b27a8..d3373ff92d8c5f29583473aae86e5498f16c2bea 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -73,7 +73,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Ref client diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 544c5ab27e3b60f51c1cd29179155f987a620054..d85768170d040db2406ab6d079c988f36401030a 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -161,7 +161,7 @@ if ($object->id > 0) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; // Ref client diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index af603d0606b3f31b27b69a290d6dab35f08de5f0..858e4e1c34bb8e6dba66f4c0473896f22c56d89d 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -106,7 +106,7 @@ if ($object->id > 0) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; // Ref client diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 1e5ace7353ed6836a1c0bc87d06b9e737b4cb51a..cff7e9c313e8a7cb0b49ecc9b5790101a10a5205 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; // Ref client diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 07989b457dea67b5d90e8f4590d833cbc8ed1fe5..a9445743e0ea1060aa9f0dc7af5e48f4974791d0 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -296,7 +296,7 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 1ec3a0533cc28652ecd973c11521f85df51792b1..712ef0fbc86ae69d29cf51fed04d6dd2870ed15c 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -70,7 +70,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Ref cde client diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 37fdf8aa7a497ef63b554dcc09e064205bb5713e..058a68d380360d5403216a4a169c9e16a953735b 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer) } // Date print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; - $form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date + Form::select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print '</td></tr>'; // Delivery date planed @@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:''; } - $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); + Form::select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print "</td></tr>"; // Conditions de reglement @@ -1775,7 +1775,7 @@ if ($action == 'create' && $user->rights->commande->creer) * Confirmation de la suppression de la commande */ if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } /* @@ -1825,7 +1825,7 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } // Confirm back to draft status @@ -1857,14 +1857,14 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } /* * Confirmation de la cloture */ if ($action == 'shipped') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } /* @@ -1898,13 +1898,13 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); } // Confirmation to delete line if ($action == 'ask_deleteline') { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm=Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -1918,7 +1918,7 @@ if ($action == 'create' && $user->rights->commande->creer) // => 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -1951,7 +1951,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Ref print '<tr><td width="18%">' . $langs->trans('Ref') . '</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; @@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="action" value="setdate">'; - $form->select_date($object->date, 'order_', '', '', '', "setdate"); + Form::select_date($object->date, 'order_', '', '', '', "setdate"); print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; print '</form>'; } else { @@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="action" value="setdate_livraison">'; - $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + Form::select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; print '</form>'; } else { diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index c72e040e61c66ec888e3d37e220c53cc91d8e133..53fcd5d9a570006c591b9345c916175f17e1a9e8 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "</td></tr>"; // Ref commande client diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2d9c80e9d2d87835c9d326d68b02502c9502bb84..1c4c7b8b8cba21a206a45238b3c33f094b63e3f0 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>'; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 692d189e457055df12a4ce655a0596ee11037bce..fff1434e0fca447025113075d53f4624feaa57dc 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -403,11 +403,11 @@ if ($resql) if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print '<td align="center">'; - print $form->selectyesno('billed', $billed, 1, 0, 1); + print Form::selectyesno('billed', $billed, 1, 0, 1); print '</td>'; } print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6f3519e9ced93cbb338ca794ddc6c863d7cb02fc..17ca75b8e80fbbfd16664dbee5db7fa7239af221 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "</td></tr>"; // Ref commande client diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index a482b2b480c63d778d6bf75dddd8d672574e7a4b..07fe4af60153124dcf50c5790b629bc342889e9d 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -427,7 +427,7 @@ if ($action == 'create' && !$error) // Date invoice print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">'; - $html->select_date('','','','','',"add",1,1); + Form::select_date('','','','','',"add",1,1); print '</td></tr>'; // Payment term print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">'; @@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); - $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,1,'',1,0,1); + $periodely=Form::select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); if (! empty($socid)) { diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index b1bf6cd42702c1fae8d152306345b7e1c9ad0aa0..847795df1a44510e24b83e37ce810e391023b80e 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print '</td></tr>'; // Label @@ -404,7 +404,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteTransaction'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); } @@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref)) print '<tr '.$bc[false].'>'; print '<td class="nowrap" colspan="2">'; - $form->select_date($dateop,'op',0,0,0,'transaction'); + Form::select_date($dateop,'op',0,0,0,'transaction'); print '</td>'; print '<td class="nowrap">'; $form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1); @@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref)) print '<input type="hidden" name="action" value="search">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - $period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('From').' '.Form::select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); $period_filter .= ' '; - $period_filter .= $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('to').' '.Form::select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); print '<tr class="liste_titre">'; print '<td colspan="2">'.$period_filter.'</td>'; @@ -539,7 +539,7 @@ if ($id > 0 || ! empty($ref)) print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$req_credit.'" size="4"></td>'; print '<td align="center"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 7b53d775cb672ed29876df1b347894fe1bd64456..97edaf5446f0860b56f2505e127279c4b0ba7382 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -150,7 +150,7 @@ if ($_GET["account"]) { if (! preg_match('/,/', $id)) { - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); } else { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 420fc2e468763263a9bac6f1703aade84ade97c0..d69db934899ce51177c8e18b201b0b9e70fd53de 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -365,7 +365,7 @@ if ($action == 'create') print '<tr><td>'.$langs->trans("Date").'</td>'; print '<td colspan="3">'; - $form->select_date('', 're', 0, 0, 0, 'formsoc'); + Form::select_date('', 're', 0, 0, 0, 'formsoc'); print '</td></tr>'; print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>'; @@ -558,7 +558,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); } @@ -569,7 +569,7 @@ else // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($account, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($account, 'ref', $linkback, 1, 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 3b6957df40f44273875899dd963140ca4b316b80..151257a6535526da4eac4d5ed423d7e79e100a43 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) { // Ref print '<tr><td valign="top" width="25%">' . $langs->trans("Ref") . '</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', '', 1, 'ref'); + print Form::showrefnav($object, 'ref', '', 1, 'ref'); print '</td></tr>'; // Label @@ -200,7 +200,7 @@ if ($id > 0 || !empty($ref)) { * Confirmation suppression fichier */ if ($action == 'delete') { - $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), + $ret = $formForm::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 0764c87f5abf78c38e667f11fc1516f779b0b16e..fb8a823b96e5e60decd1a7331e30288cdd60d01d 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -770,7 +770,7 @@ if ($account) if ($_GET["option"]!='all') { $morehtml='<a href="'.$_SERVER["PHP_SELF"].'?account='.$account.'&option=all'.$moreparam.'">'.$langs->trans("ShowAllAccounts").'</a>'; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); } else { diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index a17614238be337e1ba06ee73744ce6842ee3ac24..7722713fce1c96fc5d18ba194e78a64d7775c8ee 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -259,7 +259,7 @@ if ($result) // Confirmations if ($action == 'delete_categ') { - print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); + print Form::formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); } @@ -276,7 +276,7 @@ if ($result) // Ref print '<tr><td width="20%">'.$langs->trans("Ref")."</td>"; print '<td colspan="4">'; - print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); + print Form::showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); print '</td>'; print '</tr>'; @@ -451,7 +451,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; - print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); + print Form::select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); print '</td>'; } else @@ -467,7 +467,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; - print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); + print Form::select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); if (! $objp->rappro) { print ' '; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 8ef53f26203db46475a006580769b12bc7224461..9cf6b3fe2afe0f3502d425f3396187627400343c 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -131,7 +131,7 @@ if (empty($num)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index f86ac81aa760723d7436bda4c227a3c938f55003..e56f776578e1371166e87bb41aea1531b837bbdd 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -191,9 +191,9 @@ if ($resql) $moreforfilter = ''; $moreforfilter.='<div class="divsearchfield">'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; - $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= Form::select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; - $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= $langs->trans('EndDate') . ' ' . Form::select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= '</div>'; if ($moreforfilter) @@ -238,7 +238,7 @@ if ($resql) print '</td>'; print '<td></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index db7f37cb3e50f71c53a321cdf5eb3d31389f1935..a60c470993d0ca2e6b47600db3f4d5e5a697e091 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -97,7 +97,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 146ed4759c406085c4dcdb3019d801f581142876..ca13059a0e429089041f2573c3c894f53d3e890d 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1); print "</td>\n"; print "<td>"; -$form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); +Form::select_date((! empty($dateo)?$dateo:''),'','','','','add'); print "</td>\n"; print '<td><input name="label" class="flat" type="text" size="40" value="'.$label.'"></td>'; print '<td><input name="amount" class="flat" type="text" size="8" value="'.$amount.'"></td>'; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 934c970accff0961fac9729d5e545be123b73b88..94bb70ca9a299b850bff9c0fb92004673db2ad72 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -262,7 +262,7 @@ if ($action == 'create') print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>'; - print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1); + print Form::select_date($datec?$datec:-1,'','','','','add',1,1,1); print '</td></tr>'; // Km @@ -358,7 +358,7 @@ else if ($id) // Date print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>'; - print $form->select_date($object->date,'',0,0,0,'update',1,0,1); + print Form::select_date($object->date,'',0,0,0,'update',1,0,1); print '</td></tr>'; // Km @@ -416,7 +416,7 @@ else if ($id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); } @@ -429,16 +429,16 @@ else if ($id) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '</td></tr>'; $form->load_cache_types_fees(); // Type print '<tr><td>'; - print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print '</td><td>'; - print $form->editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print '</td></tr>'; // Who @@ -450,16 +450,16 @@ else if ($id) // Date print '<tr><td>'; - print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print '</td><td>'; - print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print '</td></tr>'; // Km/Price print '<tr><td valign="top">'; - print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print '</td><td>'; - print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print "</td></tr>"; // Where diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index b6b1cbfa277dfbdec7eeda7372d9c3c08b453c49..80f49fec401a503bbda0759ea5eaaf361349ca1e 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '</td></tr>'; // Societe diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 497de98fa72637d892dc4607d8a28d1176141f3a..8767ca97961e52e29b093fbbe84255e1358df635 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -165,7 +165,7 @@ if ($resql) // print '<input class="flat" size="10" type="text" name="search_amount" value="'.$search_amount.'">'; print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b70caf8b667fcd04aee389ccff83adc74f22c61a..2c4442aa59592cce314630f1c8955a11421dfc58 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2354,7 +2354,7 @@ if ($action == 'create') // Date invoice print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); + print Form::select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); print '</td></tr>'; // Payment term @@ -2548,12 +2548,12 @@ if ($action == 'create') print '<td class="nobordernopadding nowrap">'; print $langs->trans('From') . ' '; print '</td><td class="nobordernopadding nowrap">'; - print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '</td></tr>'; print '<td class="nobordernopadding nowrap">'; print $langs->trans('to') . ' '; print '</td><td class="nobordernopadding nowrap">'; - print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '</td></tr></table>'; print '</td>'; } @@ -2664,7 +2664,7 @@ else if ($id > 0 || ! empty($ref)) // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { $text = $langs->trans('ConfirmConvertToReduc'); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Confirmation to delete invoice @@ -2692,9 +2692,9 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // => 1), array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); } } @@ -2758,7 +2758,7 @@ else if ($id > 0 || ! empty($ref)) { $text .= '<br>' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); } // Confirm back to draft status @@ -2795,12 +2795,12 @@ else if ($id > 0 || ! empty($ref)) array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value)); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); } // Confirmation du classement paye if ($action == 'paid' && $resteapayer <= 0) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } if ($action == 'paid' && $resteapayer > 0) { // Code @@ -2829,7 +2829,7 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); } // Confirmation du classement abandonne @@ -2860,13 +2860,13 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); } } // Confirmation de la suppression d'une ligne produit if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } // Clone confirmation @@ -2878,7 +2878,7 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) @@ -2910,7 +2910,7 @@ else if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print '</td></tr>'; // Ref customer @@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); + Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'daytext'); } @@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); + Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); if ($object->hasDelay()) { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 1250118f40e6d63bc1a8f02d2d4ee1d7eea83955..b94a686e891660351fca60423da0f3e12642c176 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print '</td></tr>'; // Ref customer diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index b07a8f8c2d46b2a68f644b137f44344a49e195fa..e6e474883f4197b27adc991b0b9191e296071ee8 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print '</td></tr>'; // Ref customer diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index e4f9846309a3b0110b3fdc9d9ae892da82830d00..18e0fac540a483a1546ec7a57c658930b188f041 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print '</td></tr>'; // Ref customer diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e44c9e96fb4ad96c768f5283fbe70cc343d78fd8..81fcd4e24a270b6152ce28f8789bdec87f54a653 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -349,7 +349,7 @@ if ($action == 'create') // First date of execution for cron print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>"; $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); + print Form::select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); print "</td></tr>"; // Number max of generation @@ -609,7 +609,7 @@ else if ($result < 0) { dol_print_error('', $discount->error); }*/ - print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); print '</td></tr>'; @@ -669,9 +669,9 @@ else print '<tr><td>'; - print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); print '</td><td colspan="5">'; - print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); + print Form::editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); print '</td>'; print '</tr>'; @@ -771,7 +771,7 @@ else print '<tr><td>'; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } else { @@ -780,7 +780,7 @@ else print '</td><td colspan="5">'; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } print '</td>'; print '</tr>'; @@ -789,7 +789,7 @@ else print '<tr><td>'; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); } else { @@ -798,7 +798,7 @@ else print '</td><td colspan="5">'; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); + print Form::editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); } else { @@ -810,14 +810,14 @@ else // Status of generated invoices print '<tr><td>'; if ($action == 'auto_validate' || $object->frequency > 0) - print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); else print $langs->trans("StatusOfGeneratedInvoices"); print '</td><td colspan="5">'; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); + print Form::editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); } print '</td>'; print '</tr>'; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 982dbeb421e23dacaad0fc74c10ca29c1f8fc0eb..a1479d3c875a1c0c2d85bf709b50c1c5ba56508c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -719,7 +719,7 @@ if ($resql) if ($show_files) $param.='&show_files=' .$show_files; $param.=(! empty($option)?"&option=".$option:""); - $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); + $massactionbutton=Form::selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); $i = 0; print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; @@ -924,7 +924,7 @@ if ($resql) print Form::selectarray('search_status', $liststatus, $search_status, 1); print '</td>'; print '<td class="liste_titre" align="center">'; - $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); + $searchpitco=Form::showFilterAndCheckAddButtons(1, 'checkforselect', 1); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 3562a235963eb108a862020bd5d14cca83aa4918..7d2cd530955e0985a8250258eb5f044c6692c0bc 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print '</td></tr>'; // Ref customer diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index b881086657a58c63613ce181df1495eb9f328c97..8dbb1106869874fce79816e9edeb0d1a6e699862 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -167,7 +167,7 @@ if ($object->id > 0) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print "</td></tr>"; // Ref customer @@ -300,7 +300,7 @@ if ($object->id > 0) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); + Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); } else { @@ -351,7 +351,7 @@ if ($object->id > 0) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); + Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); } else { diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index b8a5779c708c9d3611fdcc75e84a7c3a61f160ed..fc99b8e747f9f88526123ee08ab277075be5719e 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -92,7 +92,7 @@ $builddate=time(); $description=$langs->trans("DescPurchasesJournal").'<br>'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); +$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 0cbd5068077d02ce25f8a2ffe007d8a82d60f670..30e0aa69a7524817de7d7a1e2fa5221c13e52ca1 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -96,7 +96,7 @@ $builddate=time(); $description=$langs->trans("DescSellsJournal").'<br>'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); +$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 566a2ff53cc3c19a670fcea7b087c47ecb04352a..11f7e154f0aae71be8ebe7b5cfdcd4f6dde6fc94 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -164,11 +164,11 @@ if ($_GET["action"] == 'create') print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; - print $form->select_date($datep,"datep",'','','','add'); + print Form::select_date($datep,"datep",'','','','add'); print '</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>'; - print $form->select_date($datev,"datev",'','','','add'); + print Form::select_date($datev,"datev",'','','','add'); print '</td></tr>'; // Label diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index ac30e5298396e19149964474820fae274aeac8f1..f2836dcb1ce3578711c2c144e5b997eaffedac69 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; @@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$langs->trans("CalcModeLT2Debt"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 7c1e99b35373e3e3a6014646fa938cef66eda70b..6cdc56baef5eb977cccab1796d689b5838d28f9c 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 72fd65d686b72cc8f0ba8354f2974afbd1f6b06b..b1abf17fe738c493297d3840aeb3a0532d1f0242 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -462,7 +462,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<tr><td><span class="fieldrequired">'.$langs->trans('Date').'</span></td><td>'; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment); - $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); + Form::select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); print '</td>'; print '<td>'.$langs->trans('Comments').'</td></tr>'; @@ -773,7 +773,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $text.='<br>'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print '<input type="hidden" name="closepaidinvoices" value="'.GETPOST('closepaidinvoices').'">'; } - print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); + print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); } print "</form>\n"; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 0f03eb8ae47fa75d8bc86fa3458c2a2a5212c2a5..42370682f4be054d528c2c1a041fd9a2b83fbe23 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -185,7 +185,7 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'pa */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -195,7 +195,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -206,12 +206,12 @@ $linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php">' . $langs- // Ref print '<tr><td width="20%">'.$langs->trans('Ref').'</td><td colspan="3">'; -print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); +print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Date payment -print '<tr><td>'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).'</td><td colspan="3">'; -print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); +print '<tr><td>'.Form::editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).'</td><td colspan="3">'; +print Form::editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print '</td></tr>'; // Payment type (VIR, LIQ, ...) @@ -219,16 +219,16 @@ $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$obje print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$labeltype.'</td></tr>'; // Payment numero -print '<tr><td>'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; -print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); +print '<tr><td>'.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; +print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); print '</td></tr>'; // Amount print '<tr><td>'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->montant,'',$langs,0,0,-1,$conf->currency).'</td></tr>'; // Note -print '<tr><td class="tdtop">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).'</td><td colspan="3">'; -print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); +print '<tr><td class="tdtop">'.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).'</td><td colspan="3">'; +print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); print '</td></tr>'; $disable_delete = 0; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index fba7a9044faefa33febb69ea9b55f7159628e697..8c4b478abd282fd7d460f8fecafc303885fed03d 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -339,7 +339,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); } @@ -348,7 +348,7 @@ else */ if ($action == 'valide') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); } @@ -361,7 +361,7 @@ else array('type' => 'hidden','name' => 'bankid','value' => GETPOST('lineid')), array('type' => 'date','name' => 'rejectdate_','label' => $langs->trans("RejectCheckDate"),'value' => dol_now()) ); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); } } @@ -387,7 +387,7 @@ if ($action == 'new') //print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>'; // Filter print '<tr><td width="200">'.$langs->trans("DateChequeReceived").'</td><td>'; - print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1); + print Form::select_date($filterdate,'fd',0,0,1,'',1,1,1); print '</td></tr>'; print '<tr><td>'.$langs->trans("BankAccount").'</td><td>'; $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); @@ -582,7 +582,7 @@ else } else { - print $form->showrefnav($object,'ref',$linkback, 1, 'number'); + print Form::showrefnav($object,'ref',$linkback, 1, 'number'); } print '</td>'; @@ -601,7 +601,7 @@ else print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="setdate">'; - $form->select_date($object->date_bordereau,'datecreate_','','','',"setdate"); + Form::select_date($object->date_bordereau,'datecreate_','','','',"setdate"); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 5b4929ae42b1b2d22ceeda8f4444b067cb20d5a1..ff4beea6c0e712d89a7b6b9402d6699f96fde400 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -162,7 +162,7 @@ if ($resql) print '</td>'; print '<td></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index bcca56ed6457cceb637180e35b16a40a11d263a1..f095e2ad577a07af4c2865bb70c5b83a22fa16d4 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -265,7 +265,7 @@ if ($resql) print '<input class="flat" type="text" size="4" name="search_amount" value="'.$search_amount.'">'; print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index a68f34453053730230c70b5900e743156a66c30a..049268797392d7229f7d70df69d71de516223be6 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -209,7 +209,7 @@ if ($_GET["action"] == 'create') print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">'; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0; - $form->select_date($datepayment,'','','','',"add_payment",1,1); + Form::select_date($datepayment,'','','','',"add_payment",1,1); print "</td>"; print '</tr>'; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index ad59687b43c23294445dd1e2cd52499422fee282..a621a008f1bf581f7613cdded0679ad9e585746c 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -144,7 +144,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -154,7 +154,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -164,7 +164,7 @@ print '<table class="border" width="100%">'; // Ref print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($paiement,'id','',1,'rowid','id'); +print Form::showrefnav($paiement,'id','',1,'rowid','id'); print '</td></tr>'; // Date diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index e229a3a5d75a96f773e7f478b32920bb5ead263e..f9d35b009370e7aa3c2da3a10b59b8509e05348b 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -156,7 +156,7 @@ if ($id > 0) /*if ($action == 'credite') { - print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); + print Form::formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); }*/ @@ -214,7 +214,7 @@ if ($id > 0) print '<tr class="liste_titre">'; print '<td colspan="3">'.$langs->trans("NotifyTransmision").'</td></tr>'; print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransData").'</td><td>'; - print $form->select_date('','','','','',"userfile",1,1); + print Form::select_date('','','','','',"userfile",1,1); print '</td></tr>'; print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransMetod").'</td><td>'; print Form::selectarray("methode",$bon->methodes_trans); @@ -237,7 +237,7 @@ if ($id > 0) print '<tr class="liste_titre">'; print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>'; print '<tr '.$bc[false].'><td width="20%">'.$langs->trans('CreditDate').'</td><td>'; - print $form->select_date('','','','','',"infocredit",1,1); + print Form::select_date('','','','','',"infocredit",1,1); print '</td></tr>'; print '</table>'; print '<br>'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index c62c8c1c28358afeb66637e651c8efbdc176abae..13e54e0e2d3c7f18d3373e5630becc63a274db11 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -193,13 +193,13 @@ if ($id) //Select yes/no print '<tr><td class="valid">'.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->name.' ?</td>'; print '<td colspan="2" class="valid">'; - print $form->selectyesno("confirm",1,0); + print Form::selectyesno("confirm",1,0); print '</td></tr>'; //Date print '<tr><td class="fieldrequired valid">'.$langs->trans("RefusedData").'</td>'; print '<td colspan="2" class="valid">'; - print $form->select_date('','','','','',"confirm_rejet"); + print Form::select_date('','','','','',"confirm_rejet"); print '</td></tr>'; //Reason diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index e7cef1a50ad28682114750a1f05c8ab986e0b1d1..148052aa0006fa30fe646e0b292621235861e1a6 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -137,7 +137,7 @@ if ($result) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 4286c6a8453c0c3b43e5112eff406ecc4c0c46b4..8d7364af048d2eb2292f69628e488c1c2be490a1 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -125,7 +125,7 @@ if ($modecompta=="CREANCES-DETTES") $name=$langs->trans("AnnualByCompaniesDueDebtMode"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $description=$langs->trans("RulesResultDue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -137,8 +137,8 @@ else { $name=$langs->trans("AnnualByCompaniesInputOutputMode"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')'; - //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + //$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',1,1,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $description=$langs->trans("RulesResultInOut"); $builddate=time(); diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 4a8dc21ca1b7b3a138df9f339b9c3d965772d50a..e2bb44c31d8ff3c9bc648df82ddbb34f1bd535e3 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -239,13 +239,13 @@ if ($action == 'create') // Date payment print '<tr><td>'; print fieldLabel('DatePayment','datep',1).'</td><td>'; - print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); + print Form::select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); print '</td></tr>'; // Date value for bank print '<tr><td>'; print fieldLabel('DateValue','datev',0).'</td><td>'; - print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); + print Form::select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); print '</td></tr>'; // Employee @@ -263,13 +263,13 @@ if ($action == 'create') // Date start period print '<tr><td>'; print fieldLabel('DateStartPeriod','datesp',1).'</td><td>'; - print $form->select_date($datesp,"datesp",'','','','add'); + print Form::select_date($datesp,"datesp",'','','','add'); print '</td></tr>'; // Date end period print '<tr><td>'; print fieldLabel('DateEndPeriod','dateep',1).'</td><td>'; - print $form->select_date($dateep,"dateep",'','','','add'); + print Form::select_date($dateep,"dateep",'','','','add'); print '</td></tr>'; // Amount @@ -340,7 +340,7 @@ if ($id) print "<tr>"; print '<td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '</td></tr>'; // Employee diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 7e015a4ad2ea18f85cadb03d91eea924833bf8b5..7f89d9967c204a4070f38a32c92f56c4ba923a61 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '</td></tr>'; // Societe diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index b0584d628508687c13488a942ad9b1d10a188b34..33218b00f02b1f61de2949ae8054c6f3c820fab1 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -176,7 +176,7 @@ if ($result) print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 2a9894be87a72813bbbb37fc90ed630868d59fe7..53d12229f9703959bb6d67a507a4426272506f3a 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -270,7 +270,7 @@ if ($action == 'create') print $langs->trans("PeriodEndDate"); print '</td>'; print '<td>'; - print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); + print Form::select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); print '</td>'; print '</tr>'; // Amount @@ -286,7 +286,7 @@ if ($action == 'create') print $langs->trans("DateDue"); print '</td>'; print '<td>'; - print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); print '</td>'; print "</tr>\n"; @@ -325,20 +325,20 @@ if ($id > 0) ); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); } // Confirmation de la suppression de la charge if ($action == 'paid') { $text=$langs->trans('ConfirmPaySocialContribution'); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); } if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteSocialContribution'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); } if ($action == 'edit') @@ -351,7 +351,7 @@ if ($id > 0) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="2">'; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print "</td></tr>"; // Label @@ -443,7 +443,7 @@ if ($id > 0) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -455,7 +455,7 @@ if ($id > 0) if ($action == 'edit') { print '<tr><td>'.$langs->trans("DateDue")."</td><td>"; - print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "</td></tr>"; } else { diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index f87791dfed9aec3b50ecffa6284980e40dc45a92..6bc9fe14f9d1c64f43340029932a16bc82b9c37d 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -107,7 +107,7 @@ if ($object->id) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print "</td></tr>"; // Label @@ -130,7 +130,7 @@ if ($object->id) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -143,7 +143,7 @@ if ($object->id) if ($action == 'edit') { print '<tr><td>'.$langs->trans("DateDue")."</td><td>"; - print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "</td></tr>"; } else { diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 3133022b9e671b92ca4a13db22f28e44ba77b378..d33d3ea2414ff9951c4077536257742aafe1d217 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -205,7 +205,7 @@ if ($resql) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e995b06aa6b89525ed887f67f980c1bfc6e941fb..910bc6e16e63f13dd0914cb2490efb2911f18f30 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -164,7 +164,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index cb8151cf33c337912029d6eed20f6ebb37c21d00..cbcbb4d860d0eefabc67c5f67605556465a7e46a 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -139,7 +139,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>"; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>"; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index dade07fd0e387d7cfe89fa740060602a22e10f70..41da09ed2905263dbc8cc6a52a30baecdade13c8 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -155,7 +155,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -166,7 +166,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index f7d8361b8ff1443508f98ad0269d25c747e4690b..6c6d22be4917ba707d807f98afecab32413df1e9 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -234,11 +234,11 @@ if ($action == 'create') print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; - print $form->select_date($datep,"datep",'','','','add',1,1); + print Form::select_date($datep,"datep",'','','','add',1,1); print '</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>'; - print $form->select_date($datev,"datev",'','','','add',1,1); + print Form::select_date($datev,"datev",'','','','add',1,1); print '</td></tr>'; // Label diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index b0d7a9bce3051d8f085ab7beb488a5e854d66364..dcf6d2844905cf91b622c871990ac3563c302741 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -140,7 +140,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":""); $description=$langs->trans("RulesVATDueServices"); $description.='<br>'; @@ -183,7 +183,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":""); $description=$langs->trans("RulesVATInServices"); $description.=' '.$langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index e04530a9dc70853596157ab041a6e09a0c92ea3d..500739c18fb319ef36d2155a1efc18280e47a12c 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -130,7 +130,7 @@ if ($modetax==1) // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 61d019894e8610d61b20e45f62bf8fc96a102c56..a4cfedca66389be2ef17f705e1103506b0dfb33f 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -149,7 +149,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; @@ -198,7 +198,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 9615bec99f15d18ad15f2d1df90eb2fc20051eb0..1eeba95d63466dc5ec0a42095811f6a54f1c24c8 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -172,7 +172,7 @@ if ($result) print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 9d4543f702a4656eef8bb0b1f8ee891ab2297d32..bb00cd08d623dcc02d215fcb1d156fb2de2eaca9 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -364,7 +364,7 @@ abstract class ActionsContactCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -413,7 +413,7 @@ abstract class ActionsContactCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 30a52469da29ddfe90848a768209394f3bb855d7..709c1b303007abd2946d2558615966e3753c44dc 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -107,7 +107,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->societe->contact->supprimer) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 1d2432a586f0bb6c35a12dfe44c9b2be9c9a9ea0..0e3653c229329252c901d29ac9920179ace3ea04 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -450,7 +450,7 @@ else { if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } @@ -633,7 +633,7 @@ else if (! empty($conf->mailing->enabled)) { print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>'; - print '<td>'.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'</td>'; + print '<td>'.Form::selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'</td>'; } else { @@ -688,11 +688,11 @@ else $form=new Form($db); if ($object->birthday) { - print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); + print Form::select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); } else { - print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1); + print Form::select_date('','birthday',0,0,1,"perso", 1, 0, 1); } print '</td>'; @@ -873,7 +873,7 @@ else if (! empty($conf->mailing->enabled)) { print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>'; - print '<td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>'; + print '<td>'.Form::selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>'; } else { @@ -1044,7 +1044,7 @@ else if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8bebb6f0cfb13429b54b0c4601834e13bf08db7b..121dbba32bb24c04b0e02443d17e74a5ce2153c2 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -130,7 +130,7 @@ if ($action == 'edit') // Date To Birth print '<tr><td>'.$langs->trans("DateToBirth").'</td><td>'; $form=new Form($db); - print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); + print Form::select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); print '</td>'; print '<td colspan="2">'.$langs->trans("Alert").': '; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 2b5b39610661d94b051f007d2ffa6b2ec451857a..6343461e9a7aa8b4c1a3443f35dab59938308f46 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1148,7 +1148,7 @@ if ($action == 'create') print '</td></tr>'; print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td>'; - $form->select_date($datecontrat,'',0,0,'',"contrat"); + Form::select_date($datecontrat,'',0,0,'',"contrat"); print "</td></tr>"; // Project @@ -1243,7 +1243,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); } @@ -1264,7 +1264,7 @@ else $text=$langs->trans('ConfirmValidateContract',$numref); - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); } @@ -1273,7 +1273,7 @@ else */ if ($action == 'close') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); } @@ -1294,31 +1294,31 @@ else // Ref du contrat if (!empty($modCodeContract->code_auto)) { print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print "</td></tr>"; } else { print '<tr>'; print '<td width="20%">'; - print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print Form::editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print '</td><td>'; - print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print Form::editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print '</td>'; print '</tr>'; } print '<tr>'; print '<td width="20%">'; - print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print Form::editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print '</td><td>'; - print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print Form::editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print '</td>'; print '</tr>'; print '<tr>'; print '<td width="20%">'; - print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print '</td><td>'; - print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print '</td>'; print '</tr>'; @@ -1346,9 +1346,9 @@ else // Date print '<tr>'; print '<td width="20%">'; - print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); + print Form::editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); print '</td><td>'; - print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); + print Form::editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); print '</td>'; print '</tr>'; /* print '<tr><td>'.$langs->trans("Date").'</td>'; @@ -1651,9 +1651,9 @@ else print "<tr ".$bc[$var].">"; print '<td colspan="'.$colspan.'">'; print $langs->trans("DateStartPlanned").' '; - $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); + Form::select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); print ' '.$langs->trans("DateEndPlanned").' '; - $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); + Form::select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); print '</td>'; if (is_array($extralabelslines) && count($extralabelslines)>0) { @@ -1691,7 +1691,7 @@ else */ if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid')) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; } @@ -1711,7 +1711,7 @@ else 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; } @@ -1723,7 +1723,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; } @@ -1735,7 +1735,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; } @@ -1824,11 +1824,11 @@ else print '<tr '.$bc[$var].'>'; print '<td class="nohover">'.$langs->trans("DateServiceActivate").'</td><td class="nohover">'; - print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); + print Form::select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); print '</td>'; print '<td class="nohover">'.$langs->trans("DateEndPlanned").'</td><td class="nohover">'; - print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); + print Form::select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); print '</td>'; print '<td align="center nohover" rowspan="2" valign="middle" class="nohover">'; @@ -1881,7 +1881,7 @@ else if ($objp->statut == 4) { print $langs->trans("DateEndReal").' '; - print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); + print Form::select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); } } print '</td>'; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index cd070f6078d4d25a347bf8f1014890d001ae2aab..e526b840af8f1b44227334250bc87e8896250fa9 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref)) // Reference du contrat print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print "</td></tr>"; // Customer diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 49466c7fcb0fed3692e960becc855d05cf9fc2d9..148abdb0ed15ccea63c4274179a347365231856e 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -110,7 +110,7 @@ if ($object->id) $linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; // Reference - print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'</td></tr>'; + print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'</td></tr>'; // Societe print '<tr><td>'.$langs->trans("Customer").'</td>'; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 505775be4dfbf8216a402ebb937fa677f59982f2..8b3d203b2c9ce1fe80cdcd123f4e628fa30e618a 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -267,7 +267,7 @@ if ($resql) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre" colspan="5" align="right"></td>'; print '<td>'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 502b354ee69b85d15e9271eba145c36f57e9c3b9..be39c90de575e01b1ff4efe453a2c4f90ff5d32b 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref)) $linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; // Reference - print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="5">'.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'</td></tr>'; + print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="5">'.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'</td></tr>'; // Societe print '<tr><td>'.$langs->trans("Customer").'</td>'; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 589b2944e2128dff3f8451c782be78eebc189c5f..3cf3a922b595f5e4003afbea869ac1c115b382d0 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -219,14 +219,14 @@ if ($resql) print Form::selectarray('filter_op1',$arrayofoperators,$filter_op1,1); print ' '; $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); - print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1); + print Form::select_date($filter_date1,'op1',0,0,1,'',1,0,1); print '</td>'; print '<td class="liste_titre" align="center">'; $arrayofoperators=array('<'=>'<','>'=>'>'); print Form::selectarray('filter_op2',$arrayofoperators,$filter_op2,1); print ' '; $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); - print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); + print Form::select_date($filter_date2,'op2',0,0,1,'',1,0,1); print '</td>'; print '<td align="right">'; $arrayofstatus=array( @@ -239,7 +239,7 @@ if ($resql) print Form::selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 997e27adb2030b9c7d5654beaa2d521e2d4897af..3a0c6d05ff4fd5eaaceda4618523b82753976461 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -241,7 +241,7 @@ if ($section) $useglobalvars=1; $form = new Form($db); $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); - print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); + print Form::formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); } if ($useajax) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 97645487d451363d9c0c5d3faf077add2b33a3f3..166b6d6b41fd4e4633890fd6c148454be0ca13fc 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -702,7 +702,7 @@ class ExtraFields if (! is_object($form)) $form=new Form($this->db); // TODO Must also support $moreparam - $out = $form->select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); + $out = Form::select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); } elseif (in_array($type,array('int'))) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 86fab11b6620a2e40c85def91d56cc868024882f..e17bd17861d245ddc272b697ae117ddad8cc03b9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3941,6 +3941,7 @@ class Form * @param string $selected preselected currency code * @param string $htmlname name of HTML select list * @return void + * @deprecated use Form::selectCurrency */ function select_currency($selected='',$htmlname='currency_id') { diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index ff5ff6a9cc7223b93ecd764f812a4a5d075994d7..7441902a83744a2679e71af665b63234ef4989c0 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -562,7 +562,7 @@ class FormMail extends Form if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL) && ! empty($this->param['models']) && $this->param['models'] == 'supplier_proposal_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_ORDER) && ! empty($this->param['models']) && $this->param['models'] == 'order_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_INVOICE) && ! empty($this->param['models']) && $this->param['models'] == 'facture_send') $defaultvaluefordeliveryreceipt=1; - $out.= $form->selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); + $out.= Form::selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); } $out.= "</td></tr>\n"; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 8026f6104c200d84c4b428c88e4c95b7c56c6f22..73d59c829188eb249646afc363cec42387de36d1 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1179,7 +1179,7 @@ function form_constantes($tableau,$strictw3c=0) } else if ($obj->type == 'yesno') { - print $form->selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); + print Form::selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); print '<input type="hidden" name="consttype'.(empty($strictw3c)?'':'[]').'" value="yesno">'; } else diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1a415e0338e1a460ea6d7094a3489b6711faed3e..e380256551769eb9d8c3b3ed68550552c7cd4e3f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -910,7 +910,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.Form::showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'</div>'; } - if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>'; + if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.Form::showbarcode($object).'</div>'; if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } @@ -947,7 +947,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; $morehtmlref.='</div>'; } - print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); + print Form::showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); print '</div>'; print '<div class="underrefbanner clearboth"></div>'; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 7201b30308c2edb89f40563115450e2c21c4a5a0..217030bd1e97d4878f26f947692808f21b504d3b 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -636,7 +636,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t // Form to add new time print '<td class="nowrap" align="center">'; - $tableCell=$form->select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); + $tableCell=Form::select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); print $tableCell; print '</td><td align="right">'; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 42f59e7c2fb814e24c86fc6b15f99ff5c27960c4..8dbe5d924fd9e9030087b1e5ecaf321a6a30fc4a 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -154,9 +154,9 @@ class mailing_fraise extends MailingTargets $s.='</select>'; $s.='<br>'; $s.=$langs->trans("DateEndSubscription").': '; - $s.=$langs->trans("After").' > '.$form->select_date(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0); + $s.=$langs->trans("After").' > '.Form::select_date(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0); $s.=' '; - $s.=$langs->trans("Before").' < '.$form->select_date(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0); + $s.=$langs->trans("Before").' < '.Form::select_date(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0); return $s; } diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index a983bf7f36e2c3011000219a621c7addbea5de83..3a162aa09016c6a302dfe2676de69e5ee119c7e5 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -29,7 +29,7 @@ if (empty($relativepathwithnofile)) $relativepathwithnofile=''; if ($action == 'delete') { $langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles - $ret = $form->form_confirm( + $ret = $formForm::formconfirm( $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index c68aa599310840e4816aef9c6326b71ede653557..8812a3dd708fb99230c91e1850251bf8aa62b977 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -69,13 +69,13 @@ else $typeofdata='textarea:12:100'; <!-- BEGIN PHP TEMPLATE NOTES --> <div class="border table-border centpercent"> <div class="table-border-row"> - <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div> - <div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> + <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo Form::editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div> + <div class="table-val-border-col"><?php echo Form::editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> </div> <?php if (empty($user->societe_id)) { ?> <div class="table-border-row"> - <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div> - <div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> + <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo Form::editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div> + <div class="table-val-border-col"><?php echo Form::editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> </div> <?php } ?> </div> diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 39de2604a0d16a02c20dd018bfa1742ecdf1181e..7d17930cdc0dbca3b80585f5d5b2ac3b3096684a 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -382,16 +382,16 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct"); + Form::select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct"); print ' '.$langs->trans("DateEndPlanned").' '; - $form->select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct"); + Form::select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct"); } else { echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); echo ' '.$langs->trans('to').' '; - echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); }; print '<script type="text/javascript">'; if (!$date_start) { diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index a88f1bc210c8007f8efb9d1f4b3c742725e97e0f..c34c796c6f7e7cddfbbcb74ecba0522e52f0a17c 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -226,9 +226,9 @@ $coldisplay=-1; // We remove first td <td colspan="11"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?> <?php $hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:''); - echo $form->select_date($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne",1,0,1); + echo Form::select_date($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne",1,0,1); echo ' '.$langs->trans('to').' '; - echo $form->select_date($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne",1,0,1); + echo Form::select_date($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne",1,0,1); print '<script type="text/javascript">'; if (!$line->date_start) { if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) { diff --git a/htdocs/core/tpl/resource_add.tpl.php b/htdocs/core/tpl/resource_add.tpl.php index e2add5fb26663a98ee2d0bca5531d59445d04a71..0489ff162ec0c41fc6e0cae9756ee547fc8499ff 100644 --- a/htdocs/core/tpl/resource_add.tpl.php +++ b/htdocs/core/tpl/resource_add.tpl.php @@ -22,8 +22,8 @@ $events=array(); $out .= $formresources->select_resource_list('','fk_resource','',1,1,0,$events,'',2); $out .= '</div>'; -$out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy',(isset($_POST['busy'])?$_POST['busy']:1),1).'</div>'; -$out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory',(isset($_POST['mandatory'])?$_POST['mandatory']:0),1).'</div>'; +$out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.Form::selectyesno('busy',(isset($_POST['busy'])?$_POST['busy']:1),1).'</div>'; +$out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.Form::selectyesno('mandatory',(isset($_POST['mandatory'])?$_POST['mandatory']:0),1).'</div>'; $out .= '<div class="tagtd" align="right">'; $out .='<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>'; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index dd775662db6b4fc968eec39d34b7aaacb16feee6..8bbc96881d44cd8ec4737c9bd075d186c51405c0 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -52,8 +52,8 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>'; print '<div class="tagtd">'.$object_resource->type_label.'</div>'; - print '<div class="tagtd" align="center">'.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'</div>'; - print '<div class="tagtd" align="center">'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'</div>'; + print '<div class="tagtd" align="center">'.Form::selectyesno('busy',$linked_resource['busy']?1:0,1).'</div>'; + print '<div class="tagtd" align="center">'.Form::selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'</div>'; print '<div class="tagtd" align="right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>'; print '</form>'; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index e8352ef3381041b3f4644884e56654b8244e73ae..61b3b97b9514efada3521a0b1c86164ab1d8f6e3 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -278,13 +278,13 @@ if ($conf->use_javascript_ajax) if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); $action=''; } if ($action == 'execute'){ - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); $action=''; } @@ -460,11 +460,11 @@ if (($action=="create") || ($action=="edit")) print $langs->trans('CronDtStart')."</td><td>"; if(!empty($object->datestart)) { - $form->select_date($object->datestart,'datestart',1,1,'',"cronform"); + Form::select_date($object->datestart,'datestart',1,1,'',"cronform"); } else { - $form->select_date('','datestart',1,1,'',"cronform"); + Form::select_date('','datestart',1,1,'',"cronform"); } print "</td>"; print "<td>"; @@ -474,10 +474,10 @@ if (($action=="create") || ($action=="edit")) print "<tr><td>"; print $langs->trans('CronDtEnd')."</td><td>"; if(!empty($object->dateend)){ - $form->select_date($object->dateend,'dateend',1,1,'',"cronform"); + Form::select_date($object->dateend,'dateend',1,1,'',"cronform"); } else{ - $form->select_date(-1,'dateend',1,1,1,"cronform"); + Form::select_date(-1,'dateend',1,1,1,"cronform"); } print "</td>"; print "<td>"; @@ -514,11 +514,11 @@ if (($action=="create") || ($action=="edit")) print "</td><td>"; if(!empty($object->datenextrun)) { - $form->select_date($object->datenextrun,'datenextrun',1,1,'',"cronform"); + Form::select_date($object->datenextrun,'datenextrun',1,1,'',"cronform"); } else { - $form->select_date(-1,'datenextrun',1,1,'',"cronform"); + Form::select_date(-1,'datenextrun',1,1,'',"cronform"); } print "</td>"; print "<td>"; @@ -554,7 +554,7 @@ else print '<tr><td width="30%">'; print $langs->trans('CronId')."</td>"; - print "<td>".$form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'id', '', '', 0); + print "<td>".Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'id', '', '', 0); print "</td></tr>\n"; print '<tr><td>'; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index aa6bb16fbe93d9142e4016926afc82dba9204c09..740fb7476b39d2cfe2625c8b769ad97de0a8492a 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -160,13 +160,13 @@ $stringcurrentdate = $langs->trans("CurrentHour").': '.dol_print_date(dol_now(), if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); } if ($action == 'execute') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); } diff --git a/htdocs/don/card.php b/htdocs/don/card.php index ac12c46b8794632edb9aa7348b5628c39fc9fef6..2a01d517c8171f70c65971dd2b1d5f58daf6f51c 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -308,14 +308,14 @@ if ($action == 'create') // Date print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Date").'</td><td>'; - $form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1); + Form::select_date($donation_date?$donation_date:-1,'','','','',"add",1,1); print '</td>'; // Amount print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" value="'.GETPOST("amount").'" size="10"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>"; - print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1); + print Form::selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1); print "</td></tr>\n"; print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.GETPOST("societe").'" size="40"></td></tr>'; @@ -430,7 +430,7 @@ if (! empty($id) && $action == 'edit') // Date print "<tr>".'<td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td>'; - $form->select_date($object->date,'','','','',"update"); + Form::select_date($object->date,'','','','',"update"); print '</td>'; // Amount @@ -446,7 +446,7 @@ if (! empty($id) && $action == 'edit') } print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>"; - print $form->selectyesno("public",1,1); + print Form::selectyesno("public",1,1); print "</td>"; print "</tr>\n"; @@ -523,7 +523,7 @@ if (! empty($id) && $action != 'edit') if ($action == 'delete') { $text=$langs->trans("ConfirmDeleteADonation"); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteADonation"),$text,"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteADonation"),$text,"confirm_delete",'','',1); } $result=$object->fetch($id); @@ -551,7 +551,7 @@ if (! empty($id) && $action != 'edit') // Ref print "<tr>".'<td>'.$langs->trans("Ref").'</td><td colspan="2">'; - print $form->showrefnav($object, 'rowid', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'rowid', $linkback, 1, 'rowid', 'ref', ''); print '</td>'; print '</tr>'; diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 793bdadd3b1cdf91e35c65fca6a17f1a395fca7b..0036ef9c189a641197fe83d1813494e34d33eb81 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '</td></tr>'; // Societe diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 8c7f5b987bef030d842adfeac62581d6d1b1ff15..02a9b2225b98c912f700cd15f00270ee234fe5a9 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -192,7 +192,7 @@ if ($resql) print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>'; print '<td class="liste_titre" align="right"></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index fc0b4ae0c7844c47bfeda65937ba999e29397058..7918206fe946f61105dd9b7f79ff3ea64b998c97 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -133,7 +133,7 @@ dol_fiche_head($head, $hselected, $langs->trans("DonationPayment"), 0, 'payment' */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -143,7 +143,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -153,7 +153,7 @@ print '<table class="border" width="100%">'; // Ref print '<tr><td valign="top" width="20%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($payment,'id','',1,'rowid','id'); +print Form::showrefnav($payment,'id','',1,'rowid','id'); print '</td></tr>'; // Date diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index a0062632770b3991200f49587e3e540a78f9369a..22800e0aaca0244da13008d0e2821135af4c02d6 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -205,7 +205,7 @@ if (GETPOST("action") == 'create') print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">'; $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaid):0; - $form->select_date($datepayment,'','','','',"add_payment",1,1); + Form::select_date($datepayment,'','','','',"add_payment",1,1); print "</td>"; print '</tr>'; diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index 7cd3a235c6be6e9dd8d59aed4318a70c12811f5f..46ca0c320870559efb23f55be53fc6717f968416 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -208,7 +208,7 @@ if (empty($action) || $action == 'delete_section') // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection'); } diff --git a/htdocs/ecm/docfile.php b/htdocs/ecm/docfile.php index ce4bf4806683ab0738a036c9d1742fa338b88c15..03dbba662e5827476b95dfbd973d4284a8cd37d0 100644 --- a/htdocs/ecm/docfile.php +++ b/htdocs/ecm/docfile.php @@ -253,7 +253,7 @@ print '</div>'; // Confirmation de la suppression d'une ligne categorie if ($_GET['action'] == 'delete_file') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode($_GET["section"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile',$urlfile), 'confirm_deletefile', '', 1, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode($_GET["section"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile',$urlfile), 'confirm_deletefile', '', 1, 1); } diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index ae4e6c6b08c2b3b47d9d75b09fdd65d2418a4b7c..5374473cefc155e8181b03505410cc62044d77c9 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -334,7 +334,7 @@ if ($action != 'edit' && $action != 'delete') // Confirm remove file if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); } @@ -342,7 +342,7 @@ if ($action == 'delete') if ($action == 'delete_dir') { $relativepathwithoutslash=preg_replace('/[\/]$/','',$relativepath); - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"], $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"], $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1); } diff --git a/htdocs/ecm/docother.php b/htdocs/ecm/docother.php index addf559e01c18b326127ad8df82dfba7e0b6d51a..c77795e13ff0a6d131d50e4f16165f7e8f923d98 100644 --- a/htdocs/ecm/docother.php +++ b/htdocs/ecm/docother.php @@ -110,7 +110,7 @@ print load_fiche_titre($langs->trans("ECMAutoOrg")); */ if ($_GET['action'] == 'delete_file') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 4009967ac9db88e92cf3294d3030527c63487da3..bd217349a6b1f81c8ecc6b602ddcd7ce5bfd4d7c 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -427,7 +427,7 @@ print '</div>'; // Confirm remove file (for non javascript users) if ($action == 'delete' && empty($conf->use_javascript_ajax)) { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); } @@ -481,7 +481,7 @@ print '</div>'; // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); } // End confirm @@ -530,7 +530,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti // Show filemanager tree print '<div id="filetree" class="ecmfiletree"></div>'; - if ($action == 'deletefile') print $form->formconfirm('eeeee', $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 'deletefile'); + if ($action == 'deletefile') print Form::formconfirm('eeeee', $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 'deletefile'); print '</td></tr>'; } diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 70ce4a87e04ab6062d8ae02ccf6271d3ac7525f5..373b01ffacb3a22085eb71eece24491a32c40b6e 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -433,7 +433,7 @@ print '</div>'; // Confirm remove file (for non javascript users) if ($action == 'delete' && empty($conf->use_javascript_ajax)) { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); } @@ -475,7 +475,7 @@ print '</div>'; // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); } // End confirm diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 6b75f1c5142edbbdebb19d645b9200a1c417a782..30d6249dfaba23940a199e47752971f7e942eeb2 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -638,7 +638,7 @@ if ($action == 'create') print '<td colspan="3">'; //print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed. $date_delivery = ($date_delivery?$date_delivery:$object->date_livraison); // $date_delivery comes from GETPOST - print $form->select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1,1); + print Form::select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1,1); print "</td>\n"; print '</tr>'; @@ -1210,7 +1210,7 @@ else if ($id || $ref) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSending'),$langs->trans("ConfirmDeleteSending",$object->ref),'confirm_delete','',0,1); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSending'),$langs->trans("ConfirmDeleteSending",$object->ref),'confirm_delete','',0,1); } @@ -1239,7 +1239,7 @@ else if ($id || $ref) $text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid, $object); } - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1); } /* @@ -1247,7 +1247,7 @@ else if ($id || $ref) */ if ($action == 'annuler') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$object->ref),'confirm_cancel','',0,1); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$object->ref),'confirm_cancel','',0,1); } @@ -1265,7 +1265,7 @@ else if ($id || $ref) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Customer @@ -1321,7 +1321,7 @@ else if ($id || $ref) print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="setdate_livraison">'; - print $form->select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison",1,0,1); + print Form::select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison",1,0,1); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } @@ -1334,7 +1334,7 @@ else if ($id || $ref) // Weight print '<tr><td>'; - print $form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer); + print Form::editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer); print '</td><td colspan="3">'; if ($action=='edittrueWeight') @@ -1368,13 +1368,13 @@ else if ($id || $ref) print '</td></tr>'; // Width - print '<tr><td>'.$form->editfieldkey("Width",'trueWidth',$object->trueWidth,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; - print $form->editfieldval("Width",'trueWidth',$object->trueWidth,$object,$user->rights->expedition->creer); + print '<tr><td>'.Form::editfieldkey("Width",'trueWidth',$object->trueWidth,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; + print Form::editfieldval("Width",'trueWidth',$object->trueWidth,$object,$user->rights->expedition->creer); print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string($object->width_units,"size"):''; print '</td></tr>'; // Height - print '<tr><td>'.$form->editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; + print '<tr><td>'.Form::editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; if($action=='edittrueHeight') { print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; @@ -1397,8 +1397,8 @@ else if ($id || $ref) print '</td></tr>'; // Depth - print '<tr><td>'.$form->editfieldkey("Depth",'trueDepth',$object->trueDepth,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; - print $form->editfieldval("Depth",'trueDepth',$object->trueDepth,$object,$user->rights->expedition->creer); + print '<tr><td>'.Form::editfieldkey("Depth",'trueDepth',$object->trueDepth,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; + print Form::editfieldval("Depth",'trueDepth',$object->trueDepth,$object,$user->rights->expedition->creer); print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string($object->depth_units,"size"):''; print '</td></tr>'; @@ -1473,8 +1473,8 @@ else if ($id || $ref) print '</tr>'; // Tracking Number - print '<tr><td>'.$form->editfieldkey("TrackingNumber",'trackingnumber',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; - print $form->editfieldval("TrackingNumber",'trackingnumber',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number); + print '<tr><td>'.Form::editfieldkey("TrackingNumber",'trackingnumber',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; + print Form::editfieldval("TrackingNumber",'trackingnumber',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number); print '</td></tr>'; // Incoterms diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 039af2cd0ece84c4b1a43d2c899b47ad1b858983..3346a4f4257140da5476c787ff106bf0c18d3c33 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -164,7 +164,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "</td></tr>"; // Customer diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index f1829830daa4d7db4879bd507fb32f3d45ec20f1..400e58e851f52e1c5446e4c46a540fbe95a8046e 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -219,7 +219,7 @@ if ($resql) print Form::selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1); print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 652b09453f7865d73e3fa80c5a1bba3714dbdf13..2160b0a2732d3b0ba32c38fd8c90487c4693dfad 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -106,7 +106,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Customer diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 832f05ca803a97a968f05930cbfded03aac494f6..5ce9c4c689d695fe61ac051926482dcecc01acd4 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -187,7 +187,7 @@ if ($id > 0 || ! empty($ref)) */ if ($action == 'cloture') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture"); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture"); } @@ -200,7 +200,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="18%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; - print $form->showrefnav($commande,'ref','',1,'ref','ref'); + print Form::showrefnav($commande,'ref','',1,'ref','ref'); print '</td>'; print '</tr>'; @@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref)) print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'" method="post">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="setdatedelivery">'; - $form->select_date($commande->date_livraison>0?$commande->date_livraison:-1,'liv_','','','',"setdatedelivery"); + Form::select_date($commande->date_livraison>0?$commande->date_livraison:-1,'liv_','','','',"setdatedelivery"); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 285bed7038661a668de281f0259381a38eef9090..a994ac34fe8e2db20f40abcc4f5a845da906ab83 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1117,13 +1117,13 @@ if ($action == 'create') print '<tr>'; print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td>'; print '<td>'; - $form->select_date($date_start?$date_start:-1,'date_debut',0,0,0,'',1,1); + Form::select_date($date_start?$date_start:-1,'date_debut',0,0,0,'',1,1); print '</td>'; print '</tr>'; print '<tr>'; print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td>'; print '<td>'; - $form->select_date($date_end?$date_end:-1,'date_fin',0,0,0,'',1,1); + Form::select_date($date_end?$date_end:-1,'date_fin',0,0,0,'',1,1); print '</td>'; print '</tr>'; print '<tr>'; @@ -1231,19 +1231,19 @@ else // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; print '<tr>'; print '<td>'.$langs->trans("DateStart").'</td>'; print '<td>'; - $form->select_date($object->date_debut,'date_debut'); + Form::select_date($object->date_debut,'date_debut'); print '</td>'; print '</tr>'; print '<tr>'; print '<td>'.$langs->trans("DateEnd").'</td>'; print '<td>'; - $form->select_date($object->date_fin,'date_fin'); + Form::select_date($object->date_fin,'date_fin'); print '</td>'; print '</tr>'; @@ -1335,56 +1335,56 @@ else if ($action == 'save') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_validate","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_validate","","",1); if ($ret == 'html') print '<br>'; } if ($action == 'save_from_refuse') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1); if ($ret == 'html') print '<br>'; } if ($action == 'delete') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1); if ($ret == 'html') print '<br>'; } if ($action == 'validate') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1); if ($ret == 'html') print '<br>'; } if ($action == 'paid') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1); if ($ret == 'html') print '<br>'; } if ($action == 'cancel') { $array_input = array('text'=>$langs->trans("ConfirmCancelTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_cancel",'size'=>"50",'value'=>"")); - $ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("Cancel"),"","confirm_cancel",$array_input,"",1); + $ret=$formForm::formconfirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("Cancel"),"","confirm_cancel",$array_input,"",1); if ($ret == 'html') print '<br>'; } if ($action == 'brouillonner'): - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1); if ($ret == 'html') print '<br>'; endif; if ($action == 'refuse') // Deny { $array_input = array('text'=>$langs->trans("ConfirmRefuseTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_refuse",'size'=>"50",'value'=>"")); - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1); if ($ret == 'html') print '<br>'; } if ($action == 'delete_line') { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid'),$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1); + $ret=$formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid'),$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1); if ($ret == 'html') print '<br>'; } @@ -1394,7 +1394,7 @@ else // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="2">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; print '<tr>'; @@ -1728,7 +1728,7 @@ else // Select date print '<td style="text-align:center;">'; - $form->select_date($objp->date,'date'); + Form::select_date($objp->date,'date'); print '</td>'; // Select project @@ -1812,7 +1812,7 @@ else // Select date print '<td style="text-align:center;">'; - $form->select_date($date?$date:-1,'date'); + Form::select_date($date?$date:-1,'date'); print '</td>'; // Select project diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index f16d6ca14e14449b77e1ddb63f83c860b67a062a..bcd392eb656aadb483679952f54f116442bb34d7 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Societe diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index b7f5be644552ab7f8a9d6b94b182bc5647c8add2..b8db432baad945ce0ddcc4388763b21e99dfce28 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -266,7 +266,7 @@ if ($resql) print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 19d5b3206f70512d5097b9071dc98cefd0fa6b01..b4ff6f99f784ac76e909bacfd731809bd46c628a 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -133,7 +133,7 @@ dol_fiche_head($head, $hselected, $langs->trans("ExpenseReportPayment"), 0, 'pay */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -143,7 +143,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -153,7 +153,7 @@ print '<table class="border" width="100%">'; // Ref print '<tr><td valign="top" width="20%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($payment,'id','',1,'rowid','id'); +print Form::showrefnav($payment,'id','',1,'rowid','id'); print '</td></tr>'; // Date diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index b7d40b2e65b109adc9cdffce939e7e04e41aea71..5a175c222f7eeeb5203635f612f646ea8b716c61 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -210,7 +210,7 @@ if (GETPOST("action") == 'create') print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">'; $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaid):0; - $form->select_date($datepayment,'','','','',"add_payment",1,1); + Form::select_date($datepayment,'','','','',"add_payment",1,1); print "</td>"; print '</tr>'; diff --git a/htdocs/expensereport/synchro_compta.php b/htdocs/expensereport/synchro_compta.php index 59a6b8926fe1228d48e6a5da5d39a98d3ef5b970..38e1858b18e581d99534b455ae3f667fedfd433c 100644 --- a/htdocs/expensereport/synchro_compta.php +++ b/htdocs/expensereport/synchro_compta.php @@ -108,13 +108,13 @@ dol_fiche_head(''); if ($_GET["action"] == 'ndfTOaccount'): $idTrip = $_GET['idTrip']; - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?idTrip=".$idTrip."&account=".$idAccount,$langs->trans("ndfToAccount"),$langs->trans("ConfirmNdfToAccount"),"confirm_ndf_to_account","","",1); + $ret=$htmlForm::formconfirm($_SERVER["PHP_SELF"]."?idTrip=".$idTrip."&account=".$idAccount,$langs->trans("ndfToAccount"),$langs->trans("ConfirmNdfToAccount"),"confirm_ndf_to_account","","",1); if ($ret == 'html') print '<br />'; endif; if ($_GET["action"] == 'accountTOndf'): $idTrip = $_GET['idTrip']; - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?idTrip=".$idTrip."&account=".$idAccount,$langs->trans("AccountToNdf"),$langs->trans("ConfirmAccountToNdf"),"confirm_account_to_ndf","","",1); + $ret=$htmlForm::formconfirm($_SERVER["PHP_SELF"]."?idTrip=".$idTrip."&account=".$idAccount,$langs->trans("AccountToNdf"),$langs->trans("ConfirmAccountToNdf"),"confirm_account_to_ndf","","",1); if ($ret == 'html') print '<br />'; endif; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index c80e7563cee2f9c7ce96818dedd410d9deafbb27..9aed901b9bceb1bc613b230d2a9004c63f5c528f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -1056,7 +1056,7 @@ if ($step == 5 && $datatoexport) */ if ($action == 'remove_file') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 899ecaf9805752dd9a1e1d220c286bd944455915..c10177fdc7a8885ff10a89d57d8ff06e417ea6a7 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -76,7 +76,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; $nbrow=3; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 4a55cad6d19a9c80aa0cb308f2663f2438878f5a..b141407c945fe33c7f7f53024dde309e6cd18a32 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1208,7 +1208,7 @@ else if ($id > 0 || ! empty($ref)) // Confirm deletion of intervention if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); } // Confirm validation @@ -1231,19 +1231,19 @@ else if ($id > 0 || ! empty($ref)) } $text=$langs->trans('ConfirmValidateIntervention',$numref); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',1,1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',1,1); } // Confirm back to draft if ($action == 'modify') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); } // Confirm deletion of line if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.$lineid, $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.$lineid, $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); } if (!$formconfirm) @@ -1269,7 +1269,7 @@ else if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Third party @@ -1309,9 +1309,9 @@ else if ($id > 0 || ! empty($ref)) // Description (must be a textarea and not html must be allowed (used in list view) print '<tr><td>'; - print $form->editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea'); + print Form::editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea'); print '</td><td colspan="3">'; - 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:80'); print '</td>'; print '</tr>'; @@ -1549,7 +1549,7 @@ else if ($id > 0 || ! empty($ref)) // Date d'intervention print '<td align="center" class="nowrap">'; - $form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention"); + Form::select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention"); print '</td>'; // Duration @@ -1616,7 +1616,7 @@ else if ($id > 0 || ! empty($ref)) $timearray=dol_getdate($now); if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); else $timewithnohour=dol_mktime(GETPOST('dihour','int'),GETPOST('dimin','int'), 0,GETPOST('dimonth','int'),GETPOST('diday','int'),GETPOST('diyear','int')); - $form->select_date($timewithnohour,'di',1,1,0,"addinter"); + Form::select_date($timewithnohour,'di',1,1,0,"addinter"); print '</td>'; // Duration diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index b92c1442d14906ecb62f644d6c1960d42ba4aa11..6a2ead722f71a993383e92c742a8976b32637c93 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -129,7 +129,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "</td></tr>"; // Customer diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 2acf7d3909397ebd73b396eaca706e81044ae4d5..deb2f3cdea4edac69c99ac22a8f20c9924689d60 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -107,7 +107,7 @@ if ($object->id) // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Societe diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index c72a2081e36041a92ec94eb967ee7240a1f477c2..129be1d9b22f79c27105efcc056eb8e537c1d24b 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -201,7 +201,7 @@ if ($result) print Form::selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 3c5fce7caa2294234ef4133a83fcf15c6eadad77..52c1d408863bf0512f054ce41fc33af17ef15c0f 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -71,7 +71,7 @@ if ($id > 0 || ! empty($ref)) $linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Company diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 61c2d3862afa3255fdaf846786d781dad34021f3..91a8f43818c071f8530dabecbc81aea794b885e6 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -160,9 +160,9 @@ if ($object->id > 0) $langs->load('compta'); print '<tr>'; print '<td>'; - print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer); + print Form::editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer); print '</td><td colspan="3">'; - print $form->editfieldval("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer); + print Form::editfieldval("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer); print '</td>'; print '</tr>'; } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 95c2afe2c91eefe74e2505f1e3c3c557d3466179..5442600ee3475b1aeb73d31aea320c377c5639fa 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1596,7 +1596,7 @@ if ($action=='create') print '<td>'; $usehourmin=0; if (! empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin=1; - $form->select_date($datelivraison?$datelivraison:-1,'liv_',$usehourmin,$usehourmin,'',"set"); + Form::select_date($datelivraison?$datelivraison:-1,'liv_',$usehourmin,$usehourmin,'',"set"); print '</td></tr>'; // Bank Account @@ -1733,7 +1733,7 @@ elseif (! empty($object->id)) */ if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); } @@ -1745,7 +1745,7 @@ elseif (! empty($object->id)) //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1) ); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1); } @@ -1779,7 +1779,7 @@ elseif (! empty($object->id)) $text.=$notify->confirmMessage('ORDER_SUPPLIER_VALIDATE', $object->socid, $object); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); } } @@ -1820,7 +1820,7 @@ elseif (! empty($object->id)) $text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid, $object); } - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("ApproveThisOrder"), $text, "confirm_".$action, $formquestion, 1, 1, 240); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("ApproveThisOrder"), $text, "confirm_".$action, $formquestion, 1, 1, 240); } /* @@ -1828,7 +1828,7 @@ elseif (! empty($object->id)) */ if ($action == 'refuse') { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1); } @@ -1837,7 +1837,7 @@ elseif (! empty($object->id)) */ if ($action == 'cancel') { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1); } @@ -1847,14 +1847,14 @@ elseif (! empty($object->id)) if ($action == 'commande') { $date_com = dol_mktime(GETPOST('rehour'),GETPOST('remin'),GETPOST('resec'),GETPOST("remonth"),GETPOST("reday"),GETPOST("reyear")); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande",'',0,2); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande",'',0,2); } // Confirmation to delete line if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } if (!$formconfirm) @@ -1885,15 +1885,15 @@ elseif (! empty($object->id)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; // Ref supplier print '<tr><td>'; - print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); + print Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); print '</td><td colspan="2">'; - print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); + print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); print '</td></tr>'; // Fournisseur @@ -2042,7 +2042,7 @@ elseif (! empty($object->id)) print '<input type="hidden" name="action" value="setdate_livraison">'; $usehourmin=0; if (! empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin=1; - $form->select_date($object->date_livraison?$object->date_livraison:-1,'liv_',$usehourmin,$usehourmin,'',"setdate_livraison"); + Form::select_date($object->date_livraison?$object->date_livraison:-1,'liv_',$usehourmin,$usehourmin,'',"setdate_livraison"); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } @@ -2364,9 +2364,9 @@ elseif (! empty($object->id)) print '<br>'; print $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - print $form->select_date($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1); + print Form::select_date($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1); print ' '.$langs->trans('to').' '; - print $form->select_date($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1); + print Form::select_date($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1); print '</td>'; print '<td>'; @@ -2978,7 +2978,7 @@ elseif (! empty($object->id)) //print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("ToOrder").'</td></tr>'; print '<tr><td>'.$langs->trans("OrderDate").'</td><td>'; $date_com = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - print $form->select_date($date_com,'',1,1,'',"commande",1,0,1); + print Form::select_date($date_com,'',1,1,'',"commande",1,0,1); print '</td></tr>'; print '<tr><td>'.$langs->trans("OrderMode").'</td><td>'; @@ -3005,7 +3005,7 @@ elseif (! empty($object->id)) print '<table class="border" width="100%">'; //print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Receive").'</td></tr>'; print '<tr><td>'.$langs->trans("DeliveryDate").'</td><td>'; - print $form->select_date('','',1,1,'',"commande",1,0,1); + print Form::select_date('','',1,1,'',"commande",1,0,1); print "</td></tr>\n"; print "<tr><td>".$langs->trans("Delivery")."</td><td>\n"; diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 8ced1e9844ce767784f40575e3d8598569750e67..49ee75991e357c0308e462906a05ca84a691d272 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -151,7 +151,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 34dd4ad180fa6b669ee4746909a18500bf3ab393..81a09bec2616f3af1ec59a8469e5a1b6a6de2d88 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -286,7 +286,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($commande,'ref','',1,'ref','ref'); + print Form::showrefnav($commande,'ref','',1,'ref','ref'); print '</td>'; print '</tr>'; @@ -510,11 +510,11 @@ if ($id > 0 || ! empty($ref)) print '</td>'; print '<td>'; $dlcdatesuffix=dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); - $form->select_date($dlcdatesuffix,'dlc'.$suffix,'','',1,""); + Form::select_date($dlcdatesuffix,'dlc'.$suffix,'','',1,""); print '</td>'; print '<td>'; $dluodatesuffix=dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); - $form->select_date($dluodatesuffix,'dluo'.$suffix,'','',1,""); + Form::select_date($dluodatesuffix,'dluo'.$suffix,'','',1,""); print '</td>'; print '<td colspan="2"> </td>'; // Qty ordered + qty already dispatached } diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 2949aedcf141382f5504981e285c51ef36a8e710..3209e8c88a6bff6e71371b38153aa94f366a146e 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -115,7 +115,7 @@ if ($object->id > 0) // Ref print '<tr><td width="35%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index c864dce3b88d711ff116bfc967b6d7e6533d20e2..10cbfdecd8ff937e901046c6d60722e8babf256f 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -81,7 +81,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($commande, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($commande, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index b2d6668266feadc9ea3173736d6eca84ea3e5199..6d711c60b0e95e0748abcacbdf7fae61eea13541 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -269,10 +269,10 @@ if ($resql) $formorder->selectSupplierOrderStatus((strstr($search_status, ',')?-1:$search_status),1,'search_status'); print '</td>'; print '<td align="center">'; - print $form->selectyesno('billed', $billed, 1, 0, 1); + print Form::selectyesno('billed', $billed, 1, 0, 1); print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 6a1c6cfe80ead003117161d3b405f003148e5be7..2be8b83288cfed746232da9f8aeb9bba2a801c42 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index a4d08a2ac75aee2ccab6b74218aec4d22ee65371..f444b2a7471b491dff177b74d1d01974e83d0cfa 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -323,7 +323,7 @@ if ($action == 'create' && !$error) { // Date invoice print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; - $html->select_date('', '', '', '', '', "add", 1, 1); + Form::select_date('', '', '', '', '', "add", 1, 1); print '</td></tr>'; // Payment term print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">'; @@ -469,8 +469,8 @@ if (($action != 'create' && $action != 'add') && !$error) { $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period = $html->select_date($date_start, 'date_start', 0, 0, 1, '', 1, 0, 1) . ' - ' . $html->select_date($date_end, 'date_end', 0, 0, 1, '', 1, 0, 1); - $periodely = $html->select_date($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0, 1) . ' - ' . $html->select_date($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 1, '', 1, 0, 1); + $periodely = Form::select_date($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::select_date($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0, 1); if (! empty($socid)) { // Company diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 65dacd0bcb0c239f8ec5f5c7a821e572a87cc477..a3a9a833a06a39549d953f2b318bfce437fb8e2b 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1483,12 +1483,12 @@ if ($action == 'create') // Date invoice print '<tr><td class="fieldrequired">'.$langs->trans('DateInvoice').'</td><td>'; - $form->select_date($dateinvoice,'','','','',"add",1,1); + Form::select_date($dateinvoice,'','','','',"add",1,1); print '</td></tr>'; // Due date print '<tr><td>'.$langs->trans('DateMaxPayment').'</td><td>'; - $form->select_date($datedue,'ech','','','',"add",1,1); + Form::select_date($datedue,'ech','','','',"add",1,1); print '</td></tr>'; // Payment term @@ -1711,7 +1711,7 @@ else //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) ); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); } // Confirmation de la validation @@ -1761,28 +1761,28 @@ else array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); } // Confirmation set paid if ($action == 'paid') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } // Confirmation de la suppression de la facture fournisseur if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } // Confirmation to delete line if ($action == 'ask_deleteline') { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm=Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } if (!$formconfirm) { @@ -1805,13 +1805,13 @@ else // Ref print '<tr><td class="nowrap" width="20%">'.$langs->trans("Ref").'</td><td colspan="4">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print "</tr>\n"; // Ref supplier - print '<tr><td>'.$form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">'; - print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)); + print '<tr><td>'.Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">'; + print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)); print '</td></tr>'; // Third party @@ -1859,8 +1859,8 @@ else print '</td></tr>'; // Label - print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,($user->rights->fournisseur->facture->creer)).'</td>'; - print '<td colspan="3">'.$form->editfieldval("Label",'label',$object->label,$object,($user->rights->fournisseur->facture->creer)).'</td>'; + print '<tr><td>'.Form::editfieldkey("Label",'label',$object->label,$object,($user->rights->fournisseur->facture->creer)).'</td>'; + print '<td colspan="3">'.Form::editfieldval("Label",'label',$object->label,$object,($user->rights->fournisseur->facture->creer)).'</td>'; /* * List of payments @@ -1965,13 +1965,13 @@ else $form_permission = $object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() <= 0; // Date - print '<tr><td>'.$form->editfieldkey("Date",'datef',$object->datep,$object,$form_permission,'datepicker').'</td><td colspan="3">'; - print $form->editfieldval("Date",'datef',$object->datep,$object,$form_permission,'datepicker'); + print '<tr><td>'.Form::editfieldkey("Date",'datef',$object->datep,$object,$form_permission,'datepicker').'</td><td colspan="3">'; + print Form::editfieldval("Date",'datef',$object->datep,$object,$form_permission,'datepicker'); print '</td>'; // Due date - print '<tr><td>'.$form->editfieldkey("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,$form_permission,'datepicker').'</td><td colspan="3">'; - print $form->editfieldval("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,$form_permission,'datepicker'); + print '<tr><td>'.Form::editfieldkey("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,$form_permission,'datepicker').'</td><td colspan="3">'; + print Form::editfieldval("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,$form_permission,'datepicker'); if ($action != 'editdate_lim_reglement' && $object->hasDelay()) { print img_warning($langs->trans('Late')); } diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 664101848a637ddad30860cf7fe4ae7ea0ae6cee..b106d769f633744b92f8c23c68576d89b7f8bcfa 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -145,7 +145,7 @@ if ($id > 0 || ! empty($ref)) // Reference du facture print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); print "</td></tr>"; // Ref supplier @@ -196,8 +196,8 @@ if ($id > 0 || ! empty($ref)) print '</td></tr>'; // Label - print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; - print $form->editfieldval("Label",'label',$object->label,$object,0); + print '<tr><td>'.Form::editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; + print Form::editfieldval("Label",'label',$object->label,$object,0); print '</td></tr>'; // Status diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 7b36ec62c375a5c75d3a3eb414772f92993fa7bf..63a14f95f491d0f0d57b262dde06dcdbcfae316b 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -101,7 +101,7 @@ if ($object->id > 0) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } @@ -111,7 +111,7 @@ if ($object->id > 0) // Ref print '<tr><td width="30%" class="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td>'; print "</tr>\n"; @@ -164,8 +164,8 @@ if ($object->id > 0) print '</td></tr>'; // Label - print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; - print $form->editfieldval("Label",'label',$object->label,$object,0); + print '<tr><td>'.Form::editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; + print Form::editfieldval("Label",'label',$object->label,$object,0); print '</td>'; // Status diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index a5ea3b88286777d08256602064c9fa5c087d9832..089fae1c371ec8dd414a343c578168422dff1c2c 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -216,7 +216,7 @@ if ($user->rights->fournisseur->facture->lire) print '<input class="flat" type="text" size="8" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">'; print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 34d8a0e13e44d7809002112c808afac1bb7cb465..c54c9a520bbefb9160b330bf9f92f533b7610221 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -341,7 +341,7 @@ if ($resql) print Form::selectarray('filtre', $liststatus, $search_status, 1); print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 3a4528d827e303e2f11f195760aa0ed22a872c52..2ede6e6976f83652c3e819fb36deada24e8b0d47 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -84,7 +84,7 @@ if ($object->id > 0) // Ref print '<tr><td width="20%" class="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); print '</td>'; print "</tr>\n"; @@ -135,8 +135,8 @@ if ($object->id > 0) print '</td></tr>'; // Label - print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; - print $form->editfieldval("Label",'label',$object->label,$object,0); + print '<tr><td>'.Form::editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">'; + print Form::editfieldval("Label",'label',$object->label,$object,0); print '</td></tr>'; // Status diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index dd9d8fae87ff20cf38bad1c9bd80a99070047638..f45db9eeb8d63984cf7d069c6bc9cc31b3662275 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -355,7 +355,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print $supplierstatic->getNomUrl(1,'supplier'); print '</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>'; - $form->select_date($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date); + Form::select_date($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date); print '</td>'; print '<td>'.$langs->trans('Comments').'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans('PaymentMode').'</td><td>'; @@ -537,7 +537,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $text.='<br>'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print '<input type="hidden" name="closepaidinvoices" value="'.GETPOST('closepaidinvoices').'">'; } - print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('PayedSuppliersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); + print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('PayedSuppliersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); } print '</form>'; @@ -642,7 +642,7 @@ if (empty($action)) print '<input class="flat" type="text" size="4" name="search_amount" value="'.$search_amount.'">'; print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print "</tr>\n"; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 3b93eb85cc9aed55794ebcea2c6bbd919d4c524e..ab2d4ed0f249f1b9ce32ebf4ce6faca74740000c 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -155,7 +155,7 @@ if ($result > 0) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete'); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete'); } @@ -164,7 +164,7 @@ if ($result > 0) */ if ($action == 'valide') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide'); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide'); } @@ -172,12 +172,12 @@ if ($result > 0) print '<tr>'; print '<td width="20%" colspan="2">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'id','',1,'rowid','ref'); + print Form::showrefnav($object,'id','',1,'rowid','ref'); print '</td></tr>'; // Date payment - print '<tr><td colspan="2">'.$form->editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; - print $form->editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); + print '<tr><td colspan="2">'.Form::editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; + print Form::editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print '</td></tr>'; // Payment mode @@ -185,8 +185,8 @@ if ($result > 0) print '<tr><td colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$labeltype.'</td></tr>'; // Payment numero - print '<tr><td colspan="2">'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; - print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); + print '<tr><td colspan="2">'.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; + print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); print '</td></tr>'; // Amount @@ -198,8 +198,8 @@ if ($result > 0) } // Note - print '<tr><td colspan="2">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; - print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer,'textarea'); + print '<tr><td colspan="2">'.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; + print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer,'textarea'); print '</td></tr>'; $allow_delete = 1 ; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index b0d6b4affa2b5c826f282ac7dc7087d642d82645..d0fd41578d46e2a3e61a27f45ca6395ba1095c34 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -192,7 +192,7 @@ else print '<td>'.$langs->trans("FTPPassiveMode").'</td>'; $defaultpassive=GETPOST("FTP_PASSIVE_" . ($lastftpentry+1)); if (! isset($_POST["FTP_PASSIVE_" . ($lastftpentry+1)])) $defaultpassive=empty($conf->global->FTP_SUGGEST_PASSIVE_BYDEFAULT)?0:1; - print '<td>'.$form->selectyesno('FTP_PASSIVE_'.($lastftpentry+1), $defaultpassive, 2).'</td>'; + print '<td>'.Form::selectyesno('FTP_PASSIVE_'.($lastftpentry+1), $defaultpassive, 2).'</td>'; print '<td>'.$langs->trans("No").'</td>'; print '</tr>'; @@ -273,7 +273,7 @@ else $var=!$var; print "<tr ".$bc[$var].">"; print "<td width=\"100\">".$langs->trans("FTPPassiveMode")."</td>"; - print '<td>'.$form->selectyesno('FTP_PASSIVE_'.$idrss, @constant("FTP_PASSIVE_" . $idrss), 1).'</td>'; + print '<td>'.Form::selectyesno('FTP_PASSIVE_'.$idrss, @constant("FTP_PASSIVE_" . $idrss), 1).'</td>'; print "</tr>"; print "<tr>"; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 62bb22bf328f61b68385842658d5bab23a7c5b98..377d003baec25c0b05a4f1cbd7840c02b2c8265e 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -410,14 +410,14 @@ else // Confirm remove file if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); } // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index eb7604cc2af1a0214597fb3ee62f9d8f05ef3cef..fa82111bd75e5006f669f613d813daa9bb6fde47 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -823,10 +823,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print '<td>'; // Si la demande ne vient pas de l'agenda if (! GETPOST('date_debut_')) { - $form->select_date(-1,'date_debut_'); + Form::select_date(-1,'date_debut_'); } else { $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year')); - $form->select_date($tmpdate,'date_debut_'); + Form::select_date($tmpdate,'date_debut_'); } print ' '; print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning')); @@ -839,10 +839,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print '<td>'; // Si la demande ne vient pas de l'agenda if (! GETPOST('date_fin_')) { - $form->select_date(-1,'date_fin_'); + Form::select_date(-1,'date_fin_'); } else { $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year')); - $form->select_date($tmpdate,'date_fin_'); + Form::select_date($tmpdate,'date_fin_'); } print ' '; print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon')); @@ -949,33 +949,33 @@ else { if ($user->rights->holiday->delete) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); } } // Si envoi en validation if ($action == 'sendToValidate' && $cp->statut == 1) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); } // Si validation de la demande if ($action == 'valid') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); } // Si refus de la demande if ($action == 'refuse') { $array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>"")); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); } // Si annulation de la demande if ($action == 'cancel') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); } $head=holiday_prepare_head($cp); @@ -999,7 +999,7 @@ else print '<tr>'; print '<td width="25%">'.$langs->trans("Ref").'</td>'; print '<td>'; - print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref'); + print Form::showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref'); print '</td>'; print '</tr>'; @@ -1035,7 +1035,7 @@ else print '<tr>'; print '<td>'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')</td>'; print '<td>'; - $form->select_date($cp->date_debut,'date_debut_'); + Form::select_date($cp->date_debut,'date_debut_'); print ' '; print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print '</td>'; @@ -1057,7 +1057,7 @@ else print '<tr>'; print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>'; print '<td>'; - $form->select_date($cp->date_fin,'date_fin_'); + Form::select_date($cp->date_fin,'date_fin_'); print ' '; print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print '</td>'; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index e06b74217a668f4b2424495c27eded795b6667c3..d7fb7ec837e20376a339b97fb28a3ccff53fec15 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -115,7 +115,7 @@ if ($object->id) print '<tr>'; print '<td width="25%">'.$langs->trans("Ref").'</td>'; print '<td>'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref'); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref'); print '</td>'; print '</tr>'; @@ -151,7 +151,7 @@ if ($object->id) print '<tr>'; print '<td>'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')</td>'; print '<td>'; - $form->select_date($object->date_debut,'date_debut_'); + Form::select_date($object->date_debut,'date_debut_'); print ' '; print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print '</td>'; @@ -173,7 +173,7 @@ if ($object->id) print '<tr>'; print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>'; print '<td>'; - $form->select_date($object->date_fin,'date_fin_'); + Form::select_date($object->date_fin,'date_fin_'); print ' '; print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print '</td>'; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 46883f11a2657f21ecb0104fc7843efd3a0113e0..d298ac9bc0b7964758606fdc417d78d2f577a6d9 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -369,7 +369,7 @@ print '</td>'; // ACTION print '<td class="liste_titre" align="right">'; -$searchpitco=$form->showFilterAndCheckAddButtons(0); +$searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index e548b3d240340462a82b1ad19b0ebc203d61ec64..812cd34c03aa6f8b7a8aff4c1ca13517e81d2b59 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -318,7 +318,7 @@ else if ($id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteEstablishment"),$langs->trans("ConfirmDeleteEstablishment"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteEstablishment"),$langs->trans("ConfirmDeleteEstablishment"),"confirm_delete"); } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 021e08d5b53fb4c3efd382818be6027d8fde500b..282d2dea547b0d5b06db703f14fb333292e3fb6f 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -491,7 +491,7 @@ if ($step == 3 && $datatoimport) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 410ade379fce58488144a37fa86bdb6868a7e97f..0af6d054b21c0f17f19cf9e96db2f187eee02836 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -556,7 +556,7 @@ else if ($action == 'delete') { $expedition_id = GETPOST("expid"); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&expid='.$expedition_id.'&backtopage='.urlencode($backtopage),$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$object->ref),'confirm_delete','','',1); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&expid='.$expedition_id.'&backtopage='.urlencode($backtopage),$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$object->ref),'confirm_delete','','',1); } @@ -565,7 +565,7 @@ else */ if ($action == 'valid') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$object->ref),'confirm_valid','','',1); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$object->ref),'confirm_valid','','',1); } @@ -585,8 +585,8 @@ else print '<tr><td width="20%">'.$langs->trans("RefSending").'</td>'; print '<td colspan="3">'; // Nav is hidden because on a delivery receipt of a shipment, if we go on next shipment, we may find no tab (a shipment may not have delivery receipt yet) - //print $form->showrefnav($expedition, 'refshipment', $linkback, 1, 'ref', 'ref'); - print $form->showrefnav($expedition, 'refshipment', $linkback, 0, 'ref', 'ref'); + //print Form::showrefnav($expedition, 'refshipment', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($expedition, 'refshipment', $linkback, 0, 'ref', 'ref'); print '</td></tr>'; } @@ -647,7 +647,7 @@ else print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="setdate_livraison">'; - $form->select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison"); + Form::select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison"); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index ee799284ea7fa962f8dc5491583945cb39e4c3cf..74facc489405633b5af5ed9a7c5e15c80b626769 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -218,13 +218,13 @@ if ($action == 'create') // Date Start print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td><td>'; - print $form->select_date($datestart?$datestart:-1,'start','','','','add',1,1,1); + print Form::select_date($datestart?$datestart:-1,'start','','','','add',1,1,1); print '</td></tr>'; // Date End print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td><td>'; - print $form->select_date($dateend?$dateend:-1,'end','','','','add',1,1,1); + print Form::select_date($dateend?$dateend:-1,'end','','','','add',1,1,1); print '</td></tr>'; // Number of terms @@ -312,13 +312,13 @@ if ($id > 0) if ($action == 'paid') { $text=$langs->trans('ConfirmPayLoan'); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PayLoan'),$text,"confirm_paid",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PayLoan'),$text,"confirm_paid",'','',2); } if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteLoan'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteLoan'),$text,'confirm_delete','','',2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteLoan'),$text,'confirm_delete','','',2); } if ($action == 'edit') @@ -333,7 +333,7 @@ if ($id > 0) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print "</td></tr>"; // Label @@ -356,7 +356,7 @@ if ($id > 0) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->datestart, 'start', 0, 0, 0, 'update', 1, 0, 1); + print Form::select_date($object->datestart, 'start', 0, 0, 0, 'update', 1, 0, 1); } else { @@ -369,7 +369,7 @@ if ($id > 0) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->dateend, 'end', 0, 0, 0, 'update', 1, 0, 1); + print Form::select_date($object->dateend, 'end', 0, 0, 0, 'update', 1, 0, 1); } else { diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 97d5c2265075b9bce7a13de5f207a2f3c977b3e8..c371203fac21d71edef83253f694ca31439b2190 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -100,7 +100,7 @@ if ($object->id) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print "</td></tr>"; // Label @@ -123,7 +123,7 @@ if ($object->id) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->datestart, 'start', 0, 0, 0, 'loan', 1, 0, 1); + print Form::select_date($object->datestart, 'start', 0, 0, 0, 'loan', 1, 0, 1); } else { @@ -137,7 +137,7 @@ if ($object->id) print "<td>"; if ($action == 'edit') { - print $form->select_date($object->dateend, 'end', 0, 0, 0, 'loan', 1, 0, 1); + print Form::select_date($object->dateend, 'end', 0, 0, 0, 'loan', 1, 0, 1); } else { diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 18b51c86fee981d6b28abb952e2ac7557414c63b..e7d193d9c2d8e2ccdcdec44dbea2fdd6091da5f8 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -77,7 +77,7 @@ if ($id > 0) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; - print $form->showrefnav($object,'id','','','rowid','ref'); + print Form::showrefnav($object,'id','','','rowid','ref'); print '</td></tr>'; // Name print '<tr><td width="20%">'.$langs->trans("Name").'</td>'; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 6315264bad7569b55d7381dfbf01d9b44bb2070a..85802f20eca75ac22670f5a6df7a96c20bb1c821 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -132,7 +132,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentLoan"), 0, 'payment'); */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } /* @@ -141,7 +141,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -150,7 +150,7 @@ print '<table class="border" width="100%">'; // Ref print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($payment,'id','',1,'rowid','id'); +print Form::showrefnav($payment,'id','',1,'rowid','id'); print '</td></tr>'; // Date diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 06061da5c2276e1edc601961a0fae79972cd0497..96d236a1c76d237a2d2897502517d2183d21e0b5 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -200,7 +200,7 @@ if ($_GET["action"] == 'create') print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">'; $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0; - $form->select_date($datepayment, '', '', '', '', "add_payment", 1, 1); + Form::select_date($datepayment, '', '', '', '', "add_payment", 1, 1); print "</td>"; print '</tr>'; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index f9189ed7e974f24768d2eaf37134f22d638caa56..e049fd2627f2a9a954d5761cd03b720b67575cc9 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -101,11 +101,11 @@ if ($user->rights->margins->read->all) { // Start date print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($startdate,'startdate','','',1,"sel",1,1); +Form::select_date($startdate,'startdate','','',1,"sel",1,1); print '</td>'; print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($enddate,'enddate','','',1,"sel",1,1); +Form::select_date($enddate,'enddate','','',1,"sel",1,1); print '</td>'; print '<td style="text-align: center;">'; print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />'; diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index ac53d079298bc7b667ae1977d7fba797100a33e3..ded9fb3368dd8edddd849cef3c842cce0673feaa 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -126,11 +126,11 @@ print '<table class="border" width="100%">'; // Start date print '<td>' . $langs->trans('StartDate') . ' (' . $langs->trans("DateValidation") . ')</td>'; print '<td width="20%">'; -$form->select_date($startdate, 'startdate', '', '', 1, "sel", 1, 1); +Form::select_date($startdate, 'startdate', '', '', 1, "sel", 1, 1); print '</td>'; print '<td width="20%">' . $langs->trans('EndDate') . ' (' . $langs->trans("DateValidation") . ')</td>'; print '<td width="20%">'; -$form->select_date($enddate, 'enddate', '', '', 1, "sel", 1, 1); +Form::select_date($enddate, 'enddate', '', '', 1, "sel", 1, 1); print '</td>'; print '<td style="text-align: center;">'; print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Launch')) . '" name="button_search" />'; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 93f3220d12cc6c22c70442937bdd06ccf6886246..14fc7187886a6a164a4c5165b6de2942981514c7 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -122,11 +122,11 @@ if (! $sortfield) // Start date print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($startdate,'startdate','','',1,"sel",1,1); +Form::select_date($startdate,'startdate','','',1,"sel",1,1); print '</td>'; print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($enddate,'enddate','','',1,"sel",1,1); +Form::select_date($enddate,'enddate','','',1,"sel",1,1); print '</td>'; print '<td style="text-align: center;">'; print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />'; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index e8483c90a34267074a872b078bc0ef40c2292fc7..a1ffac185923766a85777f9ed7471f7a1d18a638 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -124,11 +124,11 @@ else { // Start date print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($startdate,'startdate','','',1,"sel",1,1); +Form::select_date($startdate,'startdate','','',1,"sel",1,1); print '</td>'; print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>'; print '<td width="20%">'; -$form->select_date($enddate,'enddate','','',1,"sel",1,1); +Form::select_date($enddate,'enddate','','',1,"sel",1,1); print '</td>'; print '<td style="text-align: center;">'; print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />'; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index c419a8042103946fc3ed356f33ff0d6fa733c04c..642ed9a648ad8b797df8261a1af1a0aad5703abd 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -198,7 +198,7 @@ $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).'">'.$langs->tra // Ref print '<tr><td width="18%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); +print Form::showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); print '</td>'; print '</tr>'; @@ -282,7 +282,7 @@ print '</td></tr>'; // Expire date print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">'; -if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1); +if ($action == 'edit') print Form::select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1); else print dol_print_date($object->date_fin,'day'); print '</td></tr>'; @@ -351,7 +351,7 @@ print '</div>'; if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondage, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondage, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); } diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 5ab76133748d959ba061f58f95c44e8d0dbafb12..52cc0e0adc86b17271d956f7505c9f606680790a 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -108,7 +108,7 @@ print '<td></td>'; $arraystatus=array(''=>' ','expired'=>$langs->trans("Expired"),'opened'=>$langs->trans("Opened")); print '<td align="center">'. Form::selectarray('status', $arraystatus, $status).'</td>'; print '<td class="liste_titre" align="right">'; -$searchpitco=$form->showFilterAndCheckAddButtons(0); +$searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'."\n"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index d51a308e679f935482d35d0e2b849426bafcf8c7..739a8c7dc2408568ff0ff781aac9093f4bc1ba06 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -434,7 +434,7 @@ $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).(! empty($socid) // Ref print '<tr><td width="18%">'.$langs->trans('Ref').'</td>'; print '<td colspan="3">'; -print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); +print Form::showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); print '</td>'; print '</tr>'; @@ -457,7 +457,7 @@ print '</td></tr>'; // Expire date print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">'; -if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1); +if ($action == 'edit') print Form::select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1); else print dol_print_date($object->date_fin,'day'); print '</td></tr>'; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index c9ba1324a70f583e5af61c73f713b8d7728756fd..28444f0bf70180bf416b4cfc0b01a96762c391fc 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -156,7 +156,7 @@ print '</tr>'."\n"; print '<tr><td class="fieldrequired">'. $langs->trans("ExpireDate") .'</td><td>'; -print $form->select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0,1); +print Form::select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0,1); print '</tr>'."\n"; print '</table>'."\n"; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 6e34fb836b01c246bb990aa4fa038cf00f6c2f7e..8ad879f6e1f06d993119eab8d4637c267c1cd9b5 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -131,7 +131,7 @@ print "</tr>\n"; $var=!$var; print '<tr '.$bc[$var].'><td class="fieldrequired">'; print $langs->trans("PAYPAL_API_SANDBOX").'</td><td>'; -print $form->selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1); +print Form::selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1); print '</td></tr>'; $var=!$var; @@ -176,7 +176,7 @@ print '</td></tr>'; /*$var=!$var; print '<tr '.$bc[$var].'><td>'; print '<span class="fieldrequired">'.$langs->trans("PAYPAL_API_EXPRESS").'</span></td><td>'; -print $form->selectyesno("PAYPAL_API_EXPRESS",$conf->global->PAYPAL_API_EXPRESS); +print Form::selectyesno("PAYPAL_API_EXPRESS",$conf->global->PAYPAL_API_EXPRESS); print '</td></tr>'; */ @@ -197,7 +197,7 @@ print '</td></tr>'; $var=!$var; print '<tr '.$bc[$var].'><td>'; print $langs->trans("PAYPAL_ADD_PAYMENT_URL").'</td><td>'; -print $form->selectyesno("PAYPAL_ADD_PAYMENT_URL",$conf->global->PAYPAL_ADD_PAYMENT_URL,1); +print Form::selectyesno("PAYPAL_ADD_PAYMENT_URL",$conf->global->PAYPAL_ADD_PAYMENT_URL,1); print '</td></tr>'; $var=!$var; @@ -238,7 +238,7 @@ print '</td></tr>'; $var=!$var; print '<tr '.$bc[$var].'><td>'; print $langs->trans("SecurityTokenIsUnique").'</td><td>'; -print $form->selectyesno("PAYPAL_SECURITY_TOKEN_UNIQUE",(empty($conf->global->PAYPAL_SECURITY_TOKEN)?0:$conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE),1); +print Form::selectyesno("PAYPAL_SECURITY_TOKEN_UNIQUE",(empty($conf->global->PAYPAL_SECURITY_TOKEN)?0:$conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE),1); print '</td></tr>'; print '</table>'; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index eac5b2bd720ecebee8aa075cff800f3fdcd898d9..c315bd50ce03bc2ec69c16c06b4520f8a8c18a40 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -604,7 +604,7 @@ $var=!$var; print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("AssociatedProductsAbility").'</td>'; print '<td width="60" align="right">'; -print $form->selectyesno("activate_sousproduits",$conf->global->PRODUIT_SOUSPRODUITS,1); +print Form::selectyesno("activate_sousproduits",$conf->global->PRODUIT_SOUSPRODUITS,1); print '</td>'; print '</tr>'; @@ -646,7 +646,7 @@ $var=!$var; print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("ViewProductDescInFormAbility").'</td>'; print '<td width="60" align="right">'; -print $form->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); +print Form::selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); print '</td>'; print '</tr>'; @@ -656,7 +656,7 @@ $var=!$var; print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("MergePropalProductCard").'</td>'; print '<td width="60" align="right">'; -print $form->selectyesno("activate_mergePropalProductCard",$conf->global->PRODUIT_PDF_MERGE_PROPAL,1); +print Form::selectyesno("activate_mergePropalProductCard",$conf->global->PRODUIT_PDF_MERGE_PROPAL,1); print '</td>'; print '</tr>'; */ @@ -667,7 +667,7 @@ $var=!$var; print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("UseUnits").'</td>'; print '<td width="60" align="right">'; -print $form->selectyesno("activate_units",$conf->global->PRODUCT_USE_UNITS,1); +print Form::selectyesno("activate_units",$conf->global->PRODUCT_USE_UNITS,1); print '</td>'; print '</tr>'; */ @@ -679,7 +679,7 @@ if (! empty($conf->global->MAIN_MULTILANGS)) print '<tr '.$bc[$var].'>'; print '<td>'.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").'</td>'; print '<td width="60" align="right">'; - print $form->selectyesno("activate_viewProdTextsInThirdpartyLanguage", (! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)?$conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE:0), 1); + print Form::selectyesno("activate_viewProdTextsInThirdpartyLanguage", (! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)?$conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE:0), 1); print '</td>'; print '</tr>'; } diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index d91ab5a010e68493fd05fe4e6cfeae63c02cbea8..75920b86e9ab8fa4d56f7ff90b63472be843af4e 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -140,7 +140,7 @@ class ActionsCardProduct { $head = product_prepare_head($this->object); - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'ref','',1,'ref'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'ref','',1,'ref'); $titre=$langs->trans("CardProduct".$this->object->type); $picto=($this->object->type==Product::TYPE_SERVICE?'service':'product'); @@ -148,12 +148,12 @@ class ActionsCardProduct $this->tpl['showend']=dol_get_fiche_end(); // Accountancy buy code - $this->tpl['accountancyBuyCodeKey'] = $form->editfieldkey("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); - $this->tpl['accountancyBuyCodeVal'] = $form->editfieldval("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); + $this->tpl['accountancyBuyCodeKey'] = Form::editfieldkey("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); + $this->tpl['accountancyBuyCodeVal'] = Form::editfieldval("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); // Accountancy sell code - $this->tpl['accountancySellCodeKey'] = $form->editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); - $this->tpl['accountancySellCodeVal'] = $form->editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); + $this->tpl['accountancySellCodeKey'] = Form::editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); + $this->tpl['accountancySellCodeVal'] = Form::editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); } $this->tpl['finished'] = $this->object->finished; diff --git a/htdocs/product/canvas/product/tpl/list.tpl.php b/htdocs/product/canvas/product/tpl/list.tpl.php index e57fd5adfabf1b7e4b22cf9b22e27ade5d8484d2..2b4cadd7521fe3e64cf551ff4ccab9ee33d7c3dd 100644 --- a/htdocs/product/canvas/product/tpl/list.tpl.php +++ b/htdocs/product/canvas/product/tpl/list.tpl.php @@ -71,7 +71,7 @@ <td class="liste_titre" align="<?php echo $searchfield['align']; ?>"><input class="flat" type="text" name="s<?php echo $searchfield['alias']; ?>" value=""></td> <?php } else if ($key == $num) { print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; } else { ?> diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 9cfb23bc156cef54659b9b52ef2823a587c819ba..572d403ba2f89868e061bf88fcf5c7967ddb8f0e 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -139,7 +139,7 @@ class ActionsCardService { $head = product_prepare_head($this->object); - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'ref','',1,'ref'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'ref','',1,'ref'); $titre=$langs->trans("CardProduct".$this->object->type); $picto=($this->object->type==Product::TYPE_SERVICE?'service':'product'); @@ -147,12 +147,12 @@ class ActionsCardService $this->tpl['showend']=dol_get_fiche_end(); // Accountancy buy code - $this->tpl['accountancyBuyCodeKey'] = $form->editfieldkey("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); - $this->tpl['accountancyBuyCodeVal'] = $form->editfieldval("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); + $this->tpl['accountancyBuyCodeKey'] = Form::editfieldkey("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); + $this->tpl['accountancyBuyCodeVal'] = Form::editfieldval("ProductAccountancyBuyCode",'productaccountancycodesell',$this->accountancy_code_sell,$this,$user->rights->produit->creer); // Accountancy sell code - $this->tpl['accountancySellCodeKey'] = $form->editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); - $this->tpl['accountancySellCodeVal'] = $form->editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); + $this->tpl['accountancySellCodeKey'] = Form::editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); + $this->tpl['accountancySellCodeVal'] = Form::editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,$this,$user->rights->produit->creer); } $this->tpl['finished'] = $this->object->finished; diff --git a/htdocs/product/canvas/service/tpl/list.tpl.php b/htdocs/product/canvas/service/tpl/list.tpl.php index 4fc875e15bfb9f3d6f8cc2d1b8d9792447c1f850..4d8005b64b706eadda23cf4da8346f9cc2585159 100644 --- a/htdocs/product/canvas/service/tpl/list.tpl.php +++ b/htdocs/product/canvas/service/tpl/list.tpl.php @@ -71,7 +71,7 @@ <td class="liste_titre" align="<?php echo $searchfield['align']; ?>"><input class="flat" type="text" name="s<?php echo $searchfield['alias']; ?>" value=""></td> <?php } else if ($key == $num) { print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; } else { ?> diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 76ec3e8e057507c1de58ca1c6e4feddfdb2c08ff..16ace689470fc4e335578b5977ab40d17ed76e02 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1424,8 +1424,8 @@ else { // TODO change for compatibility with edit in place $typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); - print '<tr><td class="titlefield">'.$form->editfieldkey("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat).'</td><td colspan="2">'; - print $form->editfieldval("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat); + print '<tr><td class="titlefield">'.Form::editfieldkey("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat).'</td><td colspan="2">'; + print Form::editfieldval("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat); print '</td></tr>'; } @@ -1705,14 +1705,14 @@ $formquestionclone=array( if (($action == 'delete' && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js || (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js { - print $form->formconfirm("card.php?id=".$object->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete"); + print Form::formconfirm("card.php?id=".$object->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete"); } // Clone confirmation if (($action == 'clone' && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js || (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$object->ref),'confirm_clone',$formquestionclone,'yes','action-clone',250,600); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$object->ref),'confirm_clone',$formquestionclone,'yes','action-clone',250,600); } diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 90726b669a17090401bf37c45902f5e60a610578..00b89abe2fddf658ffbf007c4745b1b89f5ee750 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -200,7 +200,7 @@ if ($id > 0 || ! empty($ref)) // Reference print '<td width="25%">'.$langs->trans("Ref").'</td><td>'; - print $form->showrefnav($object,'ref','',1,'ref'); + print Form::showrefnav($object,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 49a837e1d4c75a895fbe4fbd3f852e484f763078..f08e9fe42839c1b9e66f4f5ccd5f43e87d0a5f15 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -313,9 +313,9 @@ if ($id > 0 || $ref) $textdesc =$langs->trans("CostPriceDescription"); $textdesc.="<br>".$langs->trans("CostPriceUsage"); $text=Form::textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', ''); - print $form->editfieldkey($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); + print Form::editfieldkey($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); print '</td><td colspan="2">'; - print $form->editfieldval($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); + print Form::editfieldval($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); print '</td></tr>'; print '</table>'; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 4f12671829fb79c44c4a4ef680412b78d294df5e..4b7e2b8ffd9d81cfebda92031ba67800f7a61130 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -507,7 +507,7 @@ else print '</td>'; } // To batch - if (! empty($arrayfields['p.tobatch']['checked'])) print '<td class="liste_titre center">'.$form->selectyesno($search_tobatch, '', '', '', 1).'</td>'; + if (! empty($arrayfields['p.tobatch']['checked'])) print '<td class="liste_titre center">'.Form::selectyesno($search_tobatch, '', '', '', 1).'</td>'; // Stock if (! empty($arrayfields['p.stock']['checked'])) print '<td class="liste_titre"> </td>'; // Accountancy code sell @@ -551,7 +551,7 @@ else print '</td>'; } print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 6dcd8a7c32d3ae3f801d14842c8cb6a7e381f9df..2b6c71b445b9164eb973a4a39736792b54faa5e6 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1650,7 +1650,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<td colspan="8"> </td>'; // Print the search button print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 27f85cd90abff9d173a7ce9919234b40c8a30655..aec1ceb14f95779e3b5da2a388c2b298354738ee 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -280,7 +280,7 @@ if ($resql) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 3b77f9c5ba7e31d76f96cdce242b2a679b009e05..de297a1c12e9140217c0f816c9c20c3174f5bc67 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -293,7 +293,7 @@ if ($resql) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 80d8bea62f757a3bc232ae7214e7f3fe89a0237a..b2ad9faae7b36535d4e37fdb06efe1d1de61a523 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -255,7 +255,7 @@ else // Confirm delete third party if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2); } print '<table class="border" width="100%">'; @@ -264,7 +264,7 @@ else // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'libelle'); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'libelle'); print '</td>'; print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$object->lieu.'</td></tr>'; diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index 8add246afa2adcf3f1d843c65611f57ec3cc7570..aa74d3c9113339a52bd3a8906e31b879748b7c4b 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -65,7 +65,7 @@ if ($_GET["id"]) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($entrepot,'id','',1,'rowid','libelle'); + print Form::showrefnav($entrepot,'id','',1,'rowid','libelle'); print '</td>'; print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$entrepot->lieu.'</td></tr>'; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 60913635f7aecbc32583864ff6b4c982c46596a0..d947f6957ecfaf62e8bda38fe7c49ca5e3e99a05 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -157,7 +157,7 @@ if ($result) print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 190bf676c8a62ab75e209613f651fee92e1825ed..23a9e4074a1460c7ebfe64d07da6bc74dfa69750 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -428,7 +428,7 @@ if ($resql) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($entrepot, 'id', $linkback, 1, 'rowid', 'libelle'); + print Form::showrefnav($entrepot, 'id', $linkback, 1, 'rowid', 'libelle'); print '</td>'; print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$entrepot->lieu.'</td></tr>'; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 3e934ae945dca04f763710850d7028725422f1f6..f353849940d7ac196c0c92af59e133b38b1e2775 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -471,13 +471,13 @@ if ($id > 0 || $ref) } // Stock alert threshold - print '<tr><td>'.$form->editfieldkey("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).'</td><td colspan="2">'; - print $form->editfieldval("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer); + print '<tr><td>'.Form::editfieldkey("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).'</td><td colspan="2">'; + print Form::editfieldval("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer); print '</td></tr>'; // Desired stock - print '<tr><td>'.$form->editfieldkey("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer).'</td><td colspan="2">'; - print $form->editfieldval("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer); + print '<tr><td>'.Form::editfieldkey("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer).'</td><td colspan="2">'; + print Form::editfieldval("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer); print '</td></tr>'; // Real stock @@ -737,10 +737,10 @@ if ($resql) print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><input type="hidden" name="pdluoid" value="'.$pdluo->id.'"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="'.$id.'"><table class="noborder" width="100%"><tr><td width="10%"></td>'; print '<td align="right" width="10%"><input type="text" name="batch_number" value="'.$pdluo->batch.'"></td>'; print '<td align="center" width="10%">'; - $form->select_date($pdluo->eatby,'eatby','','',1,'',1,0,1); + Form::select_date($pdluo->eatby,'eatby','','',1,'',1,0,1); print '</td>'; print '<td align="center" width="10%">'; - $form->select_date($pdluo->sellby,'sellby','','',1,'',1,0,1); + Form::select_date($pdluo->sellby,'sellby','','',1,'',1,0,1); print '</td>'; print '<td align="right" width="10%">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>'; print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'">'; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index c31699a12ef8b4e2a88de985dd2a2d6ded35fff3..bb21c3aa285ff4e16ad84f01ff49559654ba960c 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -472,7 +472,7 @@ print '<td class="liste_titre"> </td>'. '<td class="liste_titre" align="right"> </td>'. '<td class="liste_titre"> </td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 785760ef5111c69e8068069ae2027fb9069a001f..c6f1f910ae8b99c7cb4c32ab4869b9b9fd87ad4d 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -239,7 +239,7 @@ if ($resql) '<input type="text" class="flat" name="search_ttc" value="' . $sttc . '">'. '</td>'. '<td class="liste_titre">'. - $form->select_date('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, ''). + Form::select_date('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, ''). '</td>'. '<td class="liste_titre" align="right">'; $src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png'; diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index d9f02781fd55e5c08258861522d56339a98ca0c0..7ba1465ba6588b8a845107a40bc3461c28acf919 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -93,12 +93,12 @@ print '</tr><tr>'; print '<td colspan="2">'.$langs->trans("l_eatby").'</td><td>'; $eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - $form->select_date($eatbyselected,'eatby','','',1,""); + Form::select_date($eatbyselected,'eatby','','',1,""); print '</td>'; print '<td></td>'; print '<td>'.$langs->trans("l_sellby").'</td><td>'; $sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); - $form->select_date($sellbyselected,'sellby','','',1,""); + Form::select_date($sellbyselected,'sellby','','',1,""); print '</td>'; print '</tr>'; } diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 1c0448192f1c2404a65b4499f7480d8ef19837c3..9a61531e976f22a5ef2159c85ea594ccf558a0db 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -92,10 +92,10 @@ print '</td>'; print '</tr><tr>'; print '<td>'.$langs->trans("l_eatby").'</td><td>'; - print $form->select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print Form::select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print '</td>'; print '<td>'.$langs->trans("l_sellby").'</td><td>'; - print $form->select_date(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print Form::select_date(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print '</td>'; print '<td colspan="2"></td>'; print '</tr>'; diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 7e23fe123d0d6f8d3a29896c336d754986de3b50..ec11b458d1b50dc1f485a519b060ef185db3f82e 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -296,7 +296,7 @@ $nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_ $nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"day")." </span>\n"; $nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n"; $nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)"; -$nav.='<br>'.$form->select_date(-1,'',0,0,2,"addtime",1,0,1).' '; +$nav.='<br>'.Form::select_date(-1,'',0,0,2,"addtime",1,0,1).' '; $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $picto='calendarweek'; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 57da487aee0f84455df43fc04cd5e6b8e7646114..d350633c0f5368ea89fc7404e7c39e1f8c40ca56 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -274,7 +274,7 @@ $nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_ $nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week." </span>\n"; $nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n"; $nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)"; -$nav.='<br>'.$form->select_date(-1,'',0,0,2,"addtime",1,0,1).' '; +$nav.='<br>'.Form::select_date(-1,'',0,0,2,"addtime",1,0,1).' '; $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $picto='calendarweek'; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index cccc8e35505f0786d644658f71c4d9e1c8aa0a4f..e4e4b3b58713079c785ac42f107c6f90553abbb9 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -344,7 +344,7 @@ print '<td width="60" align="right">'; $arrval=array('0'=>$langs->trans("No"), '1'=>$langs->trans("Yes"), ); -print $form->selectyesno('PROJECT_USE_OPPORTUNITIES', $conf->global->PROJECT_USE_OPPORTUNITIES, 1); +print Form::selectyesno('PROJECT_USE_OPPORTUNITIES', $conf->global->PROJECT_USE_OPPORTUNITIES, 1); print '</td><td align="right">'; print '<input type="submit" class="button" name="modifyPROJECT_USE_OPPORTUNITIES" value="'.$langs->trans("Modify").'">'; print "</td>"; @@ -357,7 +357,7 @@ print '<td width="60" align="right">'; $arrval=array('0'=>$langs->trans("No"), '1'=>$langs->trans("Yes"), ); -print $form->selectyesno('PROJECT_USE_TASKS', empty($conf->global->PROJECT_HIDE_TASKS)?1:0, 1); +print Form::selectyesno('PROJECT_USE_TASKS', empty($conf->global->PROJECT_HIDE_TASKS)?1:0, 1); print '</td><td align="right">'; print '<input type="submit" class="button" name="modifyPROJECT_USE_TASKS" value="'.$langs->trans("Modify").'">'; print "</td>"; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index d2d6dcb150621886bd16f8c02cc973338c3e8dda..c50ff50f437e1721a4484700cb88dfe1b4b32e3d 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -492,12 +492,12 @@ if ($action == 'create' && $user->rights->projet->creer) // Date start print '<tr><td>'.$langs->trans("DateStart").'</td><td>'; - print $form->select_date(($date_start?$date_start:''),'projectstart',0,0,0,'',1,0,1); + print Form::select_date(($date_start?$date_start:''),'projectstart',0,0,0,'',1,0,1); print '</td></tr>'; // Date end print '<tr><td>'.$langs->trans("DateEnd").'</td><td>'; - print $form->select_date(($date_end?$date_end:-1),'projectend',0,0,0,'',1,0,1); + print Form::select_date(($date_end?$date_end:-1),'projectend',0,0,0,'',1,0,1); print '</td></tr>'; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) @@ -590,17 +590,17 @@ else // Confirmation validation if ($action == 'validate') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1); } // Confirmation close if ($action == 'close') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1); } // Confirmation reopen if ($action == 'reopen') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1); } // Confirmation delete if ($action == 'delete') @@ -610,7 +610,7 @@ else $taskarray=$task->getTasksArray(0,0,$object->id,0,0); $nboftask=count($taskarray); if ($nboftask) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks",$nboftask); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1); } // Clone confirmation @@ -626,7 +626,7 @@ else array('type' => 'checkbox', 'name' => 'clone_task_files', 'label' => $langs->trans("CloneTaskFiles"), 'value' => false) ); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CloneProject"), $langs->trans("ConfirmCloneProject"), "confirm_clone", $formquestion, '', 1, 240); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CloneProject"), $langs->trans("ConfirmCloneProject"), "confirm_clone", $formquestion, '', 1, 240); } @@ -676,7 +676,7 @@ else // Date start print '<tr><td>'.$langs->trans("DateStart").'</td><td>'; - print $form->select_date($object->date_start?$object->date_start:-1,'projectstart',0,0,0,'',1,0,1); + print Form::select_date($object->date_start?$object->date_start:-1,'projectstart',0,0,0,'',1,0,1); print ' <input type="checkbox" name="reportdate" value="yes" '; if ($comefromclone){print ' checked ';} print '/> '. $langs->trans("ProjectReportDate"); @@ -684,7 +684,7 @@ else // Date end print '<tr><td>'.$langs->trans("DateEnd").'</td><td>'; - print $form->select_date($object->date_end?$object->date_end:-1,'projectend',0,0,0,'',1,0,1); + print Form::select_date($object->date_end?$object->date_end:-1,'projectend',0,0,0,'',1,0,1); print '</td></tr>'; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) @@ -742,7 +742,7 @@ else $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index ebfad425cf8de395ce7750e49a382973d0fff2a2..1ed682fe1862a02f4ce9f6c77adb72c5a043f021 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -164,7 +164,7 @@ if ($id > 0 || ! empty($ref)) $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Label diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index ce033f0e1937c57558c45bbd1d9f275a14ac8e1c..8385c07b250c58edda392db3963ea3108df0d1bc 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -118,7 +118,7 @@ if ($object->id > 0) $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 30a8f87a4fa2f35192dae1816c1ef4c9447e9a47..c18f556d3916110b5499dd185e5b58f9a1b03ea5 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -128,7 +128,7 @@ if (! $user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } -print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); +print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>'; @@ -324,10 +324,10 @@ if (! $showdatefilter) print '<input type="hidden" name="action" value="view">'; print '<table><tr>'; print '<td>'.$langs->trans("From").' '; - print $form->select_date($dates,'dates',0,0,1,'',1,0,1); + print Form::select_date($dates,'dates',0,0,1,'',1,0,1); print '</td>'; print '<td>'.$langs->trans("to").' '; - print $form->select_date($datee,'datee',0,0,1,'',1,0,1); + print Form::select_date($datee,'datee',0,0,1,'',1,0,1); print '</td>'; print '<td>'; print '<input type="submit" name="refresh" value="'.$langs->trans("Refresh").'" class="button">'; diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 091059d76e3d9e61d6367d77b3d601563e48f1b8..fa8f5ff8b2631273df432960fcef8efce8c084a0 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -112,7 +112,7 @@ if ($id > 0 || ! empty($ref)) $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>'; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index af5e5a799c3a4279ca8acd087afff8f828e2c6e3..870d0c2622cd9bffe3b4eb3951d623a8ab7197e7 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -516,7 +516,7 @@ if ($resql) } // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 45c4cffd65bc7d39bc58e3faa41d152f4e9edc6a..a6815804474269e34288346262af43c29300090b 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref)) $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '</td></tr>'; // Label diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 434b8e798860c86e88252d8fdf96bf11e496da22..af00e34076db0675369e6bb65b1c3765fb0b5b91 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -218,7 +218,7 @@ if ($id > 0 || ! empty($ref)) $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>'; @@ -317,12 +317,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Date start print '<tr><td>'.$langs->trans("DateStart").'</td><td>'; - print $form->select_date(($date_start?$date_start:''),'dateo',1,1,0,'',1,1,1); + print Form::select_date(($date_start?$date_start:''),'dateo',1,1,0,'',1,1,1); print '</td></tr>'; // Date end print '<tr><td>'.$langs->trans("DateEnd").'</td><td>'; - print $form->select_date(($date_end?$date_end:-1),'datee',1,1,0,'',1,1,1); + print Form::select_date(($date_end?$date_end:-1),'datee',1,1,0,'',1,1,1); print '</td></tr>'; // planned workload diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 0faf21c1cc23e515753b289b33ff87430370d189..1fdf7c55833b1f9c25d8c1b1071a18f54a5d1cd9 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -203,7 +203,7 @@ if ($id > 0 || ! empty($ref)) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); + print Form::showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>'; @@ -262,7 +262,7 @@ if ($id > 0 || ! empty($ref)) $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); print '</td></tr>'; // Label diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 97a09ad1f87b8294714d10728c87378a5c36321b..83ba3b2a27a3fda74b49d6a7268af7f3e8ca13fd 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -146,7 +146,7 @@ if ($object->id > 0) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); + print Form::showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>'; @@ -207,7 +207,7 @@ if ($object->id > 0) $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); print '</td>'; print '</tr>'; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 9e3e44f403f525884796a2626b7e2a89b4335673..3c193d2ff3981cf88a06a648d8a9af0d770cf8f7 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -505,7 +505,7 @@ if ($resql) } // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index e62e58df58ba50cfb2062b6c1978147301d3fb0b..91b9f4214e1258ee2ffb0306d109eae994f50f05 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -126,7 +126,7 @@ if ($object->id > 0) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); + print Form::showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print '</td></tr>'; // Project @@ -179,7 +179,7 @@ if ($object->id > 0) $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); print '</td></tr>'; // Label diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 1a3b1921713f2de8535823b9a8329745a8949288..a8662469d1e2d5b4447baac76b5f67c3303af0f1 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -232,7 +232,7 @@ if ($id > 0 || ! empty($ref)) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1'); + print Form::showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>'; @@ -338,12 +338,12 @@ if ($id > 0 || ! empty($ref)) // Date start print '<tr><td>'.$langs->trans("DateStart").'</td><td>'; - print $form->select_date($object->date_start,'dateo',1,1,0,'',1,0,1); + print Form::select_date($object->date_start,'dateo',1,1,0,'',1,0,1); print '</td></tr>'; // Date end print '<tr><td>'.$langs->trans("DateEnd").'</td><td>'; - print $form->select_date($object->date_end?$object->date_end:-1,'datee',1,1,0,'',1,0,1); + print Form::select_date($object->date_end?$object->date_end:-1,'datee',1,1,0,'',1,0,1); print '</td></tr>'; // Planned workload @@ -393,7 +393,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete"); } print '<table class="border" width="100%">'; @@ -408,7 +408,7 @@ if ($id > 0 || ! empty($ref)) $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); print '</td>'; print '</tr>'; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 976e0013431cc7c21c526f75f5688627e7b42f55..dff8587feeb92d6fdac7984a5ff1926f73e3d917 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -259,7 +259,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } - print $form->showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1'); + print Form::showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1'); print '</td></tr>'; // Label @@ -328,7 +328,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if ($action == 'deleteline') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1); } print '<table class="border" width="100%">'; @@ -346,7 +346,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','',$param); print '</td></tr>'; // Label @@ -431,7 +431,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '<td class="nowrap">'; //$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); $newdate=''; - print $form->select_date($newdate,'time',1,1,2,"timespent_date",1,0,1); + print Form::select_date($newdate,'time',1,1,2,"timespent_date",1,0,1); print '</td>'; // Contributor @@ -551,7 +551,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '<td class="nowrap">'; if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) { - print $form->select_date(($date2?$date2:$date1),'timeline',1,1,2,"timespent_date",1,0,1); + print Form::select_date(($date2?$date2:$date1),'timeline',1,1,2,"timespent_date",1,0,1); } else { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 73796b22abf3401e68e650bbebfcd2beea6e8542..25a347e594661976426570cb5c1ac0d252d3dd84 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -504,7 +504,7 @@ if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) } // Birthday print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateToBirth").'</td><td>'; -print $form->select_date($birthday,'birth',0,0,1,"newmember",1,0,1); +print Form::select_date($birthday,'birth',0,0,1,"newmember",1,0,1); print '</td></tr>'."\n"; // Photo print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" size="40" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\n"; diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 3e4a0be406afd34d5f0ac5231ec783d7c0056662..cb22e4ee9566e78b128b9c5002287b6ba514fb1c 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -140,7 +140,7 @@ if ($showbirthday) $nav.='<input type="hidden" name="showbirthday" value="1">'; if ($pid) $nav.='<input type="hidden" name="projectid" value="'.$pid.'">'; if ($type) $nav.='<input type="hidden" name="type" value="'.$type.'">'; if ($usergroup) $nav.='<input type="hidden" name="usergroup" value="'.$usergroup.'">'; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav.='</form>'; diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index 2ea576f3492241107d4cd9e89e9a8a4f2064178b..2237153838b0c682df3e8643f7346ddb38823cb4 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -31,19 +31,19 @@ print "Test 1: We must have here current hour for user (must match hour on brows $offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60; $offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60; print " (dol_tz=".$offsettz." dol_dst=".$dol_dst.")<br>\n"; -$form->select_date('', 'test1', 1, 1, 0); +Form::select_date('', 'test1', 1, 1, 0); print '<br><br>'."\n"; // Test2: form->select_date using tzuser date print "Test 2: We must have here 1970-01-01 00:00:00 selected (fields can be empty)<br>\n"; -$form->select_date(dol_get_first_day(1970,1,false), 'test2', 1, 1, 1); +Form::select_date(dol_get_first_day(1970,1,false), 'test2', 1, 1, 1); print '<br><br>'."\n"; // Test3: form->select_date for 1970-01-01 00:00:00 print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory)<br>\n"; -$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0); +Form::select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0); print '<br><br>'."\n"; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 31fb6a955b17b8c8d16a471bb9fcf02a4519d6d9..e3ab9ffb787f2467f70eeed8eb0254b49fedf8f5 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -206,7 +206,7 @@ if ( $object->fetch($id) > 0 ) // Confirm deleting resource line if ($action == 'delete') { - print $form->formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1); + print Form::formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1); } @@ -217,7 +217,7 @@ if ( $object->fetch($id) > 0 ) print '<tr><td style="width:35%">'.$langs->trans("ResourceFormLabel_ref").'</td><td>'; $linkback = $objet->ref.' <a href="list.php">'.$langs->trans("BackToList").'</a>'; - print $form->showrefnav($object, 'id', $linkback,1,"rowid"); + print Form::showrefnav($object, 'id', $linkback,1,"rowid"); print '</td>'; print '</tr>'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index e4477e1674ad9f0386a610a1ed400af60652411f..7ff2eca718f352ebab9a70cb64549f5c9ebc8ee2 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -175,7 +175,7 @@ else // Confirmation suppression resource line if ($action == 'delete_resource') { - print $form->formconfirm("element_resource.php?element=".$element."&element_id=".$element_id."&id=".$id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_linked_resource",'','',1); + print Form::formconfirm("element_resource.php?element=".$element."&element_id=".$element_id."&id=".$id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_linked_resource",'','',1); } @@ -201,7 +201,7 @@ else // Ref print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; - print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '</td></tr>'; // Type diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 9bfa7309167237447cadc4883c216e4da97951e5..29de48b6916dbaefc38cfca455e7dc1c41cfe7c3 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -86,7 +86,7 @@ llxHeader('',$pagetitle,''); // Confirmation suppression resource line if ($action == 'delete_resource') { - print $form->formconfirm($_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_resource",'','',1); + print Form::formconfirm($_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_resource",'','',1); } // Load object list diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 30fe69d47b34a5d0435af67874377d0dc74060b7..6b5dcb40a3c6eef9a1dc494dec3367e3490b5b6f 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -475,7 +475,7 @@ abstract class ActionsCardCommon if ($modCodeFournisseur->code_auto) $this->tpl['prefix_suppliercode'] = $modCodeFournisseur->verif_prefixIsUsed(); // Supplier - $this->tpl['yn_supplier'] = $form->selectyesno("fournisseur",$this->object->fournisseur,1); + $this->tpl['yn_supplier'] = Form::selectyesno("fournisseur",$this->object->fournisseur,1); $this->tpl['suppliercode'] = $this->object->code_fournisseur; if ((!$this->object->code_fournisseur || $this->object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) $this->tpl['suppliercode'] = $modCodeFournisseur->getNextValue($this->object,1); $this->tpl['ismodifiable_suppliercode'] = $this->object->codefournisseur_modifiable(); @@ -508,7 +508,7 @@ abstract class ActionsCardCommon if (! empty($conf->global->MAIN_MULTILANGS)) $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang?$this->object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1); // VAT - $this->tpl['yn_assujtva'] = $form->selectyesno('assujtva_value',$this->tpl['tva_assuj'],1); // Assujeti par defaut en creation + $this->tpl['yn_assujtva'] = Form::selectyesno('assujtva_value',$this->tpl['tva_assuj'],1); // Assujeti par defaut en creation // Select users $this->tpl['select_users'] = $form->select_dolusers($this->object->commercial_id, 'commercial_id', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); @@ -522,21 +522,21 @@ abstract class ActionsCardCommon if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { $this->tpl['localtax'].= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td>'; - $this->tpl['localtax'].= $form->selectyesno('localtax1assuj_value',$this->object->localtax1_assuj,1); + $this->tpl['localtax'].= Form::selectyesno('localtax1assuj_value',$this->object->localtax1_assuj,1); $this->tpl['localtax'].= '</td><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td>'; - $this->tpl['localtax'].= $form->selectyesno('localtax2assuj_value',$this->object->localtax1_assuj,1); + $this->tpl['localtax'].= Form::selectyesno('localtax2assuj_value',$this->object->localtax1_assuj,1); $this->tpl['localtax'].= '</td></tr>'; } elseif($mysoc->localtax1_assuj=="1") { $this->tpl['localtax'].= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">'; - $this->tpl['localtax'].= $form->selectyesno('localtax1assuj_value',$this->object->localtax1_assuj,1); + $this->tpl['localtax'].= Form::selectyesno('localtax1assuj_value',$this->object->localtax1_assuj,1); $this->tpl['localtax'].= '</td><tr>'; } elseif($mysoc->localtax2_assuj=="1") { $this->tpl['localtax'].= '<tr><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">'; - $this->tpl['localtax'].= $form->selectyesno('localtax2assuj_value',$this->object->localtax1_assuj,1); + $this->tpl['localtax'].= Form::selectyesno('localtax2assuj_value',$this->object->localtax1_assuj,1); $this->tpl['localtax'].= '</td><tr>'; } } @@ -549,7 +549,7 @@ abstract class ActionsCardCommon $this->tpl['showhead']=dol_get_fiche_head($head, 'card', '', 0, 'company'); $this->tpl['showend']=dol_get_fiche_end(); - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'socid','',($user->societe_id?0:1),'rowid','nom'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'socid','',($user->societe_id?0:1),'rowid','nom'); $this->tpl['checkcustomercode'] = $this->object->check_codeclient(); $this->tpl['checksuppliercode'] = $this->object->check_codefournisseur(); diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 1f58f3cdc99a241258270bd245e5d0f2f3894913..f5fef0994a1386cb20e4634bde4c2834138e37f0 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -163,7 +163,7 @@ class ActionsCardCompany extends ActionsCardCommon // Confirm delete third party if ($action == 'delete') { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"1,action-delete"); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"1,action-delete"); } for ($i=1; $i<=4; $i++) diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index 78064004e3767a31d3fee67f4b0a7004f24af03d..d4db225fde58d00f7068266bd647a8b5621daead 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -112,7 +112,7 @@ class ActionsCardIndividual extends ActionsCardCommon // Confirm delete third party if ($action == 'delete' || $conf->use_javascript_ajax) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteAnIndividual"),$langs->trans("ConfirmDeleteIndividual"),"confirm_delete",'',0,"1,action-delete"); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteAnIndividual"),$langs->trans("ConfirmDeleteIndividual"),"confirm_delete",'',0,"1,action-delete"); } } } diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 9f7a53644ea0279db235571617467857a6d32828..bb9a7d127c5d69e21729523d5f20d5037cb2c73c 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -367,7 +367,7 @@ if ($sql_select) print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">'; print '</td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 61dd88c1aa09738616dd4004988cee2897ceafa0..89b002fbf1d5098bda8336bf38956e6e97f4ef94 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -816,7 +816,7 @@ if ($resql) } // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index efa75b3c5357eca35fdba498b074916b20a3bbc0..056b4aa218e07685ee7f9dccea82886684b1c639 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -513,7 +513,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<td colspan="8"> </td>'; // Print the search button print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index c7f087daf72eb2c7cc65897ff123a18448d23ec3..aa400ba0d38d27bb1862133f8d174746fb238feb 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -235,7 +235,7 @@ if ($socid && $action != 'edit' && $action != "create") // Confirm delete third party if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); } dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index dc20ecba0749d47e2390df9f6ef5a564cba6c5fa..6fe8860d252138be8023d76bc8737f622df15686 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1018,7 +1018,7 @@ else // Supplier print '<tr>'; print '<td>'.fieldLabel('Supplier','fournisseur',1).'</td><td>'; - print $form->selectyesno("fournisseur", (isset($_POST['fournisseur'])?GETPOST('fournisseur'):(GETPOST("type") == '' ? -1 : $object->fournisseur)), 1, 0, (GETPOST("type") == '' ? 1 : 0)); + print Form::selectyesno("fournisseur", (isset($_POST['fournisseur'])?GETPOST('fournisseur'):(GETPOST("type") == '' ? -1 : $object->fournisseur)), 1, 0, (GETPOST("type") == '' ? 1 : 0)); print '</td>'; print '<td>'.fieldLabel('SupplierCode','supplier_code').'</td><td>'; print '<table class="nobordernopadding"><tr><td>'; @@ -1121,7 +1121,7 @@ else // Assujeti TVA print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td>'; print '<td>'; - print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation + print Form::selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print '</td>'; print '<td class="nowrap">'.fieldLabel('VATIntra','intra_vat').'</td>'; print '<td class="nowrap">'; @@ -1186,22 +1186,22 @@ else if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>'; - print $form->selectyesno('localtax1assuj_value',0,1); + print Form::selectyesno('localtax1assuj_value',0,1); print '</td><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>'; - print $form->selectyesno('localtax2assuj_value',0,1); + print Form::selectyesno('localtax2assuj_value',0,1); print '</td></tr>'; } elseif($mysoc->localtax1_assuj=="1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td colspan="3">'; - print $form->selectyesno('localtax1assuj_value',0,1); + print Form::selectyesno('localtax1assuj_value',0,1); print '</td><tr>'; } elseif($mysoc->localtax2_assuj=="1") { print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">'; - print $form->selectyesno('localtax2assuj_value',0,1); + print Form::selectyesno('localtax2assuj_value',0,1); print '</td><tr>'; } @@ -1560,7 +1560,7 @@ else { print '<tr>'; print '<td>'.fieldLabel('Supplier','fournisseur',1).'</td><td>'; - print $form->selectyesno("fournisseur",$object->fournisseur,1); + print Form::selectyesno("fournisseur",$object->fournisseur,1); print '</td>'; print '<td>'.fieldLabel('SupplierCode','supplier_code').'</td><td>'; @@ -1676,7 +1676,7 @@ else // VAT payers print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td><td>'; - print $form->selectyesno('assujtva_value',$object->tva_assuj,1); + print Form::selectyesno('assujtva_value',$object->tva_assuj,1); print '</td>'; // VAT Code @@ -1714,7 +1714,7 @@ else if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td>'; - print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); + print Form::selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': '; @@ -1723,7 +1723,7 @@ else } print '</td><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td>'; - print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); + print Form::selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if (! isOnlyOneLocalTax(2)) { print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': '; @@ -1736,7 +1736,7 @@ else elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">'; - print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); + print Form::selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': '; @@ -1749,7 +1749,7 @@ else elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">'; - print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); + print Form::selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if(! isOnlyOneLocalTax(2)) { print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': '; @@ -1903,7 +1903,7 @@ else // Confirm delete third party if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); } if ($action == 'merge') @@ -1917,7 +1917,7 @@ else ) ); - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 190); + print Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 190); } dol_htmloutput_errors($error,$errors); @@ -1981,7 +1981,7 @@ else print '<tr><td>'; print $langs->trans('Gencod').'</td><td>'.$object->barcode; print '</td>'; - if ($htmllogobar) $htmllogobar.=$form->showbarcode($object); + if ($htmllogobar) $htmllogobar.=Form::showbarcode($object); print $htmllogobar; $htmllogobar=''; print '</tr>'; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 5dd6c7eb2b6b5f9a2f447eca7556838587d3ecdd..ddaef38a77889d96ba86e6971d016b0bf9ba110e 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1138,9 +1138,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask"); + Form::select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask"); } else { - $form->select_date(-1, 'liv_', '', '', '', "addask", 1, 1); + Form::select_date(-1, 'liv_', '', '', '', "addask", 1, 1); } print '</td></tr>'; @@ -1358,22 +1358,22 @@ if ($action == 'create') // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen else if ($action == 'reopen') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line else if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate askprice @@ -1401,7 +1401,7 @@ if ($action == 'create') } if (! $error) - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1420,7 +1420,7 @@ if ($action == 'create') // Ref print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">'; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; // Company @@ -1458,7 +1458,7 @@ if ($action == 'create') print '<form name="editdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="action" value="setdate_livraison">'; - $form->select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); + Form::select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; print '</form>'; } else { diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index ff1abaa2da1040060ae0302df709bd6933e855c7..9f2338b69d71a230f6e36e4fdba90b3ae1b5d8b0 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -99,7 +99,7 @@ if ($object->id > 0) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; // Supplier diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 4e9f3affa501f84bfc20fc7ef98e57bb2ebebab4..32d7d22dc66b548ac709b20f131f4eb9b0c3521e 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; // Customer diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 0b2ed1b5fa6411a45bb0deae251eb8dbe6ca2f17..dd80281d0933e7b1d134ed837579c5b5b62116ab 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -756,7 +756,7 @@ if (($action == 'create') || ($action == 'adduserldap')) // Employee print '<tr>'; print '<td>'.fieldLabel('Employee','employee',0).'</td><td>'; - print $form->selectyesno("employee",(isset($_POST['employee'])?GETPOST('employee'):0),1); + print Form::selectyesno("employee",(isset($_POST['employee'])?GETPOST('employee'):0),1); print '</td></tr>'; // Position/Job @@ -847,7 +847,7 @@ if (($action == 'create') || ($action == 'adduserldap')) { print '<tr><td>'.$langs->trans("Administrator").'</td>'; print '<td>'; - print $form->selectyesno('admin',GETPOST('admin'),1); + print Form::selectyesno('admin',GETPOST('admin'),1); if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->multicompany->transverse_mode)) { @@ -1199,7 +1199,7 @@ else */ if ($action == 'password') { - print $form->formconfirm("card.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1); + print Form::formconfirm("card.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1); } /* @@ -1207,7 +1207,7 @@ else */ if ($action == 'passwordsend') { - print $form->formconfirm("card.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1); + print Form::formconfirm("card.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1); } /* @@ -1215,7 +1215,7 @@ else */ if ($action == 'disable') { - print $form->formconfirm("card.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1); + print Form::formconfirm("card.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1); } /* @@ -1223,7 +1223,7 @@ else */ if ($action == 'enable') { - print $form->formconfirm("card.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1); + print Form::formconfirm("card.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1); } /* @@ -1231,7 +1231,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm("card.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); + print Form::formconfirm("card.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); } /* @@ -1828,7 +1828,7 @@ else // Employee print '<tr>'; print '<td>'.fieldLabel('Employee','employee',0).'</td><td>'; - print $form->selectyesno("employee",$object->employee,1); + print Form::selectyesno("employee",$object->employee,1); print '</td></tr>'; // Position/Job @@ -1924,7 +1924,7 @@ else ) ) { - print $form->selectyesno('admin',$object->admin,1); + print Form::selectyesno('admin',$object->admin,1); if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->multicompany->transverse_mode)) { diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 6f5e79b9d6098406d862c94f2dde10b41918c677..70caca334d0db1dc7364fcb4ac0be1a57e39dcce 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -296,7 +296,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1); } /* @@ -312,7 +312,7 @@ else // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); + print Form::showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); print '</td>'; print '</tr>'; diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index 199041551c5423f84e88f62b78418686e1a7a505..6d23fcda8d810e1caf571f5c0d1327a74b5bd4a1 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -102,7 +102,7 @@ print '<table class="border" width="100%">'; // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; -print $form->showrefnav($fgroup,'id','',$canreadperms); +print Form::showrefnav($fgroup,'id','',$canreadperms); print '</td>'; print '</tr>'; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 9ffda5e96c8bbaa97ccb81cec7c8255416cffaea..32a1a8129cdc2f5b8a332bd7782f6a04eb237734 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -193,7 +193,7 @@ if ($id) // Ref print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<td colspan="2">'; - print $form->showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin); + print Form::showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin); print '</td>'; print '</tr>'; diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 3d6b22d28de9ba7ab5849f1b6eec14e52e423de8..d05ca0ef1e583ad46d61150fc8b5469c3b15897b 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -153,7 +153,7 @@ print '<td align="right">'; print Form::selectarray('search_statut', array('-1'=>'','1'=>$langs->trans('Enabled')),$search_statut); print '</td>'; print '<td class="liste_titre" align="right">'; -$searchpitco=$form->showFilterAndCheckAddButtons(0); +$searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; print '</tr>'; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 489799437bb440738b2840b34996656c5262892f..eaddfc1248a57a409383537f036f1695f78c94a3 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -332,7 +332,7 @@ if ($result) if (! empty($arrayfields['u.employee']['checked'])) { print '<td>'; - print $form->selectyesno('search_employee', $search_employee, 1, false, 1); + print Form::selectyesno('search_employee', $search_employee, 1, false, 1); print '</td>'; } if (! empty($arrayfields['u.accountancy_code']['checked'])) @@ -396,7 +396,7 @@ if ($result) } // Action column print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '</td>'; diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 05236aabf7efe51e0e119488eb8c11019b7ca97d..f9770194e029fbfc5a0af36e78afa0e8c32d3d82 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -102,7 +102,7 @@ $periodlink = ''; $exportlink = ''; $nom = $langs->trans("ReportThirdParty"); -$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); +$period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $description = $langs->trans("DescThirdPartyReport"); $builddate = time();