From 4ea973ee42b20159eba66475275f6e068f5c3755 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Mar 2011 22:22:26 +0000 Subject: [PATCH] Add "cancel" button on contact creation. --- htdocs/contact/fiche.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4bb3496295d..ca90e5b2233 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -125,8 +125,15 @@ else } } - // Creation contact - if ($_POST["action"] == 'add' && $user->rights->societe->contact->creer) + // Cancel + if (GETPOST("cancel") && GETPOST('backtopage')) + { + header("Location: ".GETPOST('backtopage')); + exit; + } + + // Add contact + if (GETPOST("action") == 'add' && $user->rights->societe->contact->creer) { $error=0; @@ -467,8 +474,7 @@ else print '
'; print ''; print ''; - print ''; - print ''; + print ''; print ''; // Name @@ -592,7 +598,14 @@ else print "

"; - print '
'; + print '
'; + print ''; + if (GETPOST('backtopage')) + { + print '     '; + print ''; + } + print '
'; print "
"; }