Theme work with focusbusiness and baseadmin

Improvements to NAVBAR, updates to StaticList methods, other minor items
Enable product category rendering and other minor improvements
Added ADSL-large category price plan
This commit is contained in:
Deon George
2013-04-26 11:42:09 +10:00
parent eeb8d61237
commit 04ebda2aaa
114 changed files with 1732 additions and 6797 deletions

View File

@@ -25,34 +25,34 @@ class Controller_User_Account extends Controller_Account {
// Run validation and save
if ($this->ao->changed())
if ($this->ao->check()) {
SystemMessage::add(array(
'title'=>_('Record updated'),
'type'=>'info',
'body'=>_('Your account record has been updated.')
));
SystemMessage::factory()
->title('Record updated')
->type('success')
->body(_('Your account record has been updated.'));
$this->ao->save();
} else {
$output = '';
// @todo Need to check that this still works with the new bootstrap theming
foreach ($this->ao->validation()->errors('forms/login') as $field => $error)
$output .= sprintf('<li><b>%s</b> %s</li>',$field,$error);
if ($output)
$output = sprintf('<ul>%s</ul>',$output);
SystemMessage::add(array(
'title'=>_('Record NOT updated'),
'type'=>'error',
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output,
));
SystemMessage::factory()
->title(_('Record NOT updated'))
->type('error')
->body(_('Your updates didnt pass validation.').'<br/>'.$output);
}
Block::add(array(
'title'=>sprintf('%s: %s - %s',_('Account Edit'),$this->ao->accnum(),$this->ao->name(TRUE)),
'body'=>View::factory($this->viewpath())
->set('record',$this->ao),
));
Block::factory()
->title(sprintf('Account: %s',$this->ao->accnum()))
->title_icon('icon-wrench')
->type('form-horizontal')
->body(View::factory('account/user/edit')->set('o',$this->ao));
}
public function action_resetpassword() {
@@ -66,11 +66,10 @@ class Controller_User_Account extends Controller_Account {
// Run validation and save
if ($this->ao->changed())
if ($this->ao->check()) {
SystemMessage::add(array(
'title'=>_('Record updated'),
'type'=>'info',
'body'=>_('Your account record has been updated.')
));
SystemMessage::factory()
->title('Record updated')
->type('success')
->body(_('Your account record has been updated.'));
$this->ao->save();
@@ -80,25 +79,27 @@ class Controller_User_Account extends Controller_Account {
HTTP::redirect('login');
} else {
// @todo Need to check that this still works with the new bootstrap theming
$output = '';
foreach ($this->ao->validation()->errors('forms/login') as $field => $error)
$output .= sprintf('<li><b>%s</b> %s</li>',$field,$error);
if ($output)
$output = sprintf('<ul>%s</ul>',$output);
SystemMessage::add(array(
'title'=>_('Record NOT updated'),
'type'=>'error',
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output,
));
SystemMessage::factory()
->title(_('Record NOT updated'))
->type('error')
->body(_('Your updates didnt pass validation.').'<br/>'.$output);
}
Block::add(array(
'title'=>_('Password Reset'),
'body'=>View::factory($this->viewpath())
->set('record',$this->ao),
));
// @todo To add JS password validation (minimum length and both values equal)
Block::factory()
->title(sprintf('Password Reset: %s',$this->ao->accnum()))
->title_icon('icon-cog')
->type('form-horizontal')
->body(View::factory('account/user/resetpassword')->set('o',$this->ao));
}
}
?>