Don't disable the composer's submit button. Let it be clicked to cause validation error messages to show.

This commit is contained in:
Neil Lalonde 2014-06-16 10:52:33 -04:00
parent 61a3a6f544
commit b702ad2d54
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,10 @@ export default Discourse.Controller.extend({
return false;
},
disableSubmit: function() {
return this.get('model.loading');
}.property('model.loading'),
save: function(force) {
var composer = this.get('model'),
self = this;

View File

@ -84,7 +84,7 @@
{{#if currentUser}}
<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>
</div>
{{/if}}