diff options
Diffstat (limited to 'demos/personal/protected')
-rw-r--r-- | demos/personal/protected/Common/LoginPortlet.php | 19 | ||||
-rw-r--r-- | demos/personal/protected/Common/LoginPortlet.tpl | 44 | ||||
-rw-r--r-- | demos/personal/protected/Common/MainMenu.php | 12 | ||||
-rw-r--r-- | demos/personal/protected/Common/MainMenu.tpl | 15 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Home.page | 22 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Layout.php | 5 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Layout.tpl | 66 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Links.page | 116 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Register.page | 149 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Register.php | 19 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Resume.page | 126 | ||||
-rw-r--r-- | demos/personal/protected/Pages/UserLogin.page | 19 | ||||
-rw-r--r-- | demos/personal/protected/application.xml | 12 |
13 files changed, 375 insertions, 249 deletions
diff --git a/demos/personal/protected/Common/LoginPortlet.php b/demos/personal/protected/Common/LoginPortlet.php new file mode 100644 index 00000000..1f5cd4f5 --- /dev/null +++ b/demos/personal/protected/Common/LoginPortlet.php @@ -0,0 +1,19 @@ +<?php
+
+class LoginPortlet extends TTemplateControl
+{
+ public function validateUser($sender,$param)
+ {
+ $authManager=$this->Application->getModule('auth');
+ if(!$authManager->login($this->Username->Text,$this->Password->Text))
+ $param->IsValid=false;
+ }
+
+ public function loginButtonClicked($sender,$param)
+ {
+ if($this->Page->IsValid)
+ $this->Response->redirect($this->Application->getModule('auth')->getReturnUrl());
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/personal/protected/Common/LoginPortlet.tpl b/demos/personal/protected/Common/LoginPortlet.tpl new file mode 100644 index 00000000..82f9c045 --- /dev/null +++ b/demos/personal/protected/Common/LoginPortlet.tpl @@ -0,0 +1,44 @@ +<com:TPanel CssClass="login" DefaultButton="LoginButton">
+ <h4>Login to Site</h4>
+ <com:TLabel
+ ForControl="Username"
+ Text="User Name"
+ CssClass="label"/>
+ <com:TTextBox ID="Username"
+ AccessKey="u"
+ ValidationGroup="login"
+ CssClass="textbox"/>
+ <com:TRequiredFieldValidator
+ ControlToValidate="Username"
+ ValidationGroup="login"
+ Display="Dynamic"
+ ErrorMessage="*"/>
+
+ <com:TLabel
+ ForControl="Password"
+ Text="Password"
+ CssClass="label"/>
+ <com:TTextBox ID="Password"
+ AccessKey="p"
+ CssClass="textbox"
+ ValidationGroup="login"
+ TextMode="Password"/>
+ <com:TCustomValidator
+ ControlToValidate="Password"
+ ValidationGroup="login"
+ Text="...invalid"
+ Display="Dynamic"
+ OnServerValidate="validateUser" />
+
+ <div>
+ <com:TCheckBox ID="RememberMe" Text="Remember me next time"/>
+ </div>
+
+ <com:TImageButton ID="LoginButton"
+ OnClick="loginButtonClicked"
+ ImageUrl="<%=$this->Page->Theme->BaseUrl.'/images/button-login.gif'%>"
+ ValidationGroup="login"
+ CssClass="button"/>
+ or
+ <a href="<%=$this->Service->constructUrl('Register')%>" class="button"><img src="<%=$this->Page->Theme->BaseUrl.'/images/button-create.gif'%>" alt="Create a new account"/></a>
+</com:TPanel>
\ No newline at end of file diff --git a/demos/personal/protected/Common/MainMenu.php b/demos/personal/protected/Common/MainMenu.php new file mode 100644 index 00000000..a2334c03 --- /dev/null +++ b/demos/personal/protected/Common/MainMenu.php @@ -0,0 +1,12 @@ +<?php
+
+class MainMenu extends TTemplateControl
+{
+ public function logout($sender,$param)
+ {
+ $this->Application->getModule('auth')->logout();
+ $this->Response->redirect($this->Service->constructUrl('Home'));
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/personal/protected/Common/MainMenu.tpl b/demos/personal/protected/Common/MainMenu.tpl new file mode 100644 index 00000000..7e3e59f1 --- /dev/null +++ b/demos/personal/protected/Common/MainMenu.tpl @@ -0,0 +1,15 @@ +<a href="<%=$this->Service->constructUrl('Home') %>" >HOME</a> |
+<a href="<%=$this->Service->constructUrl('Resume') %>" >RESUME</a> |
+<a href="<%=$this->Service->constructUrl('Links') %>" >LINKS</a> |
+<a href="<%=$this->Service->constructUrl('Albums') %>" >ALBUMS</a> |
+<a href="<%=$this->Service->constructUrl('Register') %>" >REGISTER</a> |
+<com:THyperLink
+ NavigateUrl="<%=$this->Service->constructUrl('UserLogin') %>"
+ Text="LOGIN"
+ Visible="<%= $this->User->IsGuest %>"
+ />
+<com:TLinkButton
+ Text="LOGOUT"
+ Visible="<%= !$this->User->IsGuest %>"
+ OnClick="logout"
+ />
diff --git a/demos/personal/protected/Pages/Home.page b/demos/personal/protected/Pages/Home.page index 2c374229..2ae46032 100644 --- a/demos/personal/protected/Pages/Home.page +++ b/demos/personal/protected/Pages/Home.page @@ -1,27 +1,9 @@ <com:TContent ID="sidebar">
-<div class="login">
- <h4>Login to Site</h4>
- <com:TLabel ID="UserNameLabel" ForControl="UserName" Text="User Name" CssClass="label"/>
- <com:TTextBox ID="UserName" AccessKey="u" CssClass="textbox"/>
- <com:TRequiredFieldValidator ControlToValidate="UserName" ErrorMessage="User Name is required."/>
+<com:LoginPortlet Visible="<%= $this->User->IsGuest %>" />
- <com:TLabel ID="PasswordLabel" ForControl="Password" Text="Password" CssClass="label"/>
- <com:TTextBox ID="Password" AccessKey="p" CssClass="textbox" TextMode="Password"/>
- <com:TRequiredFieldValidator ControlToValidate="Password" ErrorMessage="Password is required."/>
-
- <div>
- <com:TCheckBox ID="RememberMe" Text="Remember me next time"/>
- </div>
-
- <com:TImageButton ID="LoginButton" ImageUrl="<%=$this->Page->Theme->BaseUrl.'/images/button-login.gif'%>" CssClass="button"/>
- or
- <a href="<%=$this->Service->constructUrl('Register')%>" class="button"><img src="<%=$this->Page->Theme->BaseUrl.'/images/button-create.gif'%>" alt="Create a new account"/></a>
- <p></p>
-</div>
-<!-- <h4><span id="ctl00_Main_LoginArea_LoginName1">Welcome Friend!</span></h4>-->
<hr />
-<table cellspacing="0" cellpadding="0" border="0" id="ctl00_Main_FormView1" style="border-width:0px;border-collapse:collapse;"></table>
+
<h4>My Latest Piece of Work</h4>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</com:TContent>
diff --git a/demos/personal/protected/Pages/Layout.php b/demos/personal/protected/Pages/Layout.php index f5009542..ba96038b 100644 --- a/demos/personal/protected/Pages/Layout.php +++ b/demos/personal/protected/Pages/Layout.php @@ -2,11 +2,6 @@ class Layout extends TTemplateControl
{
- public function logout($sender,$param)
- {
- $this->Application->getModule('auth')->logout();
- $this->Response->redirect($this->Service->constructUrl('Home',null,false));
- }
}
?>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Layout.tpl b/demos/personal/protected/Pages/Layout.tpl index 8236be4c..3ffb5306 100644 --- a/demos/personal/protected/Pages/Layout.tpl +++ b/demos/personal/protected/Pages/Layout.tpl @@ -1,60 +1,44 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+
<com:THead Title="Your Name Here | Home" />
+
<body>
<com:TForm>
<div class="header">
- <h1>Your Name Here</h1>
- <h2>My Personal Site</h2>
- <div class="menua">
- <a href="<%=$this->Service->constructUrl('Home') %>" >HOME</a> |
- <a href="<%=$this->Service->constructUrl('Resume') %>" >RESUME</a> |
- <a href="<%=$this->Service->constructUrl('Links') %>" >LINKS</a> |
- <a href="<%=$this->Service->constructUrl('Albums') %>" >ALBUMS</a> |
- <a href="<%=$this->Service->constructUrl('Register') %>" >REGISTER</a>
- </div>
-
- <div class="nav">
- <a href="<%=$this->Service->constructUrl('Home') %>" >HOME</a> |
- <com:THyperLink
- NavigateUrl=<%=$this->Service->constructUrl('UserLogin') %>
- Text="LOGIN"
- Visible=<%= $this->User->IsGuest %>
- />
- <com:TLinkButton
- Text="LOGOUT"
- Visible=<%= !$this->User->IsGuest %>
- OnClick="logout"
- />
- </div>
+<h1>Your Name Here</h1>
+<h2>My Personal Site</h2>
+
+<div class="mainmenu">
+<com:MainMenu />
+</div>
+
</div>
<div class="shim column"></div>
-
+
<div class="page" id="home">
- <div id="sidebar">
- <com:TContentPlaceHolder ID="sidebar"/>
- </div>
- <div id="content">
- <com:TContentPlaceHolder ID="content"/>
- </div>
+
+<div id="sidebar">
+<com:TContentPlaceHolder ID="sidebar"/>
+</div>
+
+<div id="content">
+<com:TContentPlaceHolder ID="content"/>
+</div>
+
</div>
<div class="footerbg">
- <div class="footer">
- <a href="<%=$this->Service->constructUrl('Home') %>" >HOME</a> |
- <a href="<%=$this->Service->constructUrl('Resume') %>" >RESUME</a> |
- <a href="<%=$this->Service->constructUrl('Links') %>" >LINKS</a> |
- <a href="<%=$this->Service->constructUrl('Albums') %>" >ALBUMS</a> |
- <a href="<%=$this->Service->constructUrl('Register') %>" >REGISTER</a>
- <br/>
- Copyright © 2006 Your Name here.<br/>
- Powered by <a href="http://www.pradosoft.com/">PRADO</a>.
- </div>
+<div class="footer">
+<com:MainMenu />
+<br/>
+Copyright © 2006-2007 Your Name here.<br/>
+Powered by <a href="http://www.pradosoft.com/">PRADO</a>.
+</div>
</div>
</com:TForm>
-
</body>
</html>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Links.page b/demos/personal/protected/Pages/Links.page index 2b2e85bc..05d19d3b 100644 --- a/demos/personal/protected/Pages/Links.page +++ b/demos/personal/protected/Pages/Links.page @@ -1,68 +1,68 @@ <com:TContent ID="content"> - <h3>About the Links</h3> - <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod - tincidunt ut laoreet dolore magna erat volutpat.</p> - <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod - tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis - nostrud exercitation consequat. esse molestie consequat, vel willum.</p> - <h4>Top 5</h4> - <dl> - <dt><a href="#">Linked site name</a></dt> +<h3>About the Links</h3> +<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod +tincidunt ut laoreet dolore magna erat volutpat.</p> +<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod +tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis +nostrud exercitation consequat. esse molestie consequat, vel willum.</p> +<h4>Top 5</h4> +<dl> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - </dl> - <h4>Cool Site Designs</h4> - <dl> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> +</dl> +<h4>Cool Site Designs</h4> +<dl> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - </dl> - <h4>Photo Sites</h4> - <dl> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> +</dl> +<h4>Photo Sites</h4> +<dl> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - </dl> - <h4>Resources</h4> - <dl> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> +</dl> +<h4>Resources</h4> +<dl> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - <dt><a href="#">Linked site name</a></dt> - <dd>A description of the web site goes here.</dd> - </dl> + <dd>A description of the web site goes here.</dd> + <dt><a href="#">Linked site name</a></dt> + <dd>A description of the web site goes here.</dd> +</dl> </com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Register.page b/demos/personal/protected/Pages/Register.page index 090d9e65..e8dd2d6f 100644 --- a/demos/personal/protected/Pages/Register.page +++ b/demos/personal/protected/Pages/Register.page @@ -5,46 +5,113 @@ <com:TContent ID="content"> <h3>Request an Account</h3> - <p>Accounts will be activated pending the approval of the Administrator.</p> - <table cellspacing="0" cellpadding="0" border="0" id="ctl00_Main_CreateUserWizard1" style="border-collapse:collapse;"> - <tr style="height:100%;"> - - <td><table cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%;border-collapse:collapse;"> - <tr> - <td style="height:100%;width:100%;"><table border="0" style="height:100%;width:100%;"> - <tr> - <td align="center" colspan="2">Sign Up for Your New Account</td> - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_UserName">User Name:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$UserName" type="text" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_UserName" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_UserNameRequired" title="User Name is required." style="color:Red;visibility:hidden;">*</span></td> - - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Password">Password:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$Password" type="password" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Password" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_PasswordRequired" title="Password is required." style="color:Red;visibility:hidden;">*</span></td> - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword">Confirm Password:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$ConfirmPassword" type="password" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_ConfirmPasswordRequired" title="Confirm Password is required." style="color:Red;visibility:hidden;">*</span></td> - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Email">E-mail:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$Email" type="text" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Email" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_EmailRequired" title="E-mail is required." style="color:Red;visibility:hidden;">*</span></td> - - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Question">Security Question:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$Question" type="text" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Question" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_QuestionRequired" title="Security question is required." style="color:Red;visibility:hidden;">*</span></td> - </tr><tr> - <td align="right"><label for="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Answer">Security Answer:</label></td><td><input name="ctl00$Main$CreateUserWizard1$CreateUserStepContainer$Answer" type="text" id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_Answer" /><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_AnswerRequired" title="Security answer is required." style="color:Red;visibility:hidden;">*</span></td> - </tr><tr> - <td align="center" colspan="2"><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_PasswordCompare" style="color:Red;display:none;">The Password and Confirmation Password must match.</span></td> - - </tr><tr> - <td align="center" colspan="2"><span id="ctl00_Main_CreateUserWizard1_CreateUserStepContainer_EmailRegExp" style="color:Red;display:none;">The email format is invalid.</span></td> - </tr> - </table></td> - </tr> - </table></td> - </tr><tr> - <td align="right"><table cellspacing="5" cellpadding="5" border="0" style="height:100%;width:100%;"> - - <tr align="right"> - <td align="right"><input type="submit" name="ctl00$Main$CreateUserWizard1$__CustomNav0$StepNextButtonButton" value="Create User" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$Main$CreateUserWizard1$__CustomNav0$StepNextButtonButton", "", true, "CreateUserWizard1", "", false, false))" id="ctl00_Main_CreateUserWizard1___CustomNav0_StepNextButtonButton" /></td> - </tr> - </table></td> - </tr> -</table> + +<p>Accounts will be activated pending the approval of the Administrator.</p> + +<com:TValidationSummary + Display="Dynamic" + ValidationGroup="user" /> + +<span class="input-label">Username</span> +<br/> +<com:TTextBox ID="Username" /> +<com:TRequiredFieldValidator + ControlToValidate="Username" + ValidationGroup="user" + Display="Dynamic" + Text="*" + ErrorMessage="Please choose a username." + ControlCssClass="input-error1" /> +<com:TRegularExpressionValidator + ControlToValidate="Username" + ValidationGroup="user" + Display="Dynamic" + RegularExpression="[\w]{3,16}" + Text="*" + ErrorMessage="Your username must contain only letters, digits and underscores, and it must contain at least 3 and at most 16 characters." + ControlCssClass="input-error2" /> +<com:TCustomValidator + ControlToValidate="Username" + ValidationGroup="user" + Display="Dynamic" + OnServerValidate="checkUsername" + Text="*" + ErrorMessage="Sorry, your username is taken by someone else. Please choose another username." + ControlCssClass="input-error3" /> + +<br/> + +<span class="input-label">Full name</span> +<br/> +<com:TTextBox ID="FullName" /> + +<br/> + +<span class="input-label">Password</span> +<br/> +<com:TTextBox ID="Password" TextMode="Password" /> +<com:TRequiredFieldValidator + ControlToValidate="Password" + ValidationGroup="user" + Display="Dynamic" + Text="*" + ErrorMessage="Please choose a password." + ControlCssClass="input-error1" /> +<com:TRegularExpressionValidator + ControlToValidate="Password" + ValidationGroup="user" + Display="Dynamic" + RegularExpression="[\w\.]{6,16}" + Text="*" + ErrorMessage="Your password must contain only letters, digits and underscores, and it must contain at least 6 and at most 16 characters." + ControlCssClass="input-error2" /> + +<br/> + +<span class="input-label">Re-type Password</span> +<br/> +<com:TTextBox ID="Password2" TextMode="Password" /> +<com:TCompareValidator + ControlToValidate="Password" + ControlToCompare="Password2" + ValidationGroup="user" + Display="Dynamic" + Text="*" + ErrorMessage="Your password entries did not match." + ControlCssClass="input-error3" /> + +<br/> + +<span class="input-label">Email Address</span> +<br/> +<com:TTextBox ID="Email" /> +<com:TRequiredFieldValidator + ControlToValidate="Email" + ValidationGroup="user" + Text="*" + ErrorMessage="Please provide your email address." + ControlCssClass="input-error1" /> +<com:TEmailAddressValidator + ControlToValidate="Email" + ValidationGroup="user" + Display="Dynamic" + Text="*" + ErrorMessage="You entered an invalid email address." + ControlCssClass="input-error2" /> + +<br/> + +<span class="input-label">Personal Website</span> +<br/> +<com:TTextBox ID="Website" AutoTrim="true" Columns="40"/> + +<br/> +<br/> + +<com:TButton + Text="Register" + ValidationGroup="user" + CssClass="link-button" + OnClick="createUser" /> </com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Register.php b/demos/personal/protected/Pages/Register.php new file mode 100644 index 00000000..b699d859 --- /dev/null +++ b/demos/personal/protected/Pages/Register.php @@ -0,0 +1,19 @@ +<?php
+
+class Register extends TPage
+{
+ public function checkUsername($sender,$param)
+ {
+ // set $param->IsValid to false if the username is already taken
+ }
+
+ public function createUser($sender,$param)
+ {
+ if($this->IsValid)
+ {
+ // create new user account
+ }
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Resume.page b/demos/personal/protected/Pages/Resume.page index 06ed845c..d34f105b 100644 --- a/demos/personal/protected/Pages/Resume.page +++ b/demos/personal/protected/Pages/Resume.page @@ -1,80 +1,80 @@ <com:TContent ID="sidebar"> - <table border="0" cellpadding="0" cellspacing="0" class="photo-frame" id="photo"> - <tr> - <td class="topx--"></td> - <td class="top-x-"></td> - <td class="top--x"></td> - </tr> - <tr> - <td class="midx--"></td> - <td><img src="<%=$this->Page->Theme->BaseUrl.'/images/resume-photo.jpg'%>" class="photo_198" style="border:4px solid white" alt="Resume Photo"/></td> +<table border="0" cellpadding="0" cellspacing="0" class="photo-frame" id="photo"> + <tr> + <td class="topx--"></td> + <td class="top-x-"></td> + <td class="top--x"></td> + </tr> + <tr> + <td class="midx--"></td> + <td><img src="<%=$this->Page->Theme->BaseUrl.'/images/resume-photo.jpg'%>" class="photo_198" style="border:4px solid white" alt="Resume Photo"/></td> - <td class="mid--x"></td> - </tr> - <tr> - <td class="botx--"></td> - <td class="bot-x-"></td> - <td class="bot--x"></td> - </tr> - </table> + <td class="mid--x"></td> + </tr> + <tr> + <td class="botx--"></td> + <td class="bot-x-"></td> + <td class="bot--x"></td> + </tr> +</table> </com:TContent> <com:TContent ID="content"> <h3>Your Name Here</h3> - <p>resume 1/23/04</p> - <p>555-555-1212 fax<br /> - 555-555-1212 voice<br /> - someone@example.com<br /> - www.example.com<br /> - City, State Country</p> +<p>resume 1/23/04</p> +<p>555-555-1212 fax<br /> +555-555-1212 voice<br /> +someone@example.com<br /> +www.example.com<br /> +City, State Country</p> - <p><a href="#"><img src="<%=$this->Page->Theme->BaseUrl.'/images/button-dwn_res.gif'%>" alt="download resume in word format" style="border-width:0px;" /></a></p> - <h4>Objective</h4> - <p class="first">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> - <h4>Experience</h4> - <p class="first">1999 - 2004 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> - Sed diam nonummy nibh euismod </p> +<p><a href="#"><img src="<%=$this->Page->Theme->BaseUrl.'/images/button-dwn_res.gif'%>" alt="download resume in word format" style="border-width:0px;" /></a></p> +<h4>Objective</h4> +<p class="first">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> +<h4>Experience</h4> +<p class="first">1999 - 2004 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> + Sed diam nonummy nibh euismod </p> - <ul> - <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> - <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> - <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> - </ul> - <p>1995 - 1999 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> +<ul> + <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> + <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> + <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> +</ul> +<p>1995 - 1999 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> - Sed diam nonummy nibh euismod </p> - <ul> - <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> - <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> - <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> - </ul> - <p>1993 - 1995 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> + Sed diam nonummy nibh euismod </p> +<ul> + <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> + <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> + <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> +</ul> +<p>1993 - 1995 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> - Sed diam nonummy nibh euismod </p> - <ul> - <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> - <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> - <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> - </ul> - <p>1987 - 1993 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> + Sed diam nonummy nibh euismod </p> +<ul> + <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> + <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> + <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> +</ul> +<p>1987 - 1993 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> - Sed diam nonummy nibh euismod </p> - <ul> - <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> - <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> - <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> - </ul> - <h4>Education</h4> + Sed diam nonummy nibh euismod </p> +<ul> + <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> + <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat. </li> + <li>Duis autem veleum iriure dolor in hendrerit in vel willum.</li> +</ul> +<h4>Education</h4> - <p class="first">1984 - 1987 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> - Sed diam nonummy nibh euismod </p> - <ul> - <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> - <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.</li> - </ul> +<p class="first">1984 - 1987 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br /> +Sed diam nonummy nibh euismod </p> +<ul> + <li>Ttincidunt ut laoreet dolore magna aliquam erat volutpat. </li> + <li>Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.</li> +</ul> - <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> +<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/UserLogin.page b/demos/personal/protected/Pages/UserLogin.page index 8fb6019b..b87aa8fb 100644 --- a/demos/personal/protected/Pages/UserLogin.page +++ b/demos/personal/protected/Pages/UserLogin.page @@ -1,18 +1,5 @@ <com:TContent ID="content" >
-Username:
-<com:TTextBox ID="Username" />
-<com:TRequiredFieldValidator
- ControlToValidate="Username"
- Text="Username is required."
- Display="Dynamic"/>
-<br/>
-Password: <com:TTextBox ID="Password" TextMode="Password" /><br/>
-<com:TButton Text="Login" />
-<com:TCustomValidator
- ControlToValidate="Password"
- Text="Login failed."
- Display="Dynamic"
- OnServerValidate="login"
- />
-<com:TLabel ID="Error" />
+
+<com:LoginPortlet />
+
</com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/application.xml b/demos/personal/protected/application.xml index 98ffa30a..d2affe24 100644 --- a/demos/personal/protected/application.xml +++ b/demos/personal/protected/application.xml @@ -1,6 +1,9 @@ <?xml version="1.0" encoding="utf-8"?>
<application id="personal" mode="Normal">
+ <paths>
+ <using namespace="Application.Common.*" />
+ </paths>
<!-- modules configured and loaded for all services -->
<modules>
<!-- Remove this comment mark to enable caching
@@ -9,13 +12,12 @@ <!-- Remove this comment mark to enable PATH url format
<module id="request" class="THttpRequest" UrlFormat="Path" />
-->
- <!--
- <module id="session" class="THttpSession" />
- -->
- <!--<module id="log" class="System.Util.TLogRouter">
+ <!-- Remove this comment mark to enable logging
+ <module id="log" class="System.Util.TLogRouter">
<route class="TBrowserLogRoute" Categories="System" />
<route class="TFileLogRoute" Categories="System" Levels="Notice,Warning,Error,Alert,Fatal" />
- </module>-->
+ </module>
+ -->
</modules>
<services>
<!-- page service -->
|