bug in phpgw_header wasnt calling the msgbox, and also seperate msgbox_row block for more control over good and bad rows

This commit is contained in:
seek3r 2002-05-24 20:47:28 +00:00
parent 88f19d299d
commit c74e97e907
2 changed files with 22 additions and 27 deletions

View File

@ -984,7 +984,8 @@
return; return;
} }
$GLOBALS['phpgw']->template->set_block('common','msgbox_start'); $GLOBALS['phpgw']->template->set_block('common','msgbox_start');
$GLOBALS['phpgw']->template->set_block('common','msgbox_row'); $GLOBALS['phpgw']->template->set_block('common','msgbox_row_good');
$GLOBALS['phpgw']->template->set_block('common','msgbox_row_bad');
$GLOBALS['phpgw']->template->set_block('common','msgbox_end'); $GLOBALS['phpgw']->template->set_block('common','msgbox_end');
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_start'); $GLOBALS['phpgw']->template->fp('msgbox','msgbox_start');
@ -994,16 +995,6 @@
$row = 1; $row = 1;
while (list($key,$value) = each($text)) while (list($key,$value) = each($text))
{ {
if ($value == True)
{
$type_img = 'good';
$type_img_alt = 'O';
}
else
{
$type_img = 'bad';
$type_img_alt = 'X';
}
if ($row == 1) if ($row == 1)
{ {
$GLOBALS['phpgw']->template->set_var('msgbox_row_color',$GLOBALS['phpgw_info']['theme']['row_on']); $GLOBALS['phpgw']->template->set_var('msgbox_row_color',$GLOBALS['phpgw_info']['theme']['row_on']);
@ -1016,28 +1007,28 @@
} }
$GLOBALS['phpgw']->template->set_var('msgbox_text',$key); $GLOBALS['phpgw']->template->set_var('msgbox_text',$key);
$GLOBALS['phpgw']->template->set_var('msgbox_img',$type_img); if ($value == True)
$GLOBALS['phpgw']->template->set_var('msgbox_img_alt',$type_img_alt); {
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_row',True); $GLOBALS['phpgw']->template->fp('msgbox','msgbox_row_good',True);
}
else
{
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_row_bad',True);
}
} }
} }
else else
{ {
if ($type == True)
{
$type_img = 'good';
$type_img_alt = 'O';
}
else
{
$type_img = 'bad';
$type_img_alt = 'X';
}
$GLOBALS['phpgw']->template->set_var('msgbox_row_color',$GLOBALS['phpgw_info']['theme']['row_on']); $GLOBALS['phpgw']->template->set_var('msgbox_row_color',$GLOBALS['phpgw_info']['theme']['row_on']);
$GLOBALS['phpgw']->template->set_var('msgbox_text',$text); $GLOBALS['phpgw']->template->set_var('msgbox_text',$text);
$GLOBALS['phpgw']->template->set_var('msgbox_img',$type_img); if ($type == True)
$GLOBALS['phpgw']->template->set_var('msgbox_img_alt',$type_img_alt); {
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_row',True); $GLOBALS['phpgw']->template->fp('msgbox','msgbox_row_good',True);
}
else
{
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_row_bad',True);
}
} }
$GLOBALS['phpgw']->template->fp('msgbox','msgbox_end',True); $GLOBALS['phpgw']->template->fp('msgbox','msgbox_end',True);
@ -1186,7 +1177,7 @@
//} //}
if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && !@$GLOBALS['phpgw_info']['flags']['nonavbar']) if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && !@$GLOBALS['phpgw_info']['flags']['nonavbar'])
{ {
$GLOBALS['phpgw_info']['flags']['msgbox_data']['Access not permitted']=False; $this->msgbox('',False,'out');
$GLOBALS['phpgw']->hooks->process('after_navbar'); $GLOBALS['phpgw']->hooks->process('after_navbar');
} }
} }

View File

@ -10,9 +10,13 @@
<CENTER><TABLE border=1 bgcolor="{row_on}"> <CENTER><TABLE border=1 bgcolor="{row_on}">
<!-- END msgbox_start --> <!-- END msgbox_start -->
<!-- BEGIN msgbox_row --> <!-- BEGIN msgbox_row_good -->
<TR><TD bgcolor="{msgbox_row_color}">[{msgbox_img_alt}] {msgbox_text}</TD></TR> <TR><TD bgcolor="{msgbox_row_color}">[<font color="green">O</font>] {msgbox_text}</TD></TR>
<!-- END msgbox_row --> <!-- END msgbox_row_good -->
<!-- BEGIN msgbox_row_bad -->
<TR><TD bgcolor="{msgbox_row_color}">[<font color="red">X</font>] {msgbox_text}</TD></TR>
<!-- END msgbox_row_bad -->
<!-- BEGIN msgbox_end --> <!-- BEGIN msgbox_end -->
</TABLE></CENTER> </TABLE></CENTER>