mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 13:36:10 +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
1e2753502b
commit
20006b395d
|
@ -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