Qual: Remove duplicate form instanciation.

This commit is contained in:
Laurent Destailleur 2013-09-06 12:10:09 +02:00
parent 91718bc902
commit c151ef7b87
53 changed files with 153 additions and 168 deletions

View File

@ -102,6 +102,8 @@ if ($action == 'unset')
* View * View
*/ */
$form = new Form($db);
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('',$langs->trans("MembersSetup"),$help_url); llxHeader('',$langs->trans("MembersSetup"),$help_url);
@ -127,7 +129,6 @@ print '<td>'.$langs->trans("Value").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>'; print '<td align="center">'.$langs->trans("Action").'</td>';
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
$form = new Form($db);
// Login/Pass required for members // Login/Pass required for members
$var=!$var; $var=!$var;

View File

@ -171,7 +171,6 @@ if ($result)
{ {
print '<input type="hidden" name="action" value="2bank">'; print '<input type="hidden" name="action" value="2bank">';
print '<input type="hidden" name="rowid" value="'.$objp->crowid.'">'; print '<input type="hidden" name="rowid" value="'.$objp->crowid.'">';
$form = new Form($db);
$form->select_comptes('','accountid',0,'',1); $form->select_comptes('','accountid',0,'',1);
print '<br>'; print '<br>';
$form->select_types_paiements('','paymenttypeid'); $form->select_types_paiements('','paymenttypeid');

View File

@ -653,7 +653,7 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm
/* /*
* View * View
*/ */
$form = new Form($db); $form = new Form($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);

View File

@ -233,7 +233,6 @@ if (! $rowid && $action != 'create' && $action != 'edit')
/* ************************************************************************** */ /* ************************************************************************** */
if ($action == 'create') if ($action == 'create')
{ {
$form = new Form($db);
$adht = new AdherentType($db); $adht = new AdherentType($db);
print_fiche_titre($langs->trans("NewMemberType")); print_fiche_titre($langs->trans("NewMemberType"));
@ -620,8 +619,6 @@ if ($rowid > 0)
if ($action == 'edit') if ($action == 'edit')
{ {
$form = new Form($db);
$adht = new AdherentType($db); $adht = new AdherentType($db);
$adht->id = $rowid; $adht->id = $rowid;
$adht->fetch($rowid); $adht->fetch($rowid);

View File

@ -143,6 +143,8 @@ if ($action == 'delete')
* View * View
*/ */
$form = new Form($db);
llxHeader('',$langs->trans("OtherSetup")); llxHeader('',$langs->trans("OtherSetup"));
// Add logic to show/hide buttons // Add logic to show/hide buttons
@ -184,9 +186,6 @@ print '<td align="center">'.$langs->trans("Action").'</td>';
print "</tr>\n"; print "</tr>\n";
$form = new Form($db);
// Line to add new record // Line to add new record
$var=false; $var=false;
print "\n"; print "\n";

View File

@ -123,6 +123,8 @@ if ($action == 'update')
* View * View
*/ */
$form = new Form($db);
llxHeader(); llxHeader();
print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','setup'); print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','setup');
@ -131,7 +133,6 @@ print $langs->transnoentities("DelaysOfToleranceDesc",img_warning());
print " ".$langs->trans("OnlyActiveElementsAreShown",DOL_URL_ROOT.'/admin/modules.php')."<br>\n"; print " ".$langs->trans("OnlyActiveElementsAreShown",DOL_URL_ROOT.'/admin/modules.php')."<br>\n";
print "<br>\n"; print "<br>\n";
$form = new Form($db);
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>'; $countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
if ($action == 'edit') if ($action == 'edit')

View File

@ -66,6 +66,8 @@ if ($action == 'reset' && $user->admin)
* View * View
*/ */
$form = new Form($db);
$_SESSION["mode"]=$mode; $_SESSION["mode"]=$mode;
$help_url='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; $help_url='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
@ -252,7 +254,6 @@ if (! empty($categ[$categidx]))
$categidx='expdev'; $categidx='expdev';
if (! empty($categ[$categidx])) if (! empty($categ[$categidx]))
{ {
$form = new Form($db);
$categidx='expdev'; $categidx='expdev';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); $head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);

View File

@ -35,13 +35,13 @@ if (! $user->admin)
* View * View
*/ */
$form = new Form($db);
$title=$langs->trans("SystemToolsArea"); $title=$langs->trans("SystemToolsArea");
if (GETPOST('leftmenu') == 'modulesadmintools') $title=$langs->trans("ModulesSystemTools"); if (GETPOST('leftmenu') == 'modulesadmintools') $title=$langs->trans("ModulesSystemTools");
llxHeader(array(),$title); llxHeader(array(),$title);
$form = new Form($db);
print_fiche_titre($title,'','setup'); print_fiche_titre($title,'','setup');
print $langs->trans("SystemToolsAreaDesc").'<br>'; print $langs->trans("SystemToolsAreaDesc").'<br>';

View File

@ -193,9 +193,10 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr
* View * View
*/ */
llxHeader("","",$langs->trans("Categories"));
$form = new Form($db); $form = new Form($db);
llxHeader("","",$langs->trans("Categories"));
if ($user->rights->categorie->creer) if ($user->rights->categorie->creer)
{ {
/* /*

View File

@ -299,7 +299,6 @@ if ($id > 0)
// Conditions de reglement par defaut // Conditions de reglement par defaut
$langs->load('bills'); $langs->load('bills');
$form = new Form($db);
print '<tr><td>'; print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('PaymentConditions'); print $langs->trans('PaymentConditions');

View File

@ -297,7 +297,7 @@ if ($socid > 0)
if ($_GET['action'] == 'remove') if ($_GET['action'] == 'remove')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
} }
/* /*
@ -394,7 +394,7 @@ if ($socid > 0)
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
); );
$langs->load("dict"); $langs->load("dict");
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($obj->amount_ttc),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($obj->amount_ttc),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -145,8 +145,8 @@ if ($id > 0 || ! empty($ref))
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload

View File

@ -300,8 +300,8 @@ if ($id > 0 || ! empty($ref))
if ($action == 'delete') if ($action == 'delete')
{ {
$text=$langs->trans('ConfirmDeleteTransaction'); $text=$langs->trans('ConfirmDeleteTransaction');
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
if ($ret == 'html') print '<br>';
} }
// Define transaction list navigation string // Define transaction list navigation string

View File

@ -130,8 +130,8 @@ if (($_GET["id"] || $_GET["ref"]) && $action != 'edit')
// Confirmation de la suppression // Confirmation de la suppression
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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");
if ($ret == 'html') print '<br>';
} }

View File

@ -373,8 +373,8 @@ else
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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");
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -266,8 +266,8 @@ if ($result)
// Confirmations // Confirmations
if ($action == 'delete_categ') if ($action == 'delete_categ')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<form name="update" method="POST" action="'.$_SERVER['PHP_SELF'].'?rowid='.$rowid.'">'; print '<form name="update" method="POST" action="'.$_SERVER['PHP_SELF'].'?rowid='.$rowid.'">';

View File

@ -146,8 +146,8 @@ if ($object->id)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload

View File

@ -436,8 +436,8 @@ else if ($id)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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");
if ($ret == 'html') print '<br>';
} }
$soc = new Societe($db); $soc = new Societe($db);

View File

@ -174,8 +174,8 @@ if ($id > 0 || ! empty($ref))
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>';
} }

View File

@ -306,8 +306,8 @@ else
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -315,8 +315,8 @@ else
*/ */
if ($action == 'valide') if ($action == 'valide')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
} }

View File

@ -192,8 +192,8 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"), 0, 'p
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -202,8 +202,8 @@ if ($action == 'delete')
if ($action == 'valide') if ($action == 'valide')
{ {
$facid = $_GET['facid']; $facid = $_GET['facid'];
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
if ($ret == 'html') print '<br>';
} }

View File

@ -146,8 +146,8 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0,
*/ */
if ($_GET['action'] == 'delete') if ($_GET['action'] == 'delete')
{ {
$ret=$form->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); print $form->formconfirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -156,8 +156,8 @@ if ($_GET['action'] == 'delete')
if ($_GET['action'] == 'valide') if ($_GET['action'] == 'valide')
{ {
$facid = $_GET['facid']; $facid = $_GET['facid'];
$ret=$form->form_confirm('fiche.php?id='.$paiement->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); print $form->formconfirm('fiche.php?id='.$paiement->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
if ($ret == 'html') print '<br>';
} }

View File

@ -150,8 +150,8 @@ if ($id > 0)
/*if ($action == 'credite') /*if ($action == 'credite')
{ {
$ret=$form->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); print $form->formconfirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
if ($ret == 'html') print '<br>';
}*/ }*/
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -343,8 +343,8 @@ else
{ {
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
if ($ret == 'html') print '<br>';
} }
} }
@ -839,8 +839,8 @@ else
if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser"); if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser");
else $text.=$langs->trans("UserWillBeInternalUser"); else $text.=$langs->trans("UserWillBeInternalUser");
} }
$ret=$form->form_confirm($_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');
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -145,8 +145,8 @@ if ($object->id)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>';
} }

View File

@ -947,8 +947,8 @@ else
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -968,8 +968,8 @@ else
$text=$langs->trans('ConfirmValidateContract',$numref); $text=$langs->trans('ConfirmValidateContract',$numref);
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -977,8 +977,8 @@ else
*/ */
if ($action == 'close') if ($action == 'close')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1314,7 +1314,7 @@ else
*/ */
if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid')) if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid'))
{ {
$ret=$form->form_confirm($_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[false].' height="6"><td></td></tr></table>'; if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>';
} }

View File

@ -209,6 +209,9 @@ if ($action=='inactive')
* View * View
*/ */
$form = new Form($db);
$formCron = new FormCron($db);
llxHeader('',$langs->trans("CronAdd")); llxHeader('',$langs->trans("CronAdd"));
if ($action=='edit' || empty($action) || $action=='delete' || $action=='execute') if ($action=='edit' || empty($action) || $action=='delete' || $action=='execute')
@ -244,19 +247,16 @@ if ($conf->use_javascript_ajax)
print '</script>'."\n"; print '</script>'."\n";
} }
$form = new Form($db);
$formCron = new FormCron($db);
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
$action=''; $action='';
} }
if ($action == 'execute'){ if ($action == 'execute'){
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
$action=''; $action='';
} }

View File

