mirror of
https://github.com/flarum/framework.git
synced 2025-03-22 21:15:16 +08:00
Rely on default modal error handling
This also gives the server-side the chance to add more different error messages / additional behavior without having to change the frontend. Refs #18.
This commit is contained in:
parent
e9a11b11d3
commit
95d2ba3eb7
@ -112,12 +112,4 @@ export default class FlagPostModal extends Modal {
|
||||
.catch(() => {})
|
||||
.then(this.loaded.bind(this));
|
||||
}
|
||||
|
||||
onerror(error) {
|
||||
if (error.status === 422) {
|
||||
error.alert.props.children = app.translator.trans('flarum-flags.forum.flag_post.reason-needed');
|
||||
}
|
||||
|
||||
super.onerror(error);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user