mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
New: Add cancel button on note edit
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/societe/socnote.php
|
||||
* \brief Tab for notes on third party
|
||||
* \ingroup societe
|
||||
* \version $Id$
|
||||
* \version $Id: socnote.php,v 1.22 2011/07/13 16:24:57 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -44,7 +44,7 @@ $result = restrictedArea($user, 'societe', $socid);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'add')
|
||||
if ($action == 'add' && ! GETPOST('cancel'))
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$db->escape($_POST["note"])."' WHERE rowid=".$_POST["socid"];
|
||||
$result = $db->query($sql);
|
||||
@@ -133,7 +133,11 @@ if ($socid > 0)
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print '<tr><td colspan="2" align="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@@ -163,5 +167,5 @@ if ($action != 'edit')
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 16:24:57 $ - $Revision: 1.22 $');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user