Updated OSB to work with KH 3.1
This commit is contained in:
@@ -39,21 +39,21 @@ class Controller_User_Account extends Controller_TemplateDefault {
|
||||
));
|
||||
|
||||
$ao->save();
|
||||
Request::instance()->redirect('login');
|
||||
Request::current()->redirect('login');
|
||||
|
||||
} else {
|
||||
$output = '';
|
||||
foreach ($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.')
|
||||
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output,
|
||||
));
|
||||
|
||||
foreach ($ao->validate()->errors('form_errors') as $field => $error)
|
||||
SystemMessage::add(array(
|
||||
'title'=>$field,
|
||||
'type'=>'error',
|
||||
'body'=>$error,
|
||||
));
|
||||
}
|
||||
|
||||
Block::add(array(
|
||||
@@ -61,8 +61,6 @@ class Controller_User_Account extends Controller_TemplateDefault {
|
||||
'body'=>View::factory('account/password_reset')
|
||||
->set('record',$ao),
|
||||
));
|
||||
|
||||
$this->template->content = Block::factory();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,18 +87,18 @@ class Controller_User_Account extends Controller_TemplateDefault {
|
||||
$ao->save();
|
||||
|
||||
} else {
|
||||
$output = '';
|
||||
foreach ($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.')
|
||||
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output,
|
||||
));
|
||||
|
||||
foreach ($ao->validate()->errors('form_errors') as $field => $error)
|
||||
SystemMessage::add(array(
|
||||
'title'=>$field,
|
||||
'type'=>'error',
|
||||
'body'=>$error,
|
||||
));
|
||||
}
|
||||
|
||||
Block::add(array(
|
||||
@@ -108,8 +106,6 @@ class Controller_User_Account extends Controller_TemplateDefault {
|
||||
'body'=>View::factory('account/edit')
|
||||
->set('record',$ao),
|
||||
));
|
||||
|
||||
$this->template->content = Block::factory();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user