Modified tab cycle in Login dialog

The cycle now includes the 'remember' checkbox.
This commit is contained in:
Nicanor Romero Venier 2015-09-04 10:05:20 +02:00
parent aa6998ec5e
commit c2c5d96f8f
2 changed files with 7 additions and 1 deletions

View file

@ -113,6 +113,12 @@ $(function() {
}
};
self.onLoginRememberKeyup = function(data, event) {
if (event.keyCode == 9) {
$("#login_user").focus();
}
}
self.onAllBound = function(allViewModels) {
self.allViewModels = allViewModels;
};

View file

@ -8,7 +8,7 @@
<label for="login_pass">{{ _('Password') }}</label>
<input type="password" id="login_pass" data-bind="value: loginState.loginPass, event: {'keyup': loginState.onLoginPassKeyup}" placeholder="{{ _('Password') }}">
<label class="checkbox">
<input type="checkbox" id="login_remember" data-bind="checked: loginState.loginRemember"> {{ _('Remember me') }}
<input type="checkbox" id="login_remember" data-bind="checked: loginState.loginRemember, event: {'keypress': loginState.onLoginRememberKeyup}"> {{ _('Remember me') }}
</label>
<button class="btn btn-block btn-primary" id="login_button" data-bind="click: function() { loginState.login(); }">{{ _('Login') }}</button>
</div>