@ -122,14 +122,14 @@ print $langs->trans('CronInfo');
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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 ($ret == 'html') print '<br>';
} }
if ($action == 'execute') if ($action == 'execute')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// liste des jobs creer // liste des jobs creer

View File

@ -204,8 +204,8 @@ if (empty($action) || $action == 'delete_section')
// Confirmation de la suppression d'une ligne categorie // Confirmation de la suppression d'une ligne categorie
if ($action == 'delete_section') if ($action == 'delete_section')
{ {
$ret=$form->form_confirm($_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');
if ($ret == 'html') print '<br>';
} }
// Construit fiche rubrique // Construit fiche rubrique

View File

@ -252,8 +252,8 @@ print '</div>';
// Confirmation de la suppression d'une ligne categorie // Confirmation de la suppression d'une ligne categorie
if ($_GET['action'] == 'delete_file') if ($_GET['action'] == 'delete_file')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
if ($_GET["action"] != 'edit') if ($_GET["action"] != 'edit')

View File

@ -334,16 +334,16 @@ if ($action != 'edit' && $action != 'delete')
// Confirm remove file // Confirm remove file
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&amp;urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&amp;urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
if ($ret == 'html') print '<br>';
} }
// Confirm remove file // Confirm remove file
if ($action == 'delete_dir') if ($action == 'delete_dir')
{ {
$relativepathwithoutslash=preg_replace('/[\/]$/','',$relativepath); $relativepathwithoutslash=preg_replace('/[\/]$/','',$relativepath);
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
$formfile=new FormFile($db); $formfile=new FormFile($db);

View File

@ -112,8 +112,8 @@ print_fiche_titre($langs->trans("ECMAutoOrg"));
*/ */
if ($_GET['action'] == 'delete_file') if ($_GET['action'] == 'delete_file')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&amp;urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); print $form->formconfirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&amp;urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
if ($ret == 'html') print '<br>';
} }
// Construit liste des fichiers // Construit liste des fichiers

View File

@ -405,8 +405,8 @@ print '</div>';
// Confirm remove file (for non javascript users) // Confirm remove file (for non javascript users)
if ($action == 'delete' && empty($conf->use_javascript_ajax)) if ($action == 'delete' && empty($conf->use_javascript_ajax))
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
dol_htmloutput_mesg($mesg); dol_htmloutput_mesg($mesg);
@ -455,8 +455,8 @@ print '</div>';
// Confirmation de la suppression d'une ligne categorie // Confirmation de la suppression d'une ligne categorie
if ($action == 'delete_section') if ($action == 'delete_section')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// End confirm // End confirm

View File

@ -924,8 +924,8 @@ else
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -953,16 +953,16 @@ else
$text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid); $text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid);
} }
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*
* Confirmation de l'annulation * Confirmation de l'annulation
*/ */
if ($action == 'annuler') if ($action == 'annuler')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Calculate true totalWeight and totalVolume for all products // Calculate true totalWeight and totalVolume for all products

View File

@ -152,8 +152,8 @@ if ($id > 0 || ! empty($ref))
*/ */
if ($action == 'cloture') if ($action == 'cloture')
{ {
$ret=$form->form_confirm($_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");
if ($ret == 'html') print '<br>';
} }
// Onglet commande // Onglet commande

View File

@ -1025,8 +1025,8 @@ if ($step == 5 && $datatoexport)
*/ */
if ($action == 'remove_file') if ($action == 'remove_file')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';

View File

@ -146,8 +146,8 @@ if ($object->id)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload

View File

@ -1136,8 +1136,8 @@ else if ($id > 0 || ! empty($ref))
// Confirmation de la suppression de la fiche d'intervention // Confirmation de la suppression de la fiche d'intervention
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1);
if ($ret == 'html') print '<br>';
} }
// Confirmation validation // Confirmation validation
@ -1160,22 +1160,22 @@ else if ($id > 0 || ! empty($ref))
} }
$text=$langs->trans('ConfirmValidateIntervention',$numref); $text=$langs->trans('ConfirmValidateIntervention',$numref);
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1);
if ($ret == 'html') print '<br>';
} }
// Confirmation de la validation de la fiche d'intervention // Confirmation de la validation de la fiche d'intervention
if ($action == 'modify') if ($action == 'modify')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1);
if ($ret == 'html') print '<br>';
} }
// Confirmation de la suppression d'une ligne d'intervention // Confirmation de la suppression d'une ligne d'intervention
if ($action == 'ask_deleteline') if ($action == 'ask_deleteline')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.GETPOST('line_id','int'), $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.GETPOST('line_id','int'), $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -181,8 +181,8 @@ if ($object->id > 0)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload

View File

