55 lines
1.7 KiB
HTML
55 lines
1.7 KiB
HTML
<vn-watcher
|
|
vn-id="watcher"
|
|
url="/client/api/Accounts"
|
|
id-field="id"
|
|
data="$ctrl.account"
|
|
form="form">
|
|
</vn-watcher>
|
|
<form name="form" ng-submit="watcher.submit()" compact>
|
|
<vn-card class="vn-pa-lg">
|
|
<vn-horizontal>
|
|
<vn-check
|
|
vn-one
|
|
label="Enable web access"
|
|
ng-model="$ctrl.account.active"
|
|
vn-acl="employee">
|
|
</vn-check>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-focus
|
|
vn-one
|
|
label="User"
|
|
ng-model="$ctrl.account.name"
|
|
rule>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit label="Save"></vn-submit>
|
|
<vn-button ng-if="$ctrl.canChangePassword" label="Change password" vn-dialog="change-pass"></vn-button>
|
|
<vn-button label="Undo changes" ng-if="$ctrl.$.form.$dirty" ng-click="watcher.loadOriginalData()"></vn-button>
|
|
</vn-button-bar>
|
|
</form>
|
|
<vn-dialog
|
|
vn-id="change-pass"
|
|
on-open="$ctrl.onPassOpen()"
|
|
on-response="$ctrl.onPassChange(response)">
|
|
<tpl-body>
|
|
<vn-textfield
|
|
type="password"
|
|
label="New password"
|
|
ng-model="$ctrl.newPassword">
|
|
</vn-textfield>
|
|
<vn-textfield
|
|
type="password"
|
|
label="Repeat password"
|
|
ng-model="$ctrl.repeatPassword">
|
|
</vn-textfield>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="ACCEPT" translate>Change password</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|