Qual: Replace deprecated call ->form_confirm with ->formconfirm

This commit is contained in:
Laurent Destailleur 2013-09-06 11:51:24 +02:00
parent 87a4418baf
commit 91718bc902
24 changed files with 60 additions and 88 deletions

View File

@ -823,8 +823,7 @@ if ($rowid)
// Create a form array // Create a form array
$formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }

View File

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

View File

@ -1192,8 +1192,7 @@ else
if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
else $text.=$langs->trans("UserWillBeInternalUser"); else $text.=$langs->trans("UserWillBeInternalUser");
} }
$ret=$form->form_confirm($_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');
if ($ret == 'html') print '<br>';
} }
// Confirm create third party // Confirm create third party
@ -1212,8 +1211,7 @@ else
// Create a form array // Create a form array
$formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirm validate member // Confirm validate member
@ -1286,8 +1284,7 @@ else
$formquestion=array(); $formquestion=array();
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); 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"])); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion); print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
if ($ret == 'html') print '<br>';
} }
// Confirm remove member // Confirm remove member
@ -1295,8 +1292,7 @@ else
{ {
$formquestion=array(); $formquestion=array();
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1304,8 +1300,7 @@ else
*/ */
if ($action == 'add_spip') if ($action == 'add_spip')
{ {
$ret=$form->form_confirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1313,8 +1308,7 @@ else
*/ */
if ($action == 'del_spip') if ($action == 'del_spip')
{ {
$ret=$form->form_confirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
if ($ret == 'html') print '<br>';
} }
$rowspan=17; $rowspan=17;

View File

@ -291,8 +291,7 @@ if ($rowid && $action != 'edit')
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>'; //$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
$text=$langs->trans("ConfirmDeleteSubscription"); $text=$langs->trans("ConfirmDeleteSubscription");
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';

View File

@ -676,8 +676,7 @@ print "<br>\n";
// Confirmation de la suppression de la ligne // Confirmation de la suppression de la ligne
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
/* /*

View File

@ -251,8 +251,7 @@ if ($action == 'delete')
$result = $db->query($sql); $result = $db->query($sql);
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
$ret=$form->form_confirm("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");
if ($ret == 'html') print '<br>';
} }

View File

@ -150,8 +150,7 @@ if ($result)
if ($action == 'purge') if ($action == 'purge')
{ {
$formquestion=array(); $formquestion=array();
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<table class="liste" width="100%">'; print '<table class="liste" width="100%">';

View File

@ -116,14 +116,12 @@ print '<br>';
if ($action == 'purge') if ($action == 'purge')
{ {
$formquestion=array(); $formquestion=array();
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
else if ($action == 'lock') else if ($action == 'lock')
{ {
$formquestion=array(); $formquestion=array();
$ret=$form->form_confirm($_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 ($ret == 'html') print '<br>';
} }
if ($savehandler == 'files') if ($savehandler == 'files')

View File

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

View File

@ -144,8 +144,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category');
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
if ($ret == 'html') print '<br>';
} }
print '<table border="0" width="100%" class="border">'; print '<table border="0" width="100%" class="border">';

View File

@ -685,8 +685,7 @@ if ($id > 0)
// Confirmation suppression action // Confirmation suppression action
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); print $form->formconfirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
if ($ret == 'html') print '<br>';
} }
if ($action == 'edit') if ($action == 'edit')

View File

@ -416,9 +416,7 @@ else
// Confirmation delete // Confirmation delete
if ($action == 'delete') if ($action == 'delete')
{ {
$form = new Form($db); print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&amp;id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&amp;id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
if ($ret == 'html') print '<br>';
} }
$nblines = count($object->lines); $nblines = count($object->lines);

View File

@ -700,20 +700,17 @@ else
// Confirmation de la validation du mailing // Confirmation de la validation du mailing
if ($action == 'valid') if ($action == 'valid')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirm reset // Confirm reset
else if ($action == 'reset') else if ($action == 'reset')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirm delete // Confirm delete
else if ($action == 'delete') else if ($action == 'delete')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
@ -749,8 +746,7 @@ else
} }
$text.=$langs->trans('ConfirmSendingEmailing').'<br>'; $text.=$langs->trans('ConfirmSendingEmailing').'<br>';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
if ($ret == 'html') print '<br>';
} }
} }

View File

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

View File

@ -2471,10 +2471,11 @@ class Form
* @param string $action Action * @param string $action Action
* @param array $formquestion An array with forms complementary inputs * @param array $formquestion An array with forms complementary inputs
* @param string $selectedchoice "" or "no" or "yes" * @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box * @param int $height Force height of box
* @param int $width Force width of box * @param int $width Force width of box
* @return void * @return void
* @deprecated
*/ */
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{ {
@ -2482,7 +2483,15 @@ class Form
} }
/** /**
* Show a confirmation HTML form or AJAX popup * Show a confirmation HTML form or AJAX popup.
* Easiest way to use this is with useajax=1.
* If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters)
* just after calling this method. For example:
* print '<script type="text/javascript">'."\n";
* print 'jQuery(document).ready(function() {'."\n";
* print 'jQuery(".xxxlink").click(function(e) { jQuery("#aparamid").val(jQuery(this).attr("rel")); jQuery("#dialog-confirm-xxx").dialog("open"); return false; });'."\n";
* print '});'."\n";
* print '</script>'."\n";
* *
* @param string $page Url of page to call if confirmation is OK * @param string $page Url of page to call if confirmation is OK
* @param string $title Title * @param string $title Title
@ -2578,7 +2587,9 @@ class Form
$more.='</table>'."\n"; $more.='</table>'."\n";
} }
if (! empty($conf->dol_use_jmobile)) $useajax=0; // JQUI method dialog is broken with jmobile, we use standard HTML. We also change code for button to have get on url with action=xxx and output confirm only when action=xxx // JQUI method dialog is broken with jmobile, we use standard HTML.
// Note: When using dol_use_jmobile, you must also check code for button use a GET url with action=xxx and output the confirm code only when action=xxx
if (! empty($conf->dol_use_jmobile)) $useajax=0;
if ($useajax && $conf->use_javascript_ajax) if ($useajax && $conf->use_javascript_ajax)
{ {

View File

@ -168,7 +168,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fourn
} }
} }
elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) elseif ($action == 'confirm_delete_line' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$ret = $object->deleteline(GETPOST('lineid')); $ret = $object->deleteline(GETPOST('lineid'));
@ -1373,8 +1373,7 @@ else
// Confirmation de la suppression d'une ligne produit // Confirmation de la suppression d'une ligne produit
if ($action == 'confirm_delete_line') if ($action == 'confirm_delete_line')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 1, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
if ($ret == 'html') print '<br>';
} }
// Clone confirmation // Clone confirmation
@ -1386,8 +1385,7 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), '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('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
if ($ret == 'html') print '<br>';
} }
// Confirmation de la validation // Confirmation de la validation
@ -1787,7 +1785,7 @@ else
/* /*
* Lines * Lines
*/ */
print '<br>'; print '<br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
$var=1; $var=1;
@ -1956,7 +1954,10 @@ else
print '</td>'; print '</td>';
print '<td align="center" width="16">'; print '<td align="center" width="16">';
if ($object->statut == 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=confirm_delete_line&amp;lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>'; if ($object->statut == 0)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=confirm_delete_line&amp;lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>';
}
else print '&nbsp;'; else print '&nbsp;';
print '</td>'; print '</td>';

View File

@ -122,8 +122,7 @@ if ($object->id > 0)
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&urlfile=".urlencode(GETPOST("urlfile")),$langs->trans("DeleteAFile"),$langs->trans("ConfirmDeleteAFile"),"confirm_delete",'','',1); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&urlfile=".urlencode(GETPOST("urlfile")),$langs->trans("DeleteAFile"),$langs->trans("ConfirmDeleteAFile"),"confirm_delete",'','',1);
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -458,20 +458,17 @@ else
// Confirmation validation // Confirmation validation
if ($action == 'validate') if ($action == 'validate')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirmation close // Confirmation close
if ($action == 'close') if ($action == 'close')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirmation reopen // Confirmation reopen
if ($action == 'reopen') if ($action == 'reopen')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Confirmation delete // Confirmation delete
if ($action == 'delete') if ($action == 'delete')
@ -481,8 +478,7 @@ else
$taskarray=$task->getTasksArray(0,0,$object->id,0,0); $taskarray=$task->getTasksArray(0,0,$object->id,0,0);
$nboftask=count($taskarray); $nboftask=count($taskarray);
if ($nboftask) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks",$nboftask); if ($nboftask) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks",$nboftask);
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
// Clone confirmation // Clone confirmation

View File

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

View File

@ -241,8 +241,7 @@ if ($id > 0 || ! empty($ref))
if ($action == 'deleteline') if ($action == 'deleteline')
{ {
$ret=$form->form_confirm($_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);
if ($ret == 'html') print '<br>';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

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

View File

@ -1440,9 +1440,7 @@ else
// Confirm delete third party // Confirm delete third party
if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
{ {
$form = new Form($db); print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?socid=".$object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
if ($ret == 'html') print '<br>';
} }
dol_htmloutput_errors($error,$errors); dol_htmloutput_errors($error,$errors);

View File

@ -997,8 +997,7 @@ else
*/ */
if ($action == 'password') if ($action == 'password')
{ {
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1); print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1006,8 +1005,7 @@ else
*/ */
if ($action == 'passwordsend') if ($action == 'passwordsend')
{ {
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1); print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1015,8 +1013,7 @@ else
*/ */
if ($action == 'disable') if ($action == 'disable')
{ {
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1); print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1024,8 +1021,7 @@ else
*/ */
if ($action == 'enable') if ($action == 'enable')
{ {
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1); print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
/* /*
@ -1033,8 +1029,7 @@ else
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
if ($ret == 'html') print '<br>';
} }
dol_htmloutput_mesg($message); dol_htmloutput_mesg($message);

View File

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