mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:06:57 +08:00
Don't disable the create account button for signups from 3rd parties. Server will return error messages if something is wrong.
This commit is contained in:
parent
68fcb66443
commit
09dc3f128f
|
@ -36,6 +36,7 @@ export default Discourse.Controller.extend(Discourse.ModalFunctionality, {
|
|||
},
|
||||
|
||||
submitDisabled: function() {
|
||||
if (!this.get('passwordRequired')) return false; // 3rd party auth
|
||||
if (this.get('formSubmitted')) return true;
|
||||
if (this.get('tosAcceptRequired') && !this.get('tosAccepted')) return true;
|
||||
if (this.get('nameValidation.failed')) return true;
|
||||
|
@ -43,7 +44,7 @@ export default Discourse.Controller.extend(Discourse.ModalFunctionality, {
|
|||
if (this.get('usernameValidation.failed')) return true;
|
||||
if (this.get('passwordValidation.failed')) return true;
|
||||
return false;
|
||||
}.property('nameValidation.failed', 'emailValidation.failed', 'usernameValidation.failed', 'passwordValidation.failed', 'formSubmitted', 'tosAccepted'),
|
||||
}.property('passwordRequired', 'nameValidation.failed', 'emailValidation.failed', 'usernameValidation.failed', 'passwordValidation.failed', 'formSubmitted', 'tosAccepted'),
|
||||
|
||||
passwordRequired: function() {
|
||||
return this.blank('authOptions.auth_provider');
|
||||
|
|
Loading…
Reference in New Issue
Block a user