mirror of
https://github.com/flarum/core.git
synced 2025-07-15 22:06:24 +02: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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user