fix: [otp] autofocus added

JakubOnderka-patch-1
iglocska 2023-07-11 13:11:16 +02:00
parent 1bdbd0c18e
commit c45734ce5d
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,9 @@
} else {
$params['class'] = '';
}
if (!empty($fieldData['autofocus'])) {
$params['autofocus'] = 1;
}
if (empty($fieldData['type']) || $fieldData['type'] !== 'checkbox' ) {
$params['class'] .= ' form-control';
}

View File

@ -19,6 +19,7 @@ echo $this->element('/genericElements/Form/genericForm', array(
"label" => $label,
"type" => "text",
"placeholder" => __("Enter your OTP here"),
"autofocus" => 1
)
),
"submit" => array (