summaryrefslogtreecommitdiff
path: root/app/frontend/controls/RegistrationForm.tpl
blob: 9defe5499ddcfda88eaea3994b89048799f72e95 (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
60
61
62
63
64
65
66
<%[ Username: ]%>
<com:TTextBox ID="Login"
              ValidationGroup="SignupGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="Login"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Username cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<com:TRegularExpressionValidator
    ControlToValidate="Login"
    RegularExpression="[a-zA-Z0-9_]{6,255}"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Username must contain 6-255 characters, all Latin alphanumeric or underscore ]%></prop:ErrorMessage>
</com:TRegularExpressionValidator>
<com:TCustomValidator
    ControlToValidate="Login"
    OnServerValidate="checkUsername"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Username already exists ]%></prop:ErrorMessage>
</com:TCustomValidator>
<br />
<%[ Password: ]%>
<com:TTextBox ID="Password"
              TextMode="Password"
              ValidationGroup="SignupGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="Password"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Password cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<br />
<%[ Repeat password: ]%>
<com:TTextBox ID="RePassword"
              TextMode="Password"
              ValidationGroup="SignupGroup" />
<com:TRequiredFieldValidator
    ControlToValidate="RePassword"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Password cannot be empty ]%></prop:ErrorMessage>
</com:TRequiredFieldValidator>
<com:TCompareValidator
    ControlToValidate="RePassword"
    ControlToCompare="Password"
    DataType="String"
    Operator="Equal"
    Display="Dynamic"
    ValidationGroup="SignupGroup">
  <prop:ErrorMessage><%[ Passwords don't match ]%></prop:ErrorMessage>
</com:TCompareValidator>
<br />
<%[ Admin: ]%>
<com:TCheckBox ID="Admin"
               ValidationGroup="SignupGroup" />
<br />
<com:TButton
    OnCommand="registerUser"
    ValidationGroup="SignupGroup">
  <prop:Text><%[ Create ]%></prop:Text>
</com:TButton>
<com:TValidationSummary
    ValidationGroup="SignupGroup" />