forked from extern/egroupware
using egw_framework::message() for error or success messages
This commit is contained in:
parent
81e91019eb
commit
c27b4a5add
@ -81,10 +81,6 @@ class uiconfig
|
|||||||
|
|
||||||
// fix header templates missing essential parts like display of validation errors
|
// fix header templates missing essential parts like display of validation errors
|
||||||
$header = $t->get_var('header');
|
$header = $t->get_var('header');
|
||||||
if (strpos($header, '{error}') === false)
|
|
||||||
{
|
|
||||||
$header = '<p style="text-align: center; color: red; font-weight: bold;">{error}</p>'."\n".$header;
|
|
||||||
}
|
|
||||||
if (strpos($header, '{hidden_vars}') === false)
|
if (strpos($header, '{hidden_vars}') === false)
|
||||||
{
|
{
|
||||||
if (strpos($header, '<table'))
|
if (strpos($header, '<table'))
|
||||||
@ -153,21 +149,21 @@ class uiconfig
|
|||||||
|
|
||||||
if(!$errors && !$_POST['apply'])
|
if(!$errors && !$_POST['apply'])
|
||||||
{
|
{
|
||||||
|
egw_framework::message(lang('Configuration saved.'), 'success');
|
||||||
egw::redirect_link($referer);
|
egw::redirect_link($referer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$t->set_var('error','');
|
||||||
if($errors)
|
if($errors)
|
||||||
{
|
{
|
||||||
$t->set_var('error',lang('Error') . ': ' . $errors);
|
egw_framework::message(lang('Error') . ': ' . $errors, 'error');
|
||||||
$t->set_var('th_err','#FF8888');
|
|
||||||
unset($errors);
|
unset($errors);
|
||||||
unset($GLOBALS['config_error']);
|
unset($GLOBALS['config_error']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$t->set_var('error','');
|
egw_framework::message(lang('Configuration saved.'), 'success');
|
||||||
$t->set_var('th_err',$GLOBALS['egw_info']['theme']['th_bg']);
|
|
||||||
}
|
}
|
||||||
$t->set_var('title',lang('Site Configuration'));
|
$t->set_var('title',lang('Site Configuration'));
|
||||||
$t->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname));
|
$t->set_var('action_url',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname));
|
||||||
@ -264,6 +260,9 @@ class uiconfig
|
|||||||
html::submit_button('apply', 'Apply')));
|
html::submit_button('apply', 'Apply')));
|
||||||
$t->set_var('cancel', html::submit_button('cancel', 'Cancel').'</div>');
|
$t->set_var('cancel', html::submit_button('cancel', 'Cancel').'</div>');
|
||||||
|
|
||||||
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('Site configuration').
|
||||||
|
($appname != 'admin' ? ': '.lang($appname) : '');
|
||||||
|
|
||||||
// render the page
|
// render the page
|
||||||
$GLOBALS['egw']->framework->render(
|
$GLOBALS['egw']->framework->render(
|
||||||
'<div id="admin-config-'.$appname.'" class="admin-config">'.
|
'<div id="admin-config-'.$appname.'" class="admin-config">'.
|
||||||
|
Loading…
Reference in New Issue
Block a user