From 082e280fb657ad2377b070b2979cfd118766aa67 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 29 Sep 2014 17:30:54 +1000 Subject: [PATCH] Moved to lnApp --- classes/Controller/{Account.php => Login.php} | 2 +- classes/Controller/User/Account.php | 4 - classes/Model/Auth/UserDefault.php | 4 - classes/Model/Module/Method/Token.php | 2 +- classes/lnAuth/Auth/ORM.php | 116 +----------------- classes/lnAuth/Controller/Account.php | 14 --- classes/lnAuth/Controller/Admin/Module.php | 2 +- .../lnAuth/Controller/Admin/Module/Method.php | 6 +- classes/lnAuth/Controller/Login.php | 109 ++++++++++++++++ classes/lnAuth/Controller/TemplateDefault.php | 4 +- classes/lnAuth/Controller/User/Account.php | 105 ---------------- classes/lnAuth/Menu.php | 5 +- classes/lnAuth/Model/Account.php | 114 ++--------------- classes/lnAuth/Model/Auth/UserDefault.php | 40 ------ classes/lnAuth/Model/Group/Method.php | 2 +- config/auth.php | 17 --- config/config.php | 2 - views/account/user/edit.php | 61 --------- views/account/user/resetpassword.php | 14 --- views/login/activate.php | 30 ----- views/login/activate_resend.php | 19 --- views/login/reset.php | 31 ----- views/login/reset_sent.php | 29 ----- views/module/method/admin/add.php | 16 +++ views/module/method/admin/edit.php | 41 +++++++ 25 files changed, 186 insertions(+), 603 deletions(-) rename classes/Controller/{Account.php => Login.php} (51%) delete mode 100644 classes/Controller/User/Account.php delete mode 100644 classes/Model/Auth/UserDefault.php delete mode 100644 classes/lnAuth/Controller/Account.php create mode 100644 classes/lnAuth/Controller/Login.php delete mode 100644 classes/lnAuth/Controller/User/Account.php delete mode 100644 classes/lnAuth/Model/Auth/UserDefault.php delete mode 100644 config/auth.php delete mode 100644 views/account/user/edit.php delete mode 100644 views/account/user/resetpassword.php delete mode 100644 views/login/activate.php delete mode 100644 views/login/activate_resend.php delete mode 100644 views/login/reset.php delete mode 100644 views/login/reset_sent.php create mode 100644 views/module/method/admin/add.php create mode 100644 views/module/method/admin/edit.php diff --git a/classes/Controller/Account.php b/classes/Controller/Login.php similarity index 51% rename from classes/Controller/Account.php rename to classes/Controller/Login.php index 0ce5671..ca81c56 100644 --- a/classes/Controller/Account.php +++ b/classes/Controller/Login.php @@ -1,4 +1,4 @@ diff --git a/classes/Controller/User/Account.php b/classes/Controller/User/Account.php deleted file mode 100644 index cedc14f..0000000 --- a/classes/Controller/User/Account.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/classes/Model/Auth/UserDefault.php b/classes/Model/Auth/UserDefault.php deleted file mode 100644 index e59d05f..0000000 --- a/classes/Model/Auth/UserDefault.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/classes/Model/Module/Method/Token.php b/classes/Model/Module/Method/Token.php index 21eb00a..5f3eb98 100644 --- a/classes/Model/Module/Method/Token.php +++ b/classes/Model/Module/Method/Token.php @@ -1,4 +1,4 @@ diff --git a/classes/lnAuth/Auth/ORM.php b/classes/lnAuth/Auth/ORM.php index 50abdbe..84aafd9 100644 --- a/classes/lnAuth/Auth/ORM.php +++ b/classes/lnAuth/Auth/ORM.php @@ -9,20 +9,7 @@ * @copyright (c) 2014 Deon George * @license http://dev.leenooks.net/license.html */ -class lnAuth_Auth_ORM extends Kohana_Auth_ORM { - /** - * We need to override Kohana's __construct(), for tasks, which attempt to open a session - * and probably dont have access to PHP sessions path. - * Tasks dont need sessions anyway? - */ - public function __construct($config = array()) { - // Save the config in the object - $this->_config = $config; - - if (PHP_SAPI !== 'cli') - parent::__construct($config); - } - +abstract class lnAuth_Auth_ORM extends lnApp_Auth_ORM { /** * Get the user that a token applies to * @@ -31,7 +18,7 @@ class lnAuth_Auth_ORM extends Kohana_Auth_ORM { * @param $token The token * @return Model_Account|NULL The user that the token is valid for. */ - private function _get_token_user($token) { + protected function _get_token_user($token) { // This has been implemented, as we sometimes we seem to come here twice static $uo = NULL; @@ -89,104 +76,7 @@ class lnAuth_Auth_ORM extends Kohana_Auth_ORM { } /** - * Logs a user in. - * - * @param string username - * @param string password - * @param boolean enable autologin - * @return boolean - */ - protected function _login($user,$password,$remember) { - if (! is_object($user)) { - $username = $user; - - // Load the user - $user = ORM::factory($this->_model); - $user->where('email','=',$username)->find(); - - // If no user loaded, return - if (! $user->loaded()) - return FALSE; - } - - // Create a hashed password - if (is_string($password)) - $password = $this->hash($password); - - // If we have the right password, we'll check the status of the account - if ($user->password === $password AND $user->active) { - // Record our session ID, we may need to update our DB when we get a new ID - $oldsess = session_id(); - - // Finish the login - $this->complete_login($user); - - // Do we need to update databases with our new sesion ID - $sct = Kohana::$config->load('config')->session_change_trigger; - if (session_id() != $oldsess AND count($sct)) - foreach ($sct as $t => $c) - if (Config::module_exist($t)) - foreach (ORM::factory(ucwords($t))->where($c,'=',$oldsess)->find_all() as $o) - $o->set('session_id',session_id()) - ->update(); - - if (! $user->has_any('group',ORM::factory('Group',array('name'=>'Registered Users'))->list_childgrps(TRUE))) - HTTP::redirect(URL::link('user','account/activate')); - - return TRUE; - } - - // Login failed - return FALSE; - } - - /** - * Determine if a user is authorised to view an account - * - * @param Model_Account Account Ojbect to validate if the current user has access - * @return boolean TRUE if authorised, FALSE if not. - */ - public function authorised(Model_Account $ao) { - return (($uo = $this->get_user()) AND $uo->loaded() AND ($uo == $ao OR in_array($ao->id,$uo->RTM->customers($uo->RTM)))); - } - - /** - * Gets the currently logged in user from the session. - * Returns NULL if no user is currently logged in. - * - * @param boolean Check token users too - * @return mixed - */ - public function get_user($default=NULL,$tokenuser=TRUE) { - // If we are a CLI, we are not logged in - if (PHP_SAPI === 'cli') - throw new Kohana_Exception('Calling :method from the CLI is not allowed!',array(':method'=>__METHOD__)); - - // Get the current user - $uo = parent::get_user($default); - - // If we are not logged in, see if there is token for the user - if (is_null($uo) AND $tokenuser AND ($token=Session::instance()->get('token')) OR (! empty($_REQUEST['token']) AND $token=$_REQUEST['token'])) - $uo = $this->_get_token_user($token); - - return $uo; - } - - public function get_groups() { - return is_null($x=$this->get_user()) ? ORM::factory('Group')->where('id','=',0)->find_all() : $x->groups(); - } - - // Override Kohana Auth requirement to have a hash_key - public function hash($str) { - switch ($this->_config['hash_method']) { - case '' : return $str; - case 'md5': return md5($str); - default: return hash_hmac($this->_config['hash_method'], $str, $this->_config['hash_key']); - } - } - - /** - * OSB authentication is controlled via database queries. + * Authentication is controlled via database queries. * * This method can be used to test two situations: * 1) Is the user logged in? ($role == FALSE) diff --git a/classes/lnAuth/Controller/Account.php b/classes/lnAuth/Controller/Account.php deleted file mode 100644 index d2cb71f..0000000 --- a/classes/lnAuth/Controller/Account.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/classes/lnAuth/Controller/Admin/Module.php b/classes/lnAuth/Controller/Admin/Module.php index 57c7cba..8644a0c 100644 --- a/classes/lnAuth/Controller/Admin/Module.php +++ b/classes/lnAuth/Controller/Admin/Module.php @@ -74,7 +74,7 @@ abstract class lnAuth_Controller_Admin_Module extends Controller_Module { $auth_required[$cn] = $rdp['auth_required']; foreach ($r->getMethods() as $method) - if ($method->class == $cn AND preg_match('/^action_/',$method->name)) + if (preg_match('/^action_/',$method->name)) array_push($methods,str_replace('action_',strtolower($x.($sc ? '_'.$sc : '').':'),$method->name)); } } diff --git a/classes/lnAuth/Controller/Admin/Module/Method.php b/classes/lnAuth/Controller/Admin/Module/Method.php index f98640e..ad19238 100644 --- a/classes/lnAuth/Controller/Admin/Module/Method.php +++ b/classes/lnAuth/Controller/Admin/Module/Method.php @@ -100,10 +100,8 @@ abstract class lnAuth_Controller_Admin_Module_Method extends Controller_Admin_Mo Block::factory() ->title(sprintf(_('Configure access to method (%s::%s)'),$mmo->controller(),$mmo->method())) ->title_icon('icon-plus-sign') - ->type('form') - ->body(View::factory('module/method/admin/edit') - ->set('o',$mmo) - ); + ->type('form-horizontal') + ->body(View::factory('module/method/admin/edit')->set('o',$mmo)); } } ?> diff --git a/classes/lnAuth/Controller/Login.php b/classes/lnAuth/Controller/Login.php new file mode 100644 index 0000000..e359b97 --- /dev/null +++ b/classes/lnAuth/Controller/Login.php @@ -0,0 +1,109 @@ +request->post()) { + $ao = ORM::factory('Account',array('id'=>$this->request->param('id'),'email'=>$this->request->post('email'))); + + if ($ao->loaded()) { + if ($ao->activated()) + HTTP::redirect('login'); + + elseif (! $ao->active) { + SystemMessage::factory() + ->title(_('Account NOT Activated')) + ->type('warning') + ->body(_('Your account cannot been activated, please contact us.')); + + } elseif ($ao->activate_code() == $this->request->post('code')) { + $go = ORM::factory('Group',array('name'=>'Registered Users')); + + $ago = ORM::factory('Account_Group',array('account_id'=>$ao,'group_id'=>$go)); + + if (! $ago->loaded()) { + $ago->account_id=$ao; + $ago->group_id=$go; + } + + $ago->active = TRUE; + $ago->save(); + + SystemMessage::factory() + ->title(_('Account Activated')) + ->type('info') + ->body(_('Your account has been activated.')); + } + + HTTP::redirect('welcome'); + } + + } elseif (! $this->request->param('id')) + HTTP::redirect('login/activate_resend'); + + Block::factory() + ->title('Activate account') + ->title_icon('fa-wrench') + ->type('form-horizontal') + ->body(View::factory('login/activate')->set('o',Session::instance()->get_once('activate'))->set('email',$this->request->query('email'))); + } + + /** + * Register for an account on the site + */ + public function action_register() { + $ao = ORM::factory('Account',$this->request->param('id')); + + if ($this->request->post()) { + $ao->values($this->request->post()); + $ao->active = "1"; + + if ($ao->changed() AND (! $this->save($ao))) + $ao->reload()->values($this->request->post()); + } + + if ($ao->loaded()) { + $co = Company::instance(); + + // Send our email with the token + $email = Email::factory('login_activate') + ->set('SITE',URL::base(TRUE,TRUE)) + ->set('SITE_ADMIN',$co->admin()->name()) + ->set('CODE',$ao->activate_code()) + ->set('EMAIL',$ao->email) + ->set('ID',$ao->id) + ->set('USER_NAME',$ao->name()); + + $email->to = array('email'=>array($ao->email=>$ao->name())); + $email->from = array('email'=>array($co->admin()->email=>$co->admin()->name())); + $email->subject = 'Please activate your account for '.$co->name(); + $email->deliver(); + + SystemMessage::factory() + ->title(_('Account Registered')) + ->type('info') + ->body(_('Please check your email for more instructions!')); + + Session::instance()->set('activate',$ao); + HTTP::redirect('login/activate/'.$ao->id); + } + + Block::factory() + ->type('form-horizontal') + ->title('Register Account') + ->title_icon('fa-edit') + ->body(View::factory('account/user/edit')->set('o',$ao)); + } +} +?> diff --git a/classes/lnAuth/Controller/TemplateDefault.php b/classes/lnAuth/Controller/TemplateDefault.php index ce9cb36..f002df0 100644 --- a/classes/lnAuth/Controller/TemplateDefault.php +++ b/classes/lnAuth/Controller/TemplateDefault.php @@ -31,9 +31,7 @@ abstract class lnAuth_Controller_TemplateDefault extends lnApp_Controller_Templa die(); } - return (($this->auth_required !== FALSE && Auth::instance()->logged_in(NULL,get_class($this).'|'.__METHOD__) === FALSE) || - (is_array($this->secure_actions) && array_key_exists($this->request->action(),$this->secure_actions) && - ! Auth::instance()->logged_in($this->secure_actions[$this->request->action()],get_class($this).'|'.__METHOD__))); + return parent::_auth_required(); } public function before() { diff --git a/classes/lnAuth/Controller/User/Account.php b/classes/lnAuth/Controller/User/Account.php deleted file mode 100644 index fd13fa8..0000000 --- a/classes/lnAuth/Controller/User/Account.php +++ /dev/null @@ -1,105 +0,0 @@ -TRUE, - 'resetpassword'=>TRUE, - ); - - /** - * Enable User to Edit their Account Details - */ - public function action_edit() { - if ($_POST AND $this->ao->values($_POST)->changed() AND (! $this->save($this->ao))) - $this->ao->reload(); - - Block::factory() - ->title(sprintf('Account: %s',$this->ao->accnum())) - ->title_icon('fa-wrench') - ->type('form-horizontal') - ->body(View::factory('account/user/edit')->set('o',$this->ao)); - } - - public function action_resetpassword() { - if ($this->request->post()) { - $validation = Validation::factory($this->request->post()) - ->rule('password','not_empty') - ->rule('password','min_length',array(':value',6)) - ->rule('password_confirm','matches',array(':validation',':field','password')); - - // Store our new values - $this->ao->values($this->request->post()); - - if (! $validation->check()) - SystemMessage::factory() - ->title(_('Record NOT updated')) - ->type('error') - ->body(_('Your password didnt pass validation.')); - - // Run validation and save - elseif ($this->ao->changed()) - if ($this->ao->save()) { - SystemMessage::factory() - ->title('Record updated') - ->type('success') - ->body(_('Your account record has been updated.')); - - // Log the password reset - $this->ao->log('Password reset'); - - HTTP::redirect('login'); - } - } - -// Make this a default JS load - if (Kohana::$environment >= Kohana::TESTING OR Request::current()->secure()) - Script::factory() - ->type('src') - ->data('media/js/jquery/jquery.validate-1.11.1.min.js'); - else - Script::factory() - ->type('src') - ->data('http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'); - - Script::factory() - ->type('stdin') - ->data(' -$("#reset").validate({ - wrapper: "div", - errorElement: "span", - - rules: { - password_confirm: { - equalTo: "input[name=password]", - }, - }, - highlight: function(element) { - $(element).parents(".control-group").removeClass("success").addClass("error"); - }, - success: function(element) { - $(element).parents(".control-group").removeClass("error").addClass("success"); - }, - errorPlacement: function(error, element) { - error.appendTo(element.parents(".controls")); - } -}); - '); - - Block::factory() - ->title(sprintf('Password Reset: %s',$this->ao->accnum())) - ->title_icon('fa-cog') - ->id('reset') - ->type('form-horizontal') - ->body(View::factory('account/user/resetpassword')->set('o',$this->ao)); - } -} -?> diff --git a/classes/lnAuth/Menu.php b/classes/lnAuth/Menu.php index fcac33a..a2b3f3a 100644 --- a/classes/lnAuth/Menu.php +++ b/classes/lnAuth/Menu.php @@ -36,7 +36,7 @@ abstract class lnAuth_Menu extends lnApp_Menu { return $result; } - public static function items($type) { + public static function items($type,array $list=array()) { $result = array(); if (empty(URL::$method_directory[$type])) @@ -51,9 +51,6 @@ abstract class lnAuth_Menu extends lnApp_Menu { if (empty($result[$mmo->id])) $result[$mmo->id] = $mmo; - if ($type == 'user') - $result[0] = 'logout'; - return self::collapse($result); } diff --git a/classes/lnAuth/Model/Account.php b/classes/lnAuth/Model/Account.php index 96626b1..9840d8b 100644 --- a/classes/lnAuth/Model/Account.php +++ b/classes/lnAuth/Model/Account.php @@ -9,7 +9,7 @@ * @copyright (c) 2014 Deon George * @license http://dev.leenooks.net/license.html */ -abstract class lnAuth_Model_Account extends Model_Auth_UserDefault { +abstract class lnAuth_Model_Account extends lnApp_Model_Account { // Relationships protected $_has_many = array( 'user_tokens'=>array('model'=>'user_token'), @@ -17,28 +17,6 @@ abstract class lnAuth_Model_Account extends Model_Auth_UserDefault { 'group'=>array('through'=>'account_group'), ); - protected $_has_one = array( - 'country'=>array('foreign_key'=>'id'), - 'currency'=>array('foreign_key'=>'id'), - 'language'=>array('foreign_key'=>'id'), - ); - - protected $_display_filters = array( - 'date_orig'=>array( - array('Site::Date',array(':value')), - ), - 'date_last'=>array( - array('Site::Date',array(':value')), - ), - 'active'=>array( - array('StaticList_YesNo::get',array(':value',TRUE)), - ), - ); - - protected $_form = array('id'=>'id','value'=>'name(TRUE)'); - - protected $_save_message = TRUE; - public function rules() { return Arr::merge(parent::rules(),array( 'id'=>array( @@ -50,50 +28,10 @@ abstract class lnAuth_Model_Account extends Model_Auth_UserDefault { )); } - /** - * Our account number format - */ - public function accnum() { - return sprintf('%s-%04s',Company::instance()->site(TRUE),$this->id); - } - - public function activate_code() { - return md5(sprintf('%s-%s-%s-%s',$this->accnum(),$this->date_orig,$this->date_last,$this->email)); - } - public function activated() { return $this->has_any('group',ORM::factory('Group',array('name'=>'Registered Users'))->list_childgrps(TRUE)); } - /** - * Get the groups that an account belongs to - */ - public function groups() { - $result = array(); - - foreach ($this->group->where_active()->find_all() as $go) - foreach ($go->list_parentgrps(TRUE) as $cgo) - if (empty($result[$cgo->id])) - $result[$cgo->id] = $cgo; - - return $result; - } - - public function log($message) { - // Log a message for this account - $alo = ORM::factory('Account_Log'); - $alo->account_id = $this->id; - $alo->ip = Request::$client_ip; - $alo->details = $message; - $alo->save(); - - return $alo->saved(); - } - - public function isAdmin() { - return FALSE; - } - /** * This function will extract the available methods for this account * This is used both for menu options and method security @@ -116,49 +54,15 @@ abstract class lnAuth_Model_Account extends Model_Auth_UserDefault { } /** - * Return an account name + * Return a token valid for this user */ - public function name() { - return trim(sprintf('%s %s',$this->first_name,$this->last_name)); - } - - /** - * Search for accounts matching a term - */ - public function list_autocomplete($term,$index,$value,array $label,array $limit=array(),array $options=NULL) { - $ao = Auth::instance()->get_user(); - - $this->clear(); - $this->where_active(); - - // Build our where clause - // First Name, Last name - if (preg_match('/\ /',$term)) { - list($fn,$ln) = explode(' ',$term,2); - - $this->where_open() - ->where('first_name','like','%'.$fn.'%') - ->and_where('last_name','like','%'.$ln.'%') - ->where_close(); - - } elseif (is_numeric($term)) { - $this->where('id','like','%'.$term.'%'); - - } elseif (preg_match('/\@/',$term)) { - $this->where('email','like','%'.$term.'%'); - - } else { - $this->where_open() - ->or_where('first_name','like','%'.$term.'%') - ->or_where('last_name','like','%'.$term.'%') - ->or_where('email','like','%'.$term.'%') - ->where_close(); - } - - // Restrict results to authorised accounts - // @todo - - return parent::list_autocomplete($term,$index,$value,$label,$limit,$options); + public function token($token_expire,$module,$method,$uses) { + return ORM::factory('Module_Method_Token') + ->method(array($module,$method)) + ->account($this) + ->uses($uses) + ->expire(time()+$token_expire) + ->generate(); } } ?> diff --git a/classes/lnAuth/Model/Auth/UserDefault.php b/classes/lnAuth/Model/Auth/UserDefault.php deleted file mode 100644 index b3ab399..0000000 --- a/classes/lnAuth/Model/Auth/UserDefault.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - array('not_empty'), - array('min_length', array(':value', 4)), - array('max_length', array(':value', 127)), - array('email'), - ), - ); - } - - /** - * Complete our login - * - * For some database logins, we may not want to record the user last login - * details in the repository, so we just override that parent function - * here. - * - * We can also do some other post-login actions here. - */ - public function complete_login() { - return $this->log('Logged In'); - } - - abstract public function isAdmin(); -} -?> diff --git a/classes/lnAuth/Model/Group/Method.php b/classes/lnAuth/Model/Group/Method.php index 44dc1b1..2224323 100644 --- a/classes/lnAuth/Model/Group/Method.php +++ b/classes/lnAuth/Model/Group/Method.php @@ -3,7 +3,7 @@ /** * Application Module Method Model * - * @package lnAauth + * @package lnAuth * @category Models * @author Deon George * @copyright (c) 2014 Deon George diff --git a/config/auth.php b/config/auth.php deleted file mode 100644 index 5327678..0000000 --- a/config/auth.php +++ /dev/null @@ -1,17 +0,0 @@ - 'ORM', - 'hash_method' => 'md5', -); -?> diff --git a/config/config.php b/config/config.php index 0ca0cfd..d2e6169 100644 --- a/config/config.php +++ b/config/config.php @@ -3,6 +3,4 @@ return array ( 'method_security' => TRUE, // Enable User Based method security - 'session_change_trigger'=>array( // Updates to tables to make when our session ID is changed - ), ); diff --git a/views/account/user/edit.php b/views/account/user/edit.php deleted file mode 100644 index 6111f63..0000000 --- a/views/account/user/edit.php +++ /dev/null @@ -1,61 +0,0 @@ -
- Account Details - - date_last ? $o->display('date_last') : Site::date(time()),array('label'=>'Last Updated','class'=>'col-md-2','disabled')); ?> - - display('email'),array('label'=>'Email','class'=>'col-md-3','placeholder'=>'Email Address','type'=>'email','required','data-error'=>'Invalid EMAIL address')); ?> - -
- -
-
- display('title'),array('class'=>'form-control','required','nocg'=>TRUE)); ?> -
-
- display('first_name'),array('class'=>'form-control col-md-2','placeholder'=>'First Name','required','nocg'=>TRUE)); ?> -
-
- display('last_name'),array('class'=>'form-control col-md-2','placeholder'=>'Last Name','required','nocg'=>TRUE)); ?> -
-
-
- -
- - display('address1'),array('class'=>'col-md-6','placeholder'=>'Address Line 1','required')); ?> - - - display('address2'),array('class'=>'col-md-6','placeholder'=>'Address Line 2')); ?> - - -
-
- display('city'),array('label'=>'City','placeholder'=>'City','required','nocg'=>TRUE)); ?> -
- -
- display('state'),array('label'=>'','class'=>'input-mini','placeholder'=>'State','required','nocg'=>TRUE)); ?> -
- -
- display('zip'),array('label'=>'','class'=>'input-mini','placeholder'=>'Post Code','required','nocg'=>TRUE)); ?> -
-
-
- -
- -
- list_select(),$o->country_id,array('class'=>'form-control','required','nocg'=>TRUE)); ?> -
-
- - language()); ?> -
- -
-
- - -
-
diff --git a/views/account/user/resetpassword.php b/views/account/user/resetpassword.php deleted file mode 100644 index 46071f0..0000000 --- a/views/account/user/resetpassword.php +++ /dev/null @@ -1,14 +0,0 @@ -
-
- Reset Password - - 'Password','type'=>'password','required','minlength'=>8)); ?> - 'Confirm','type'=>'password','required','minlength'=>8)); ?> -
- -
-
- -
-
-
diff --git a/views/login/activate.php b/views/login/activate.php deleted file mode 100644 index 6481376..0000000 --- a/views/login/activate.php +++ /dev/null @@ -1,30 +0,0 @@ -
- Activate Account - -
-

