1 <md-dialog class="agent-dialog" aria-label="{{vm.name}}">
2 <form name="agentForm" class="md-inline-form" novalidate>
3 <md-toolbar class="md-accent md-hue-2">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ ' STAFF.CHANGE_PASSWORD' | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
42 ng-if="vm.currentUser.id == vm.agent.id"
44 <label translate="STAFF.OLD_PASSWORD">Old Password</label>
48 ng-model="vm.oldPassword"
49 placeholder="Password"
51 translate-attr-placeholder="STAFF.OLD_PASSWORD"
54 <div ng-messages="agentForm.oldPassword.$error" role="alert">
55 <div ng-message="required">
56 <span translate="STAFF.ERRORS.PASSWORD_REQUIRED"
57 >Password field is required</span
62 <md-input-container class="md-block">
63 <label translate="STAFF.NEW_PASSWORD">New Password</label>
67 ng-model="vm.password"
68 placeholder="Password"
70 ng-pattern="vm.passwordPattern"
71 translate-attr-placeholder="STAFF.NEW_PASSWORD"
74 <div ng-messages="agentForm.password.$error" role="alert">
75 <div ng-message="required">
76 <span translate="STAFF.ERRORS.PASSWORD_REQUIRED"
77 >Password field is required</span
81 <div ng-message="pattern">
82 <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN"
83 >Must contain at least 8 characters, with a minimum of 1 lowercase
84 letter, 1 uppercase letter, 1 numeric character and 1 special
85 character ~!?*@#$%^&-_=+[{]}.</span
88 <div ng-message="oldPasswordMatch">
89 <span translate="STAFF.ERRORS.PASSWORD_OLDPASSWORD_MATCH"
90 >New password must be different from old one</span
95 <md-input-container class="md-block">
96 <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>
99 match-password="password"
100 name="confirmPassword"
101 ng-model="confirmPassword"
104 ng-messages="agentForm.confirmPassword.$error"
108 <div ng-message="required">
109 <span translate="STAFF.ERRORS.CONFIRM_REQUIRED"
110 >Confirm field is required</span
113 <div ng-message="passwordMatch">
114 <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH"
115 >Your password did not match</span
119 </md-input-container>
120 <div class="error-list">
122 ng-repeat="error in vm.errors"
125 layout-align="space-between center"
128 <span class="message">{{error.message}}</span>
129 <span class="type">({{error.type}})</span>
131 <md-button class="md-icon-button">
133 md-font-icon="icon-alert-box"
134 aria-label="alert error"
142 <md-dialog-actions layout="row" layout-align="space-between center">
143 <div layout="row" layout-align="start center">
146 ng-click="vm.savePassword()"
147 class="send-button md-accent md-raised"
148 ng-disabled="agentForm.$invalid || agentForm.$pristine"
150 translate="STAFF.SAVE"
151 translate-attr-aria-label="STAFF.SAVE"