mirror of
https://github.com/flarum/core.git
synced 2025-07-21 16:51:34 +02:00
Implement edit user modal
EditUserHandler is a bit rough
This commit is contained in:
@@ -109,10 +109,10 @@ export default class Modal extends Component {
|
||||
const errors = response && response.errors;
|
||||
|
||||
if (errors) {
|
||||
this.alert(new Alert({
|
||||
type: 'warning',
|
||||
message: errors.map((error, k) => [error.detail, k < errors.length - 1 ? m('br') : ''])
|
||||
}));
|
||||
this.alert = new Alert({
|
||||
type: 'error',
|
||||
children: errors.map((error, k) => [error.detail, k < errors.length - 1 ? m('br') : ''])
|
||||
});
|
||||
}
|
||||
|
||||
m.redraw();
|
||||
|
@@ -10,7 +10,7 @@ import Badge from 'flarum/components/Badge';
|
||||
export default class User extends mixin(Model, {
|
||||
username: Model.attribute('username'),
|
||||
email: Model.attribute('email'),
|
||||
isConfirmed: Model.attribute('isConfirmed'),
|
||||
isActivated: Model.attribute('isActivated'),
|
||||
password: Model.attribute('password'),
|
||||
|
||||
avatarUrl: Model.attribute('avatarUrl'),
|
||||
|
Reference in New Issue
Block a user