mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Clean up appearance of Rename Discussion modal
Also fix infinite loading if there's a validation error.
This commit is contained in:
parent
fb68aa88db
commit
8da8c9ac7d
|
@ -24,13 +24,13 @@ export default class RenameDiscussionModal extends Modal {
|
||||||
content() {
|
content() {
|
||||||
return (
|
return (
|
||||||
<div className="Modal-body">
|
<div className="Modal-body">
|
||||||
<div className="Form">
|
<div className="Form Form--centered">
|
||||||
<div className="Form-group">
|
<div className="Form-group">
|
||||||
<input className="FormControl title" placeholder={this.currentTitle} bidi={this.newTitle} />
|
<input className="FormControl" bidi={this.newTitle} type="text" />
|
||||||
</div>
|
</div>
|
||||||
<div className="Form-group">
|
<div className="Form-group">
|
||||||
{Button.component({
|
{Button.component({
|
||||||
className: 'Button Button--primary',
|
className: 'Button Button--primary Button--block',
|
||||||
type: 'submit',
|
type: 'submit',
|
||||||
loading: this.loading,
|
loading: this.loading,
|
||||||
children: app.translator.trans('core.forum.rename_discussion.submit_button')
|
children: app.translator.trans('core.forum.rename_discussion.submit_button')
|
||||||
|
@ -59,6 +59,9 @@ export default class RenameDiscussionModal extends Modal {
|
||||||
}
|
}
|
||||||
m.redraw();
|
m.redraw();
|
||||||
this.hide();
|
this.hide();
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
m.redraw();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.hide();
|
this.hide();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user