1
0
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:
Toby Zerner
2015-08-05 11:49:37 +09:30
parent 9a3e4ce4fe
commit 4d2aac7645
12 changed files with 236 additions and 26 deletions

View File

@@ -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();

View File

@@ -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'),