mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
UX: prevent post submission when uploading
This commit is contained in:
@ -404,13 +404,15 @@ export default Ember.Controller.extend({
|
||||
disableSubmit: Ember.computed.or("model.loading", "isUploading"),
|
||||
|
||||
save(force) {
|
||||
const composer = this.get('model');
|
||||
if (this.get("disableSubmit")) return;
|
||||
|
||||
// Clear the warning state if we're not showing the checkbox anymore
|
||||
if (!this.get('showWarning')) {
|
||||
this.set('model.isWarning', false);
|
||||
}
|
||||
|
||||
const composer = this.get('model');
|
||||
|
||||
if (composer.get('cantSubmitPost')) {
|
||||
this.set('lastValidatedAt', Date.now());
|
||||
return;
|
||||
|
Reference in New Issue
Block a user