@ -1069,8 +1069,8 @@ elseif (! empty($object->id))
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2);
if ($ret == 'html') print '<br>';
} }
// Clone confirmation // Clone confirmation
@ -1081,8 +1081,8 @@ elseif (! empty($object->id))
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1) //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1)
); );
// Paiement incomplet. On demande si motif = escompte ou autre // Paiement incomplet. On demande si motif = escompte ou autre
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1105,8 +1105,8 @@ elseif (! empty($object->id))
$text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid); $text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid);
} }
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1128,8 +1128,8 @@ elseif (! empty($object->id))
); );
} }
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ApproveThisOrder"),$langs->trans("ConfirmApproveThisOrder",$object->ref),"confirm_approve", $formquestion, 1, 1, 240); print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ApproveThisOrder"),$langs->trans("ConfirmApproveThisOrder",$object->ref),"confirm_approve", $formquestion, 1, 1, 240);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1137,8 +1137,8 @@ elseif (! empty($object->id))
*/ */
if ($action == 'refuse') if ($action == 'refuse')
{ {
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1); print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1146,8 +1146,8 @@ elseif (! empty($object->id))
*/ */
if ($action == 'cancel') if ($action == 'cancel')
{ {
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1); print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1156,8 +1156,8 @@ elseif (! empty($object->id))
if ($action == 'commande') if ($action == 'commande')
{ {
$date_com = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $date_com = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
$ret=$form->form_confirm($_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); print $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);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1165,8 +1165,8 @@ elseif (! empty($object->id))
*/ */
if ($action == 'delete_product_line') if ($action == 'delete_product_line')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1240,7 +1240,6 @@ elseif (! empty($object->id))
// Conditions de reglement par defaut // Conditions de reglement par defaut
$langs->load('bills'); $langs->load('bills');
$form = new Form($db);
print '<tr><td class="nowrap">'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentConditions'); print $langs->trans('PaymentConditions');
@ -1261,7 +1260,6 @@ elseif (! empty($object->id))
// Mode of payment // Mode of payment
$langs->load('bills'); $langs->load('bills');
$form = new Form($db);
print '<tr><td class="nowrap">'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');

View File

@ -121,8 +121,8 @@ if ($object->id > 0)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -1431,22 +1431,22 @@ else
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1))); array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
} }
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
if ($ret == 'html') print '<br>';
} }
// Confirmation set paid // Confirmation set paid
if ($action == 'paid') if ($action == 'paid')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
if ($ret == 'html') print '<br>';
} }
// Confirmation de la suppression de la facture fournisseur // Confirmation de la suppression de la facture fournisseur
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
if ($ret == 'html') print '<br>';
} }
@ -1636,7 +1636,6 @@ else
// Conditions de reglement par defaut // Conditions de reglement par defaut
$langs->load('bills'); $langs->load('bills');
$form = new Form($db);
print '<tr><td class="nowrap">'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentConditions'); print $langs->trans('PaymentConditions');
@ -1657,7 +1656,6 @@ else
// Mode of payment // Mode of payment
$langs->load('bills'); $langs->load('bills');
$form = new Form($db);
print '<tr><td class="nowrap">'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');

View File

@ -161,8 +161,8 @@ if ($result > 0)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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');
if ($ret == 'html') print '<br>';
} }
/* /*
@ -170,8 +170,8 @@ if ($result > 0)
*/ */
if ($action == 'valide') if ($action == 'valide')
{ {
$ret=$form->form_confirm($_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');
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -403,15 +403,15 @@ else
// Confirm remove file // Confirm remove file
if ($_GET['action'] == 'delete') if ($_GET['action'] == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.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.'&section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
if ($ret == 'html') print '<br>';
} }
// Confirmation de la suppression d'une ligne categorie // Confirmation de la suppression d'une ligne categorie
if ($_GET['action'] == 'delete_section') if ($_GET['action'] == 'delete_section')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.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.'&section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
if ($ret == 'html') print '<br>';
} }
print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>'; print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>';

View File

@ -832,7 +832,7 @@ else
if ($action == 'delete' && $cp->statut == 1) { if ($action == 'delete' && $cp->statut == 1) {
if($user->rights->holiday->delete) if($user->rights->holiday->delete)
{ {
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1);
if ($ret == 'html') print '<br />'; if ($ret == 'html') print '<br />';
} }
} }
@ -840,14 +840,14 @@ else
// Si envoi en validation // Si envoi en validation
if ($action == 'sendToValidate' && $cp->statut == 1 && $user->id == $cp->fk_user) if ($action == 'sendToValidate' && $cp->statut == 1 && $user->id == $cp->fk_user)
{ {
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1);
if ($ret == 'html') print '<br />'; if ($ret == 'html') print '<br />';
} }
// Si validation de la demande // Si validation de la demande
if ($action == 'valid' && $cp->statut == 2 && $user->id == $cp->fk_validator) if ($action == 'valid' && $cp->statut == 2 && $user->id == $cp->fk_validator)
{ {
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1);
if ($ret == 'html') print '<br />'; if ($ret == 'html') print '<br />';
} }
@ -855,14 +855,14 @@ else
if ($action == 'refuse' && $cp->statut == 2 && $user->id == $cp->fk_validator) if ($action == 'refuse' && $cp->statut == 2 && $user->id == $cp->fk_validator)
{ {
$array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>"")); $array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>""));
$ret=$form->form_confirm("fiche.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); print $form->formconfirm("fiche.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0);
if ($ret == 'html') print '<br />'; if ($ret == 'html') print '<br />';
} }
// Si annulation de la demande // Si annulation de la demande
if ($action == 'cancel' && $cp->statut == 2 && ($user->id == $cp->fk_validator || $user->id == $cp->fk_user)) if ($action == 'cancel' && $cp->statut == 2 && ($user->id == $cp->fk_validator || $user->id == $cp->fk_user))
{ {
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1);
if ($ret == 'html') print '<br />'; if ($ret == 'html') print '<br />';
} }

