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