Submit on enter

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/1447/head
Roeland Jago Douma 8 years ago committed by Lukas Reschke
parent 80abb69b60
commit e80d3c2a10
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1

@ -1524,6 +1524,7 @@ OC.PasswordConfirmation = {
callback: null,
init: function() {
var self = this;
this.$form = $('#sudo-login-form');
this.$background = $('#sudo-login-background');
this.$input = this.$form.find('.question');
@ -1532,6 +1533,11 @@ OC.PasswordConfirmation = {
this.$background.on('click', _.bind(this._fadeOut, this));
$('.password-confirm-required').on('click', _.bind(this.requirePasswordConfirmation, this));
this.$submit.on('click', _.bind(this._submitPasswordConfirmation, this));
this.$input.keyup(function(e) {
if (e.keyCode === 13) {
self._submitPasswordConfirmation();
}
});
},
requiresPasswordConfirmation: function() {

Loading…
Cancel
Save