Skip to content
Snippets Groups Projects
Commit b7c18c9b authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Merge pull request #3257 from aspangaro/3.8-patch10

Fix: #3229 [Members] Cancelling member type creation yields weird bug
parents 16b75fda fb0f50cf
Branches
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ $langs->load("members"); ...@@ -36,6 +36,7 @@ $langs->load("members");
$rowid = GETPOST('rowid','int'); $rowid = GETPOST('rowid','int');
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$cancel = GETPOST('cancel','alpha');
$search_lastname = GETPOST('search_lastname','alpha'); $search_lastname = GETPOST('search_lastname','alpha');
$search_login = GETPOST('search_login','alpha'); $search_login = GETPOST('search_login','alpha');
...@@ -85,7 +86,7 @@ $hookmanager->initHooks(array('membertypecard','globalcard')); ...@@ -85,7 +86,7 @@ $hookmanager->initHooks(array('membertypecard','globalcard'));
*/ */
if ($action == 'add' && $user->rights->adherent->configurer) if ($action == 'add' && $user->rights->adherent->configurer)
{ {
if ($_POST["button"] != $langs->trans("Cancel")) if (! $cancel)
{ {
$object = new AdherentType($db); $object = new AdherentType($db);
...@@ -123,7 +124,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) ...@@ -123,7 +124,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
if ($action == 'update' && $user->rights->adherent->configurer) if ($action == 'update' && $user->rights->adherent->configurer)
{ {
if ($_POST["button"] != $langs->trans("Cancel")) if (! $cancel)
{ {
$object = new AdherentType($db); $object = new AdherentType($db);
$object->id = $rowid; $object->id = $rowid;
...@@ -152,14 +153,6 @@ if ($action == 'delete' && $user->rights->adherent->configurer) ...@@ -152,14 +153,6 @@ if ($action == 'delete' && $user->rights->adherent->configurer)
exit; exit;
} }
if ($action == 'commentaire' && $user->rights->adherent->configurer)
{
$don = new Don($db);
$don->fetch($rowid);
$don->update_note(dol_html_entity_decode(GETPOST('commentaire'), ENT_QUOTES));
}
/* /*
* View * View
*/ */
...@@ -291,7 +284,7 @@ if ($action == 'create') ...@@ -291,7 +284,7 @@ if ($action == 'create')
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">'; print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'" onclick="history.go(-1)" />';
print '</div>'; print '</div>';
print "</form>\n"; print "</form>\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment