mirror of
https://github.com/flarum/core.git
synced 2025-07-28 20:20:34 +02:00
Use more concise error handling
This commit is contained in:
@@ -55,6 +55,7 @@ export default class SuspendUserModal extends Modal {
|
|||||||
{this.status() === 'limited' ? (
|
{this.status() === 'limited' ? (
|
||||||
<div className="SuspendUserModal-days-input">
|
<div className="SuspendUserModal-days-input">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
|
min="0"
|
||||||
value={this.daysRemaining()}
|
value={this.daysRemaining()}
|
||||||
oninput={m.withAttr('value', this.daysRemaining)}
|
oninput={m.withAttr('value', this.daysRemaining)}
|
||||||
className="FormControl"/>
|
className="FormControl"/>
|
||||||
@@ -96,10 +97,7 @@ export default class SuspendUserModal extends Modal {
|
|||||||
|
|
||||||
this.props.user.save({suspendUntil}).then(
|
this.props.user.save({suspendUntil}).then(
|
||||||
() => this.hide(),
|
() => this.hide(),
|
||||||
() => {
|
this.loaded.bind(this)
|
||||||
this.loading = false;
|
|
||||||
m.redraw();
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user