Merge pull request #24103 from atm-greg/autofocus_field_working_on_cards

Autofocus field working on cards
This commit is contained in:
Laurent Destailleur 2023-03-06 12:30:58 +01:00 committed by GitHub
commit 9cbbfc9cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9592,7 +9592,7 @@ function printCommonFooter($zone = 'private')
}
// Management of focus and mandatory for fields
if ($action == 'create' || $action == 'edit' || (empty($action) && (preg_match('/new\.php/', $_SERVER["PHP_SELF"])))) {
if ($action == 'create' || $action == 'edit' || (empty($action) && (preg_match('/new\.php/', $_SERVER["PHP_SELF"]))) || ((empty($action) || $action == 'addline') && (preg_match('/card\.php/', $_SERVER["PHP_SELF"])))) {
print '/* JS CODE TO ENABLE to manage focus and mandatory form fields */'."\n";
$relativepathstring = $_SERVER["PHP_SELF"];
// Clean $relativepathstring