diff options
Diffstat (limited to 'demos/time-tracker/protected/pages/TimeTracker')
5 files changed, 17 insertions, 27 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/Login.php b/demos/time-tracker/protected/pages/TimeTracker/Login.php index 941cb4b7..8de63ad8 100755 --- a/demos/time-tracker/protected/pages/TimeTracker/Login.php +++ b/demos/time-tracker/protected/pages/TimeTracker/Login.php @@ -6,18 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2006 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: Login.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos */ /** * Login page class. - * - * Validate the user credentials and redirect to requested page + * + * Validate the user credentials and redirect to requested page * if successful. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: Login.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos * @since 3.1 */ @@ -26,7 +24,7 @@ class Login extends TPage /** * Validates the username and password. * @param TControl custom validator that created the event. - * @param TServerValidateEventParameter validation parameters. + * @param TServerValidateEventParameter validation parameters. */ public function validateUser($sender, $param) { @@ -34,7 +32,7 @@ class Login extends TPage if(!$authManager->login($this->username->Text,$this->password->Text)) $param->IsValid=false;; } - + /** * Redirect to the requested page if login is successful. * @param TControl button control that created the event. diff --git a/demos/time-tracker/protected/pages/TimeTracker/Logout.php b/demos/time-tracker/protected/pages/TimeTracker/Logout.php index 9f4de556..bab924f2 100755 --- a/demos/time-tracker/protected/pages/TimeTracker/Logout.php +++ b/demos/time-tracker/protected/pages/TimeTracker/Logout.php @@ -6,7 +6,6 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2006 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: Logout.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos */ @@ -14,7 +13,6 @@ * Logout page class. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: Logout.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos * @since 3.1 */ @@ -27,7 +25,7 @@ class Logout extends TPage { $this->Application->getModule('auth')->logout(); $url = $this->Service->constructUrl($this->Service->DefaultPage); - $this->Response->redirect($url); + $this->Response->redirect($url); } } diff --git a/demos/time-tracker/protected/pages/TimeTracker/SiteMap.php b/demos/time-tracker/protected/pages/TimeTracker/SiteMap.php index 51df0583..ab612baf 100755 --- a/demos/time-tracker/protected/pages/TimeTracker/SiteMap.php +++ b/demos/time-tracker/protected/pages/TimeTracker/SiteMap.php @@ -6,7 +6,6 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2006 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: SiteMap.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos */ @@ -14,7 +13,6 @@ * SiteMap menu is rendered depending on user roles. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: SiteMap.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos * @since 3.1 */ @@ -26,7 +24,7 @@ class SiteMap extends TTemplateControl public function onPreRender($param) { parent::onPreRender($param); - + $page = explode('.',$this->Request->ServiceParameter); $active = null; switch($page[count($page)-1]) @@ -47,7 +45,7 @@ class SiteMap extends TTemplateControl $active = $this->LogMenu; break; } - + //add 'active' string to place holder body. if(!is_null($active)) $active->Controls[] = 'active'; diff --git a/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php b/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php index 2c73752a..34e69713 100755 --- a/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php +++ b/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php @@ -6,18 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2006 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: UserCreate.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos */ /** * Create new user wizard page class. Validate that the usernames are unique and * set the new user credentials as the current application credentials. - * + * * If logged in as admin, the user role can be change during creation. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: UserCreate.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos * @since 3.1 */ @@ -30,11 +28,11 @@ class UserCreate extends TPage { if(!$this->IsPostBack) { - $this->role->SelectedValue = + $this->role->SelectedValue = $this->Application->Parameters['NewUserRoles']; } } - + /** * Verify that the username is not taken. * @param TControl custom validator that created the event. @@ -46,11 +44,11 @@ class UserCreate extends TPage if($userDao->usernameExists($this->username->Text)) { $param->IsValid = false; - $sender->ErrorMessage = + $sender->ErrorMessage = "The user name is already taken, try '{$this->username->Text}01'"; } } - + /** * Skip the role assignment step if not admin. */ @@ -66,7 +64,7 @@ class UserCreate extends TPage } } } - + /** * Create a new user if all data entered are valid. * The default user roles are obtained from "config.xml". The new user @@ -84,11 +82,11 @@ class UserCreate extends TPage $newUser->Name = $this->username->Text; $newUser->IsGuest = false; $newUser->Roles = $this->role->SelectedValue; - + //save the user $userDao = $this->Application->Modules['daos']->getDao('UserDao'); $userDao->addNewUser($newUser, $this->password->Text); - + //update the user credentials if not admin if(!$this->User->isInRole('admin')) { @@ -97,7 +95,7 @@ class UserCreate extends TPage } } } - + /** * Continue with requested page. */ diff --git a/demos/time-tracker/protected/pages/TimeTracker/UserList.php b/demos/time-tracker/protected/pages/TimeTracker/UserList.php index 9dc3ab5f..71b41add 100755 --- a/demos/time-tracker/protected/pages/TimeTracker/UserList.php +++ b/demos/time-tracker/protected/pages/TimeTracker/UserList.php @@ -6,7 +6,6 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2006 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: UserList.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos */ @@ -14,7 +13,6 @@ * List all users in a repeater. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: UserList.php 3189 2012-07-12 12:16:21Z ctrlaltca $ * @package Demos * @since 3.1 */ @@ -27,7 +25,7 @@ class UserList extends TPage { $userDao = $this->Application->Modules['daos']->getDao('UserDao'); $this->list->DataSource = $userDao->getAllUsers(); - $this->list->dataBind(); + $this->list->dataBind(); } } |