From 8da8c9ac7d17fca87f5965ba6b95f443109977b0 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 22 Jul 2017 11:47:04 +0930 Subject: [PATCH] Clean up appearance of Rename Discussion modal Also fix infinite loading if there's a validation error. --- js/forum/src/components/RenameDiscussionModal.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/forum/src/components/RenameDiscussionModal.js b/js/forum/src/components/RenameDiscussionModal.js index 2018c9636..177a39c05 100644 --- a/js/forum/src/components/RenameDiscussionModal.js +++ b/js/forum/src/components/RenameDiscussionModal.js @@ -24,13 +24,13 @@ export default class RenameDiscussionModal extends Modal { content() { return (
-
+
- +
{Button.component({ - className: 'Button Button--primary', + className: 'Button Button--primary Button--block', type: 'submit', loading: this.loading, children: app.translator.trans('core.forum.rename_discussion.submit_button') @@ -59,6 +59,9 @@ export default class RenameDiscussionModal extends Modal { } m.redraw(); this.hide(); + }).catch(() => { + this.loading = false; + m.redraw(); }); } else { this.hide();