Fix: #3229 [Members] Cancelling member type creation yields weird bug
This commit is contained in:
parent
e62595b00f
commit
fb0f50cf4b
@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||||||
|
|
||||||
$langs->load("members");
|
$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'));
|
|||||||
*/
|
*/
|
||||||
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)
|
|||||||
|
|
||||||
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)
|
|||||||
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')
|
|||||||
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 ' ';
|
print ' ';
|
||||||
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";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user