Fix: Cancel button was broken
This commit is contained in:
parent
305a843466
commit
e9cb5e8da7
@ -124,17 +124,20 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
|
|||||||
$soc->commercial_id = $_POST["commercial_id"];
|
$soc->commercial_id = $_POST["commercial_id"];
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! empty($soc->email) && ! isValidEMail($soc->email))
|
if (empty($_POST["cancel"]))
|
||||||
{
|
{
|
||||||
$error = 1;
|
if (! empty($soc->email) && ! isValidEMail($soc->email))
|
||||||
$soc->error = $langs->trans("ErrorBadEMail",$soc->email);
|
{
|
||||||
$_GET["action"]= $_POST["action"]=='add'?'add':'edit';
|
$error = 1;
|
||||||
}
|
$soc->error = $langs->trans("ErrorBadEMail",$soc->email);
|
||||||
if ($soc->fournisseur && ! $conf->fournisseur->enabled)
|
$_GET["action"]= $_POST["action"]=='add'?'add':'edit';
|
||||||
{
|
}
|
||||||
$error = 1;
|
if ($soc->fournisseur && ! $conf->fournisseur->enabled)
|
||||||
$soc->error = $langs->trans("ErrorSupplierModuleNotEnabled");
|
{
|
||||||
$_GET["action"]= $_POST["action"]=='add'?'add':'edit';
|
$error = 1;
|
||||||
|
$soc->error = $langs->trans("ErrorSupplierModuleNotEnabled");
|
||||||
|
$_GET["action"]= $_POST["action"]=='add'?'add':'edit';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user