mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
Don't disable the composer's submit button. Let it be clicked to cause validation error messages to show.
This commit is contained in:
@ -94,6 +94,10 @@ export default Discourse.Controller.extend({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
disableSubmit: function() {
|
||||||
|
return this.get('model.loading');
|
||||||
|
}.property('model.loading'),
|
||||||
|
|
||||||
save: function(force) {
|
save: function(force) {
|
||||||
var composer = this.get('model'),
|
var composer = this.get('model'),
|
||||||
self = this;
|
self = this;
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
{{#if currentUser}}
|
{{#if currentUser}}
|
||||||
<div class='submit-panel'>
|
<div class='submit-panel'>
|
||||||
<button {{action save}} tabindex="4" {{bind-attr class=":btn :btn-primary :create model.cantSubmitPost:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
|
<button {{action save}} tabindex="4" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
|
||||||
<a href='#' {{action cancel}} class='cancel' tabindex="4">{{i18n cancel}}</a>
|
<a href='#' {{action cancel}} class='cancel' tabindex="4">{{i18n cancel}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user