refs #6067 feat(account_basicData): use vnUser/preview
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2023-09-21 15:06:14 +02:00
parent 3b90d7e5e5
commit a78348f2de
2 changed files with 15 additions and 6 deletions

View File

@ -1,9 +1,11 @@
<mg-ajax path="VnUsers/{{post.params.id}}" options="vnPost"></mg-ajax>
<vn-watcher <vn-watcher
vn-id="watcher" vn-id="watcher"
url="VnUsers" url="VnUsers/preview"
data="$ctrl.user" data="$ctrl.user"
id-value="$ctrl.$params.id" where="{id: $ctrl.$params.id}"
form="form"> form="form"
save="post">
</vn-watcher> </vn-watcher>
<form <form
name="form" name="form"
@ -12,18 +14,18 @@
<vn-card class="vn-pa-lg"> <vn-card class="vn-pa-lg">
<vn-vertical> <vn-vertical>
<vn-textfield <vn-textfield
label="User" label="User"
ng-model="$ctrl.user.name" ng-model="$ctrl.user.name"
rule="VnUser" rule="VnUser"
vn-focus> vn-focus>
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield
label="Nickname" label="Nickname"
ng-model="$ctrl.user.nickname" ng-model="$ctrl.user.nickname"
rule="VnUser"> rule="VnUser">
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield
label="Personal email" label="Personal email"
ng-model="$ctrl.user.email" ng-model="$ctrl.user.email"
rule="VnUser"> rule="VnUser">
</vn-textfield> </vn-textfield>

View File

@ -2,6 +2,13 @@ import ngModule from '../module';
import Section from 'salix/components/section'; import Section from 'salix/components/section';
export default class Controller extends Section { export default class Controller extends Section {
set user(value) {
this._user = value;
console.log(value);
}
get user() {
return this._user;
}
$onInit() { $onInit() {
if (this.$params.emailConfirmed) if (this.$params.emailConfirmed)
this.vnApp.showSuccess(this.$t('Email verified successfully!')); this.vnApp.showSuccess(this.$t('Email verified successfully!'));