Browse Source

Added auto focus to code inputs

pull/29/head
Teknikode 7 years ago
parent
commit
fbbf460b0b
  1. 1
      Teknik/Areas/User/Scripts/CheckAuthCode.js
  2. 5
      Teknik/Areas/User/Scripts/User.js
  3. 2
      Teknik/Areas/User/Views/User/Settings.cshtml

1
Teknik/Areas/User/Scripts/CheckAuthCode.js

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
$(document).ready(function () {
$("#authCheckStatus").css('display', 'none', 'important');
$('#Code').focus();
$("#verifyCodeSubmit").click(function () {
setCode = $("#Code").val();

5
Teknik/Areas/User/Scripts/User.js

@ -28,6 +28,9 @@ @@ -28,6 +28,9 @@
});
});
$('#authenticatorSetup').on('shown.bs.modal', function (e) {
$('#auth_setup_code').focus();
});
$('#authenticatorSetup').on('hide.bs.modal', function (e) {
$("#authSetupStatus").css('display', 'none', 'important');
@ -35,7 +38,7 @@ @@ -35,7 +38,7 @@
$('#auth_setup_code').val('');
});
$('#auth_setup_confirm').click(function () {
$('#auth_setup_verify').click(function () {
setCode = $("#auth_setup_code").val();
$.ajax({
type: "POST",

2
Teknik/Areas/User/Views/User/Settings.cshtml

@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
</div>
<hr />
<div class="form-group text-right">
<button class="btn btn-primary" id="auth_setup_confirm" type="button" name="auth_setup_confirm">Confirm</button>
<button class="btn btn-primary" id="auth_setup_verify" type="button" name="auth_setup_verify">Verify</button>
</div>
</form>
</div>

Loading…
Cancel
Save