summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/UserCreate.page
blob: 41d9739155d7ed52959e2afc22d807a03d32a8f2 (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
67
68
69
70
71
72
73
74
75
<com:TContent ID="Main">
<h2>Create New User</h2>

<fieldset class="signup"><legend>User Details</legend>
	<h4>Sign Up for Your New Account</h4>
	<div class="username">
		<com:TLabel ForControl="username" Text="User Name:" />
		<span class="required">*</span>
		<com:TTextBox ID="username" />
	<com:TRequiredFieldValidator
		ControlToValidate="username"
		Display="Dynamic"
		ErrorMessage="Please enter your username."
		ControlCssClass="required-field" />
  	<com:TCustomValidator
		ControlToValidate="username"
		Display="Dynamic"
		OnServerValidate="checkUsername" />	
	</div>
	<div class="password">
		<com:TLabel ForControl="password" Text="Password:" />
		<span class="required">*</span>
		<com:TTextBox ID="password" TextMode="Password" />
	<com:TRequiredFieldValidator
		ControlToValidate="password"
		Display="Dynamic"
		ErrorMessage="Please enter your password (6 or more characters)."
		ControlCssClass="required-field" />	
	<com:TRegularExpressionValidator
		ControlToValidate="password"
		Display="Dynamic"
		RegularExpression="\w{6,}"
		ErrorMessage="Please enter 6 or more characters."
		ControlCssClass="required-field" />			
	</div>	
	<div class="password">
		<com:TLabel ForControl="password2" Text="Confirm Password:" />
		<span class="required">*</span>
		<com:TTextBox ID="password2" TextMode="Password" />
	<com:TCompareValidator
		ControlToValidate="password"
		ControlToCompare="password2"
		ErrorMessage="The Password and Confirmation Password must match."
		ControlCssClass="required-field" />		
	</div>	
	<div class="email">
		<com:TLabel ForControl="email" Text="E-Mail Address:" />
		<span class="required">*</span>
		<com:TTextBox ID="email" Style="width:20em"/>
	<com:TRequiredFieldValidator
		ControlToValidate="email"
		Display="Dynamic"
		ErrorMessage="Please enter your E-Mail address."
		ControlCssClass="required-field" />			
	<com:TEmailAddressValidator
		ControlToValidate="email"
		Display="Dynamic"
		ErrorMessage="E-Mail address does not seem to be valid."
		ControlCssClass="required-field" />		
	</div>
	<com:TPanel Visible=<%= $this->User->isInRole('admin') %> >
		<com:TLabel ForControl="role" Text="New User Role:" />
		<span class="required">*</span>
		<com:TDropDownList ID="role">
			<com:TListItem Text="Administrator" Value="admin,manager,consultant" />
			<com:TListItem Text="Manager" Value="manager,consultant" />
			<com:TListItem Text="Consultant" Value="consultant" />
		</com:TDropDownList>
	</com:TPanel>
  	<div class="create">
  		<com:TButton Text="Create User" OnClick="createNewUser" />
  	</div>	
</fieldset>

</com:TContent>