Skip to content
Snippets Groups Projects
Verified Commit 62cf7d61 authored by Pavel Břoušek's avatar Pavel Břoušek
Browse files

feat: autofocus OTP field

autofocus the OTP field when only OTP is available
parent a80f137e
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,10 @@ if (null !== $this->data['errorCode']) { ...@@ -170,7 +170,10 @@ if (null !== $this->data['errorCode']) {
<label for="otp" class="sr-only"> <label for="otp" class="sr-only">
<?php echo $this->t('{privacyidea:privacyidea:otp}'); ?> <?php echo $this->t('{privacyidea:privacyidea:otp}'); ?>
</label> </label>
<input id="otp" name="otp" type="password" placeholder="<?php echo htmlspecialchars($otpHint, ENT_QUOTES); ?>"> <input id="otp" name="otp" type="password" placeholder="<?php echo htmlspecialchars($otpHint, ENT_QUOTES); ?>"
<?php if (($this->data['otpAvailable'] ?? true) && $this->data['noAlternatives']) {
echo ' autofocus';
} ?>>
</p> </p>
<?php } ?> <?php } ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment