summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/UserCreate.page
blob: edc22bcd452d905ce154b52d892d95cefaa89418 (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
76
77
78
79
80
81
82
83
84
85
86
87
<com:TContent ID="Main">
<h2>Create New User</h2>

<fieldset class="signup"><legend>User Details</legend>
<com:TWizard ID="CreateUserWizard"
	UseDefaultLayout="false"
	NavigationStyle.CssClass="wizardNav"
	OnNextButtonClick="userWizardNextStep"
	OnCompleteButtonClick="createNewUser"
	ShowSideBar="false" >
  <com:TWizardStep>
		<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:TWizardStep>
	<com:TWizardStep>
		<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:TWizardStep>
	<com:TWizardStep StepType="Complete">
		New account has been successfully created.
		<com:TPanel Visible=<%= !$this->User->isInRole('admin') %> CssClass="wizardNav">
			<com:TButton Text="Continue" OnClick="wizardCompleted"/>
		</com:TPanel>
	</com:TWizardStep>
</com:TWizard>
</fieldset>

</com:TContent>