mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
fix header templates missing essential parts like display of validation errors
This commit is contained in:
parent
ed9513e846
commit
76e9d68121
@ -76,6 +76,27 @@ class uiconfig
|
||||
$t->set_unknowns('keep');
|
||||
$t->set_file(array('config' => 'config.tpl'));
|
||||
$t->set_block('config','header','header');
|
||||
|
||||
// fix header templates missing essential parts like display of validation errors
|
||||
$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, '<table'))
|
||||
{
|
||||
list($header, $table) = explode('<table', $header);
|
||||
$header .= "{hidden_vars}\n<table".$table;
|
||||
}
|
||||
else
|
||||
{
|
||||
$header .= "{hidden_vars}\n";
|
||||
}
|
||||
}
|
||||
$t->set_var('header', $header);
|
||||
|
||||
$t->set_block('config','body','body');
|
||||
$t->set_block('config','footer','footer');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user