1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 16:51:34 +02:00

Remove modal responsibility for loading UI; using loading button state

This commit is contained in:
Toby Zerner
2015-08-02 17:25:05 +09:30
parent 3e7ddb96e1
commit c6deafde0e
9 changed files with 46 additions and 40 deletions

View File

@@ -63,7 +63,7 @@ export default class EditGroupModal extends Modal {
{Button.component({
type: 'submit',
className: 'Button Button--primary EditGroupModal-save',
loading: this._loading,
loading: this.loading,
children: 'Save Changes'
})}
{this.group.exists && this.group.id() !== Group.ADMINISTRATOR_ID ? (
@@ -80,7 +80,7 @@ export default class EditGroupModal extends Modal {
onsubmit(e) {
e.preventDefault();
this._loading = true;
this.loading = true;
this.group.save({
nameSingular: this.nameSingular(),
@@ -90,7 +90,7 @@ export default class EditGroupModal extends Modal {
}).then(
() => this.hide(),
() => {
this._loading = false;
this.loading = false;
m.redraw();
}
);