salix/modules/client/front/web-access/index.html

71 lines
2.0 KiB
HTML

<vn-watcher
vn-id="watcher"
url="Accounts"
id-field="id"
data="$ctrl.account"
form="form">
</vn-watcher>
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-check
vn-id="active"
disabled="watcher.orgData.name != $ctrl.account.name"
vn-one
label="Enable web access"
ng-model="$ctrl.account.active"
vn-acl="employee">
</vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-id="name"
disabled="watcher.orgData.active != $ctrl.account.active"
vn-focus
vn-one
label="User"
ng-model="$ctrl.account.name"
rule>
</vn-textfield>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button
ng-if="$ctrl.canChangePassword"
label="Change password"
vn-dialog="change-pass">
</vn-button>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form>
<vn-dialog
vn-id="change-pass"
on-open="$ctrl.onPassOpen()"
on-accept="$ctrl.onPassChange()">
<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>