Removed an option deprecated with ajax confirmation
This commit is contained in:
parent
2b10086ba6
commit
c1ca9e53af
@ -104,16 +104,18 @@ else if ($_POST["action"] == 'viewProdDescInForm')
|
||||
{
|
||||
dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $_POST["activate_viewProdDescInForm"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
/*
|
||||
else if ($_POST["action"] == 'confirmDeleteProdLineInForm')
|
||||
{
|
||||
dolibarr_set_const($db, "PRODUIT_CONFIRM_DELETE_LINE", $_POST["activate_confirmDeleteProdLineInForm"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
*/
|
||||
else if ($_POST["action"] == 'ProductCanvasAbility')
|
||||
{
|
||||
// Create temp directory for smarty
|
||||
if (! empty($dolibarr_smarty_compile)) create_exdir($dolibarr_smarty_compile);
|
||||
if (! empty($dolibarr_smarty_cache)) create_exdir($dolibarr_smarty_cache);
|
||||
|
||||
|
||||
dolibarr_set_const($db, "MAIN_NEED_SMARTY", $_POST["ProductCanvasAbility"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($_POST["action"] == 'usesearchtoselectproduct')
|
||||
@ -125,7 +127,7 @@ else if ($_GET["action"] == 'set')
|
||||
// Create temp directory for smarty
|
||||
if (! empty($dolibarr_smarty_compile)) create_exdir($dolibarr_smarty_compile);
|
||||
if (! empty($dolibarr_smarty_cache)) create_exdir($dolibarr_smarty_cache);
|
||||
|
||||
|
||||
$const = "PRODUIT_SPECIAL_".strtoupper($_GET["spe"]);
|
||||
if ($_GET["value"]) dolibarr_set_const($db, $const, $_GET["value"],'chaine',0,'',$conf->entity);
|
||||
else dolibarr_del_const($db, $const,$conf->entity);
|
||||
@ -253,6 +255,7 @@ print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Confirmation de suppression d'un ligne produit dans les formulaires activation/desactivation
|
||||
/*
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"produit.php\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"confirmDeleteProdLineInForm\">";
|
||||
@ -265,6 +268,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
// Utilisation de l'ecotaxe
|
||||
$var=!$var;
|
||||
@ -310,14 +314,14 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
$classname = 'Product'.ucfirst($parts[1]);
|
||||
require_once($dir.$file);
|
||||
$module = new $classname();
|
||||
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
|
||||
print $module->description;
|
||||
|
||||
|
||||
print '</td><td align="right">';
|
||||
|
||||
|
||||
$const = "PRODUIT_SPECIAL_".strtoupper($parts[1]);
|
||||
if ($conf->global->$const)
|
||||
{
|
||||
@ -330,7 +334,7 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
print ' </td><td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$parts[1].'&value=1">'.$langs->trans("Activate").'</a>';
|
||||
}
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,8 +128,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
|
||||
}
|
||||
|
||||
// Remove line
|
||||
if (($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
|| ($_REQUEST['action'] == 'deleteline' && ! $conf->global->PRODUIT_CONFIRM_DELETE_LINE))
|
||||
if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
if ($user->rights->propale->creer)
|
||||
{
|
||||
@ -934,7 +933,7 @@ if ($id > 0 || ! empty($ref))
|
||||
/*
|
||||
* Confirmation de la suppression d'une ligne produit/service
|
||||
*/
|
||||
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
if ($_GET['action'] == 'ask_deleteline')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
@ -1462,14 +1461,7 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=deleteline&lineid='.$objp->rowid.'">';
|
||||
}
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
if ($num > 1)
|
||||
|
||||
@ -108,10 +108,9 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
|
||||
}
|
||||
|
||||
/*
|
||||
* Supprime une ligne produit AVEC ou SANS confirmation
|
||||
* Remove a product line
|
||||
*/
|
||||
if (($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
|| ($_GET['action'] == 'deleteline' && !$conf->global->PRODUIT_CONFIRM_DELETE_LINE))
|
||||
if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
if ($user->rights->commande->creer)
|
||||
{
|
||||
@ -1249,7 +1248,7 @@ else
|
||||
/*
|
||||
* Confirmation de la suppression d'une ligne produit
|
||||
*/
|
||||
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
if ($_GET['action'] == 'ask_deleteline')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
@ -1638,14 +1637,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=deleteline&lineid='.$objp->rowid.'">';
|
||||
}
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
if ($num > 1)
|
||||
|
||||
@ -138,8 +138,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' &&
|
||||
/*
|
||||
* Supprime une ligne produit AVEC ou SANS confirmation
|
||||
*/
|
||||
if (($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] == 'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
|| ($_REQUEST['action'] == 'deleteline' && !$conf->global->PRODUIT_CONFIRM_DELETE_LINE))
|
||||
if ($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
if ($user->rights->facture->creer)
|
||||
{
|
||||
@ -2132,9 +2131,9 @@ else
|
||||
}
|
||||
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
if ($_GET['action'] == 'delete_product_line' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
if ($_GET['action'] == 'delete_product_line')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id.'&rowid='.$_GET["rowid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline', '', 'no', 1);
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id.'&rowid='.$_GET["rowid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline', '', 'no', 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -2857,14 +2856,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=delete_product_line&rowid='.$objp->rowid.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=deleteline&rowid='.$objp->rowid.'">';
|
||||
}
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=delete_product_line&rowid='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
if ($num_lignes > 1)
|
||||
|
||||
@ -68,8 +68,6 @@ class Conf
|
||||
{
|
||||
dol_syslog("Conf::setValues");
|
||||
|
||||
$this->global->PRODUIT_CONFIRM_DELETE_LINE=1; // Par defaut, a oui
|
||||
|
||||
/*
|
||||
* Definition de toutes les constantes globales d'environnement
|
||||
* - En constante php (TODO a virer)
|
||||
|
||||
@ -288,38 +288,10 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Supprime une ligne d'intervention SANS confirmation
|
||||
*/
|
||||
if ($_REQUEST['action'] == 'deleteline' && $user->rights->ficheinter->creer && !$conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
$fichinterline = new FichinterLigne($db);
|
||||
if ($fichinterline->fetch($_GET['ligne']) <= 0)
|
||||
{
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
$result=$fichinterline->delete_line();
|
||||
$fichinter = new Fichinter($db);
|
||||
if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0)
|
||||
{
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (! empty($_REQUEST['lang_id']))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Supprime une ligne d'intervention AVEC confirmation
|
||||
*/
|
||||
if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
@ -541,9 +513,9 @@ elseif ($_GET["id"] > 0)
|
||||
}
|
||||
|
||||
// Confirmation de la suppression d'une ligne d'intervention
|
||||
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
if ($_GET['action'] == 'ask_deleteline')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&ligne='.$_GET["ligne"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&ligne='.$_GET["ligne"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -674,16 +646,8 @@ elseif ($_GET["id"] > 0)
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=ask_deleteline&ligne='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=deleteline&ligne='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
}
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=ask_deleteline&ligne='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
if ($num > 1)
|
||||
{
|
||||
|
||||
@ -224,7 +224,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->c
|
||||
}
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'confirm_deleteproductline' && ($_REQUEST['confirm'] == 'yes' || empty($conf->global->PRODUIT_CONFIRM_DELETE_LINE)))
|
||||
if ($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
@ -409,7 +409,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
}
|
||||
}
|
||||
|
||||
// Efface les fichiers
|
||||
// Delete file
|
||||
if ($action=='remove_file')
|
||||
{
|
||||
$commande = new CommandeFournisseur($db);
|
||||
@ -576,9 +576,9 @@ if ($id > 0 || ! empty($ref))
|
||||
/*
|
||||
* Confirmation de la suppression d'une ligne produit
|
||||
*/
|
||||
if ($_GET['action'] == 'delete_product_line' && ! empty($conf->global->PRODUIT_CONFIRM_DELETE_LINE))
|
||||
if ($_GET['action'] == 'delete_product_line')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$commande->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2);
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$commande->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -762,7 +762,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</a></td>';
|
||||
|
||||
$actiondelete='delete_product_line';
|
||||
if (empty($conf->global->PRODUIT_CONFIRM_DELETE_LINE)) $actiondelete='confirm_deleteproductline';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'&action='.$actiondelete.'&lineid='.$commandline->id.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
|
||||
@ -18,6 +18,7 @@ update llx_menu_constraint set action = '$conf->societe->enabled' where action =
|
||||
delete from llx_const where name = 'MAIN_MODULE_COMMERCIAL';
|
||||
delete from llx_const where name like 'MAIN_MODULE_%_DIR_OUTPUT';
|
||||
delete from llx_const where name like 'MAIN_MODULE_%_DIR_TEMP';
|
||||
delete from llx_const where name like 'PRODUIT_CONFIRM_DELETE_LINE';
|
||||
|
||||
alter table llx_societe add column import_key varchar(14);
|
||||
|
||||
@ -121,3 +122,5 @@ UPDATE llx_const SET entity=0 WHERE name='MAIN_MODULE_SYSLOG';
|
||||
UPDATE llx_const SET entity=0 WHERE name='SYSLOG_FILE';
|
||||
UPDATE llx_const SET entity=0 WHERE name='SYSLOG_LEVEL';
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user