mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-28 06:54:06 -04:00
Merge branch 'master' of github.com:discourse/discourse
This commit is contained in:
commit
37cf8b7d38
1 changed files with 13 additions and 2 deletions
|
@ -276,8 +276,19 @@ Discourse.CreateAccountView = Discourse.ModalBodyView.extend({
|
||||||
_this.set('formSubmitted', false);
|
_this.set('formSubmitted', false);
|
||||||
return _this.flash(Em.String.i18n('create_account.failed'), 'error');
|
return _this.flash(Em.String.i18n('create_account.failed'), 'error');
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
didInsertElement: function(e) {
|
||||||
|
// allows the submission the form when pressing 'ENTER' on *any* text input field
|
||||||
|
// but only when the submit button is enabled
|
||||||
|
var _this = this;
|
||||||
|
return Em.run.next(function() {
|
||||||
|
return $("input[type='text']").keydown(function(e) {
|
||||||
|
if (_this.get('submitDisabled') === false && e.keyCode === 13) {
|
||||||
|
return _this.createAccount();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue