diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a85d105c127..a0e3fc509c6 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -36,9 +36,11 @@ accessforbidden(); $typeconst=array('yesno','texte','chaine'); + /* * Actions */ + if ($_POST["action"] == 'add') { if (dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],1,isset($_POST["constnote"])?$_POST["constnote"]:'',$_POST["entity"]) < 0) @@ -61,6 +63,7 @@ if (($_POST["const"] && isset($_POST["update"]) && $_POST["update"] == $langs->t } } +// Delete several lines at once if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("Delete")) { foreach($_POST["const"] as $const) @@ -75,6 +78,15 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De } } +// Delete line from delete picto +if ($_GET["action"] == 'delete') +{ + if (dolibarr_del_const($db, $_GET["rowid"],$_GET["entity"]) < 0) + { + print $db->error(); + } +} + /* * View @@ -103,6 +115,7 @@ $form = new Form($db); # Affiche ligne d'ajout $var=false; +print "\n"; print '
'; +print "\n"; print '\n";