You should have received an email with a pass code. Please enter that pass code here.

- - loaded()) : ?> - - - -
- - -
- - -
- - -
- Need to it? -
-
- -
-
- - -
-
diff --git a/views/login/activate_resend.php b/views/login/activate_resend.php deleted file mode 100644 index 36742d9..0000000 --- a/views/login/activate_resend.php +++ /dev/null @@ -1,19 +0,0 @@ -
- Send Activation Code - -
-
-
- - -
-
-
-
- -
-
- - -
-
diff --git a/views/login/reset.php b/views/login/reset.php deleted file mode 100644 index b34612d..0000000 --- a/views/login/reset.php +++ /dev/null @@ -1,31 +0,0 @@ -
-
-
-
-
-
-
Reset Password
-
- -
-

If you have forgotten your password, we can issue you a temporary access code via email that will allow you to change your password.

- -
-

To start this process, please enter your Username. If you dont know your Username, please contact us.

- -
- - -
-
- -
-
- -
-
-
-
-
-
-
diff --git a/views/login/reset_sent.php b/views/login/reset_sent.php deleted file mode 100644 index 7d31a98..0000000 --- a/views/login/reset_sent.php +++ /dev/null @@ -1,29 +0,0 @@ -
-
-
-
-
-
-
Reset Password
-
- -
-
-

