summaryrefslogtreecommitdiff
path: root/app/frontend/controls/PasswordChange.tpl
blob: 4eb9a8e87f8a97b7bc76f69e0f0712552423d138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<%[ Change password ]%><br />
<%[ Current password: ]%>
<com:TTextBox ID="Password"
              TextMode="Password"
              ValidationGroup="ChangePasswordGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="Password"
    Display="Dynamic"
    ValidationGroup="ChangePasswordGroup">
  <prop:ErrorMessage><%[ Current password cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<com:TCustomValidator
    ControlToValidate="Password"
    OnServerValidate="checkPassword"
    Display="Dynamic"
    ValidationGroup="ChangePasswordGroup">
  <prop:ErrorMessage><%[ Password is incorrect ]%></prop:ErrorMessage>
</com:TCustomValidator>
<br />
<%[ New password: ]%>
<com:TTextBox ID="NewPassword"
              TextMode="Password"
              ValidationGroup="ChangePasswordGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="NewPassword"
    Display="Dynamic"
    ValidationGroup="ChangePasswordGroup">
  <prop:ErrorMessage><%[ New password cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<br />
<%[ Repeat password: ]%>
<com:TTextBox ID="ReNewPassword"
              TextMode="Password"
              ValidationGroup="ChangePasswordGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="ReNewPassword"
    Display="Dynamic"
    ValidationGroup="ChangePasswordGroup">
  <prop:ErrorMessage><%[ New password cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<com:TCompareValidator
    ControlToValidate="ReNewPassword"
    ControlToCompare="NewPassword"
    DataType="String"
    Operator="Equal"
    Display="Dynamic"
    ValidationGroup="ChangePasswordGroup">
  <prop:ErrorMessage><%[ Passwords don't match ]%></prop:ErrorMessage>
</com:TCompareValidator>
<br />
<com:TButton
    OnCommand="changePassword"
    ValidationGroup="ChangePasswordGroup">
  <prop:Text><%[ Change password ]%></prop:Text>
</com:TButton>
<com:TLabel ID="SuccessMessage"
            Visible="false">
  <prop:Text><%[ Your password has been changed ]%></prop:Text>
</com:TLabel>