salix/modules/account/front/descriptor/index.html

194 lines
5.7 KiB
HTML
Raw Normal View History

<vn-descriptor-content
module="account"
description="$ctrl.user.nickname"
summary="$ctrl.$.summary">
<slot-before>
<vn-user-photo user-id="{{$ctrl.id}}"/>
</slot-before>
<slot-menu>
<vn-item
ng-click="deleteUser.show()"
name="deleteUser"
2023-05-23 05:09:51 +00:00
vn-acl="itManagement"
2021-11-25 06:43:32 +00:00
vn-acl-action="remove"
translate>
Delete
</vn-item>
<vn-item
ng-if="::$root.user.id == $ctrl.id"
ng-click="$ctrl.onChangePassClick(true)"
name="changePassword"
vn-acl="sysadmin"
2021-11-25 06:43:32 +00:00
vn-acl-action="remove"
translate>
Change password
</vn-item>
<vn-item
ng-click="$ctrl.onChangePassClick(false)"
name="setPassword"
vn-acl="sysadmin"
2021-11-25 06:43:32 +00:00
vn-acl-action="remove"
translate>
Set password
</vn-item>
<vn-item
ng-if="!$ctrl.hasAccount"
ng-click="enableAccount.show()"
name="enableAccount"
vn-acl="sysadmin"
2021-11-25 06:43:32 +00:00
vn-acl-action="remove"
translate>
Enable account
</vn-item>
<vn-item
ng-if="$ctrl.hasAccount"
ng-click="disableAccount.show()"
name="disableAccount"
vn-acl="sysadmin"
2021-11-25 06:43:32 +00:00
vn-acl-action="remove"
translate>
Disable account
</vn-item>
<vn-item
ng-if="!$ctrl.user.active"
ng-click="activateUser.show()"
name="activateUser"
2023-05-23 07:44:07 +00:00
vn-acl="itManagement"
vn-acl-action="remove"
translate>
Activate user
</vn-item>
<vn-item
ng-if="$ctrl.user.active"
ng-click="deactivateUser.show()"
name="deactivateUser"
2023-05-23 07:44:07 +00:00
vn-acl="itManagement"
vn-acl-action="remove"
translate>
Deactivate user
</vn-item>
2023-11-16 22:07:26 +00:00
<vn-item
ng-if="$ctrl.user.active"
ng-click="syncUser.show()"
name="synchronizeUser"
vn-acl="it"
vn-acl-action="remove"
translate>
Synchronize
</vn-item>
</slot-menu>
<slot-body>
<div class="attributes">
<vn-label-value
label="User"
value="{{$ctrl.user.name}}">
</vn-label-value>
<vn-label-value
label="Role"
value="{{$ctrl.user.role.name}}">
</vn-label-value>
</div>
<div class="icons">
<vn-icon
vn-tooltip="User deactivated"
icon="icon-disabled"
2020-12-04 12:40:58 +00:00
ng-if="!$ctrl.user.active">
</vn-icon>
<vn-icon
vn-tooltip="Account enabled"
icon="contact_mail"
2020-12-04 12:40:58 +00:00
ng-if="$ctrl.hasAccount">
</vn-icon>
</div>
</slot-body>
</vn-descriptor-content>
<vn-confirm
vn-id="deleteUser"
on-accept="$ctrl.onDelete()"
question="Are you sure you want to continue?"
message="User will be removed">
</vn-confirm>
<vn-confirm
vn-id="enableAccount"
on-accept="$ctrl.onEnableAccount()"
question="Are you sure you want to continue?"
message="Account will be enabled">
</vn-confirm>
<vn-confirm
vn-id="disableAccount"
on-accept="$ctrl.onDisableAccount()"
question="Are you sure you want to continue?"
message="Account will be disabled">
</vn-confirm>
<vn-confirm
vn-id="activateUser"
on-accept="$ctrl.onSetActive(true)"
question="Are you sure you want to continue?"
message="User will activated">
</vn-confirm>
<vn-confirm
vn-id="deactivateUser"
on-accept="$ctrl.onSetActive(false)"
question="Are you sure you want to continue?"
message="User will be deactivated">
</vn-confirm>
<vn-dialog
vn-id="changePass"
on-accept="$ctrl.onPassChange()"
on-close="$ctrl.onPassClose()">
<tpl-body>
<vn-textfield
ng-if="$ctrl.askOldPass"
label="Old password"
ng-model="$ctrl.oldPassword"
2020-11-07 13:05:48 +00:00
type="password"
vn-focus>
</vn-textfield>
<vn-textfield
label="New password"
ng-model="$ctrl.newPassword"
type="password"
2020-11-07 13:05:48 +00:00
info="{{'Password requirements' | translate:$ctrl.passRequirements}}"
vn-focus>
</vn-textfield>
<vn-textfield
label="Repeat password"
ng-model="$ctrl.repeatPassword"
type="password">
</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>
2023-11-16 22:07:26 +00:00
<vn-dialog
vn-id="syncUser"
on-accept="$ctrl.onSync()"
on-close="$ctrl.onSyncClose()">
<tpl-title ng-translate>
Do you want to synchronize user?
</tpl-title>
<tpl-body>
<vn-check
label="Synchronize password"
ng-model="$ctrl.shouldSyncPassword"
info="If password is not specified, just user attributes are synchronized"
vn-focus>
</vn-check>
<vn-textfield
label="Password"
ng-model="$ctrl.syncPassword"
type="password"
ng-if="$ctrl.shouldSyncPassword">
</vn-textfield>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Synchronize</button>
</tpl-buttons>
</vn-dialog>
<vn-popup vn-id="summary">
<vn-user-summary user="$ctrl.user"></vn-user-summary>
</vn-popup>