You should have received an email with a pass code. Please enter that pass code here.

- -
- - -
-
- -
-
- -
-
-
-
-
-
-
diff --git a/views/module/method/admin/add.php b/views/module/method/admin/add.php new file mode 100644 index 0000000..71110e6 --- /dev/null +++ b/views/module/method/admin/add.php @@ -0,0 +1,16 @@ +
+
+ Add Method + + 'Method','disabled','divclass'=>'col-sm-5')); ?> + 'Description','placeholder'=>'Method Description','divclass'=>'col-sm-7')); ?> + 'Menu Title','placeholder'=>'Menu Title','divclass'=>'col-sm-7')); ?> +
+ +
+
+ + +
+
+
diff --git a/views/module/method/admin/edit.php b/views/module/method/admin/edit.php new file mode 100644 index 0000000..e7a6899 --- /dev/null +++ b/views/module/method/admin/edit.php @@ -0,0 +1,41 @@ +
+
+ Method Details + + notes,array('label'=>'Desc','placeholder'=>'Method Description','divclass'=>'col-md-9')); ?> + menu_display,array('label'=>'Title','placeholder'=>'Menu Title','divclass'=>'col-md-9')); ?> +
+
+ +
+
+ Method Security + + + + + + + + + + + find_all() as $go) : ?> + + + + + + + + +
MethodNotesGroup ActiveMethod Enable
id,TRUE),$go->display('name')); ?>display('notes'); ?>display('active'); ?>id,$o->has('group',$go),array('nocg'=>TRUE)); ?>
+
+ +
+
+ + +
+
+