View File

@ -481,8 +481,8 @@ if ($step == 3 && $datatoimport)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';

View File

@ -490,8 +490,8 @@ else
if ($action == 'delete') if ($action == 'delete')
{ {
$expedition_id = $_GET["expid"]; $expedition_id = $_GET["expid"];
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&amp;expid='.$expedition_id,$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&amp;expid='.$expedition_id,$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -500,8 +500,8 @@ else
*/ */
if ($action == 'valid') if ($action == 'valid')
{ {
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$delivery->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$delivery->ref),'confirm_valid','','',1); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$delivery->ref),'confirm_valid','','',1);
if ($ret == 'html') print '<br>';
} }

View File

@ -157,7 +157,6 @@ $productstatic = new Product($db);
$form = new Form($db); $form = new Form($db);
llxHeader("","",$langs->trans("CardProduct".$product->type)); llxHeader("","",$langs->trans("CardProduct".$product->type));
$form = new Form($db);
dol_htmloutput_errors($mesg); dol_htmloutput_errors($mesg);

View File

@ -96,8 +96,8 @@ if ($object->id)
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
if ($ret == 'html') print '<br>';
} }
print($mesg); print($mesg);

View File

@ -240,9 +240,7 @@ else
// Confirm delete third party // Confirm delete third party
if ($action == 'delete') if ($action == 'delete')
{ {
$form = new Form($db); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2);
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2);
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -130,10 +130,8 @@ $result=$object->fetch($socid);
if ($result > 0) if ($result > 0)
{ {
$form = new Form($db);
$langs->load("other"); $langs->load("other");
$head = societe_prepare_head($object); $head = societe_prepare_head($object);
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');

View File

@ -871,7 +871,6 @@ else
if ($j % 2 == 1) print '<td colspan="2"></td></tr>'; if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// Assujeti TVA // Assujeti TVA
$form = new Form($db);
print '<tr><td>'.$langs->trans('VATIsUsed').'</td>'; print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
print '<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
@ -1593,7 +1592,6 @@ else
if ($j % 2 == 1) print '<td colspan="2"></td></tr>'; if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers // VAT payers
$form = new Form($db);
print '<tr><td>'; print '<tr><td>';
print $langs->trans('VATIsUsed'); print $langs->trans('VATIsUsed');
print '</td><td>'; print '</td><td>';

View File

@ -82,7 +82,6 @@ $langs->load("users");
$langs->load("companies"); $langs->load("companies");
$langs->load("ldap"); $langs->load("ldap");
$form = new Form($db);
$object = new User($db); $object = new User($db);
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
@ -566,10 +565,10 @@ if ($action == 'adduserldap')
* View * View
*/ */
llxHeader('',$langs->trans("UserCard"));
$form = new Form($db); $form = new Form($db);
llxHeader('',$langs->trans("UserCard"));
if (($action == 'create') || ($action == 'adduserldap')) if (($action == 'create') || ($action == 'adduserldap'))
{ {
/* ************************************************************************** */ /* ************************************************************************** */
@ -1404,7 +1403,6 @@ else
if ($caneditgroup) if ($caneditgroup)
{ {
$form = new Form($db);
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">'."\n"; print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
print '<input type="hidden" name="action" value="addgroup" />'; print '<input type="hidden" name="action" value="addgroup" />';