Qual: Replace deprecated call ->form_confirm with ->formconfirm
This commit is contained in:
parent
87a4418baf
commit
91718bc902
@ -823,8 +823,7 @@ if ($rowid)
|
||||
// Create a form array
|
||||
$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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -185,8 +185,7 @@ if ($id > 0)
|
||||
*/
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1192,8 +1192,7 @@ else
|
||||
if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
}
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
}
|
||||
|
||||
// Confirm create third party
|
||||
@ -1212,8 +1211,7 @@ else
|
||||
// Create a form array
|
||||
$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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
// Confirm validate member
|
||||
@ -1286,8 +1284,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"]));
|
||||
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
|
||||
}
|
||||
|
||||
// Confirm remove member
|
||||
@ -1295,8 +1292,7 @@ else
|
||||
{
|
||||
$formquestion=array();
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1304,8 +1300,7 @@ else
|
||||
*/
|
||||
if ($action == 'add_spip')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1313,8 +1308,7 @@ else
|
||||
*/
|
||||
if ($action == 'del_spip')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
}
|
||||
|
||||
$rowspan=17;
|
||||
|
||||
@ -291,8 +291,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");
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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">';
|
||||
|
||||
@ -676,8 +676,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -251,8 +251,7 @@ if ($action == 'delete')
|
||||
$result = $db->query($sql);
|
||||
$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");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -150,8 +150,7 @@ if ($result)
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
@ -116,14 +116,12 @@ print '<br>';
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
if ($savehandler == 'files')
|
||||
|
||||
@ -104,8 +104,7 @@ if ($object->id)
|
||||
*/
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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);
|
||||
|
||||
@ -144,8 +144,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category');
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
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">';
|
||||
|
||||
@ -685,8 +685,7 @@ if ($id > 0)
|
||||
// Confirmation suppression action
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
if ($action == 'edit')
|
||||
|
||||
@ -416,9 +416,7 @@ else
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
}
|
||||
|
||||
$nblines = count($object->lines);
|
||||
|
||||
@ -700,20 +700,17 @@ else
|
||||
// Confirmation de la validation du mailing
|
||||
if ($action == 'valid')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
}
|
||||
// Confirm 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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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')
|
||||
{
|
||||
$ret=$form->form_confirm($_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>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
|
||||
@ -749,8 +746,7 @@ else
|
||||
}
|
||||
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
|
||||
$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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -158,8 +158,7 @@ if ($object->id > 0)
|
||||
*/
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -2471,10 +2471,11 @@ class Form
|
||||
* @param string $action Action
|
||||
* @param array $formquestion An array with forms complementary inputs
|
||||
* @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 $width Force width of box
|
||||
* @return void
|
||||
* @deprecated
|
||||
*/
|
||||
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 $title Title
|
||||
@ -2578,7 +2587,9 @@ class Form
|
||||
$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)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
$ret = $object->deleteline(GETPOST('lineid'));
|
||||
@ -1373,8 +1373,7 @@ else
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -1386,8 +1385,7 @@ else
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
);
|
||||
// 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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $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
|
||||
@ -1787,7 +1785,7 @@ else
|
||||
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
*/
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var=1;
|
||||
@ -1956,7 +1954,10 @@ else
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" width="16">';
|
||||
if ($object->statut == 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_delete_line&lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>';
|
||||
if ($object->statut == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_delete_line&lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>';
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -122,8 +122,7 @@ if ($object->id > 0)
|
||||
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&urlfile=".urlencode(GETPOST("urlfile")),$langs->trans("DeleteAFile"),$langs->trans("ConfirmDeleteAFile"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -458,20 +458,17 @@ else
|
||||
// Confirmation validation
|
||||
if ($action == 'validate')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1);
|
||||
}
|
||||
// Confirmation close
|
||||
if ($action == 'close')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1);
|
||||
}
|
||||
// Confirmation reopen
|
||||
if ($action == 'reopen')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1);
|
||||
}
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
@ -481,8 +478,7 @@ else
|
||||
$taskarray=$task->getTasksArray(0,0,$object->id,0,0);
|
||||
$nboftask=count($taskarray);
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
|
||||
@ -385,8 +385,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
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%">';
|
||||
|
||||
@ -241,8 +241,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
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%">';
|
||||
|
||||
@ -177,8 +177,7 @@ if ($object->id)
|
||||
*/
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
@ -1440,9 +1440,7 @@ else
|
||||
// Confirm delete third party
|
||||
if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
|
||||
{
|
||||
$form = new Form($db);
|
||||
$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>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
|
||||
}
|
||||
|
||||
dol_htmloutput_errors($error,$errors);
|
||||
|
||||
@ -997,8 +997,7 @@ else
|
||||
*/
|
||||
if ($action == 'password')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1006,8 +1005,7 @@ else
|
||||
*/
|
||||
if ($action == 'passwordsend')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1015,8 +1013,7 @@ else
|
||||
*/
|
||||
if ($action == 'disable')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1024,8 +1021,7 @@ else
|
||||
*/
|
||||
if ($action == 'enable')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1033,8 +1029,7 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
|
||||
}
|
||||
|
||||
dol_htmloutput_mesg($message);
|
||||
|
||||
@ -278,8 +278,7 @@ else
|
||||
*/
|
||||
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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user