mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
FIX Mandatory fields must stay mandatory if create/update submit fails
This commit is contained in:
@@ -7417,7 +7417,7 @@ function printCommonFooter($zone = 'private')
|
||||
if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring);
|
||||
$relativepathstring = preg_replace('/^\//', '', $relativepathstring);
|
||||
$relativepathstring = preg_replace('/^custom\//', '', $relativepathstring);
|
||||
$tmpqueryarraywehave = explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
//$tmpqueryarraywehave = explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
if (!empty($user->default_values[$relativepathstring]['focus']))
|
||||
{
|
||||
foreach ($user->default_values[$relativepathstring]['focus'] as $defkey => $defval)
|
||||
@@ -7429,7 +7429,9 @@ function printCommonFooter($zone = 'private')
|
||||
$foundintru = 0;
|
||||
foreach ($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (!in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru = 1;
|
||||
$tmpquerytohaveparam = explode('=', $tmpquerytohave);
|
||||
//print "console.log('".$tmpquerytohaveparam[0]." ".$tmpquerytohaveparam[1]." ".GETPOST($tmpquerytohaveparam[0])."');";
|
||||
if (!GETPOSTISSET($tmpquerytohaveparam[0]) || ($tmpquerytohaveparam[1] != GETPOST($tmpquerytohaveparam[0]))) $foundintru = 1;
|
||||
}
|
||||
if (!$foundintru) $qualified = 1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
@@ -7459,7 +7461,9 @@ function printCommonFooter($zone = 'private')
|
||||
$foundintru = 0;
|
||||
foreach ($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (!in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru = 1;
|
||||
$tmpquerytohaveparam = explode('=', $tmpquerytohave);
|
||||
//print "console.log('".$tmpquerytohaveparam[0]." ".$tmpquerytohaveparam[1]." ".GETPOST($tmpquerytohaveparam[0])."');";
|
||||
if (!GETPOSTISSET($tmpquerytohaveparam[0]) || ($tmpquerytohaveparam[1] != GETPOST($tmpquerytohaveparam[0]))) $foundintru = 1;
|
||||
}
|
||||
if (!$foundintru) $qualified = 1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
|
||||
Reference in New Issue
Block a user