mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 19:19:43 +01:00
cleanup field editing
This commit is contained in:
parent
7ef9e171fb
commit
927ddfdd2b
@ -29,6 +29,7 @@
|
||||
$field = ereg_replace(' ','_',$field);
|
||||
$ofield = ereg_replace(' ','_',$ofield);
|
||||
|
||||
$t->set_var('title',lang('addressbook').' '.lang('custom fields'));
|
||||
$t->set_var('font',$font);
|
||||
$t->set_var('note',$note);
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
|
@ -30,7 +30,8 @@
|
||||
"row" => "custom_field_list_row.tpl"
|
||||
));
|
||||
|
||||
$phpgw->template->set_var("message",$message);
|
||||
$phpgw->template->set_var("title",lang('addressbook').' '.lang('custom fields'));
|
||||
$phpgw->template->set_var("message",'');
|
||||
$phpgw->template->set_var("sort_name",lang("Name"));
|
||||
$phpgw->template->set_var("lang_edit",lang("Edit"));
|
||||
$phpgw->template->set_var("lang_delete",lang("Delete"));
|
||||
@ -38,20 +39,26 @@
|
||||
|
||||
$phpgw->preferences->read_repository();
|
||||
|
||||
while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"])) {
|
||||
if ( substr($col,0,6) == 'extra_' ) {
|
||||
while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"]))
|
||||
{
|
||||
if ( substr($col,0,6) == 'extra_' )
|
||||
{
|
||||
$fields[$i] = ereg_replace('extra_','',$col);
|
||||
$fields[$i] = ereg_replace(' ','_',$fields[$i]);
|
||||
echo "<br>".$i.": '".$fields[$i]."'";
|
||||
} else {
|
||||
//echo "<br>".$i.": '".$fields[$i]."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields[$i] = '';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
reset($fields);
|
||||
for($i=0;$i<count($fields);$i++) {
|
||||
if ($fields[$i]) {
|
||||
for($i=0;$i<count($fields);$i++)
|
||||
{
|
||||
if ($fields[$i])
|
||||
{
|
||||
$found = True;
|
||||
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
||||
|
||||
@ -70,7 +77,8 @@
|
||||
$phpgw->template->parse("rows","row",True);
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
if (!$found)
|
||||
{
|
||||
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
||||
$phpgw->template->set_var("field_name",' ');
|
||||
$phpgw->template->set_var("field_edit",' ');
|
||||
@ -82,7 +90,6 @@
|
||||
. $phpgw->link("/addressbook/field_edit.php","method=add")
|
||||
. '">' . lang("Add") . '</a>');
|
||||
|
||||
$phpgw->template->pparse("out","row");
|
||||
$phpgw->template->pparse("out","body");
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
<br>
|
||||
<center>{title}</center><p>
|
||||
<center>{message}</center><p>
|
||||
<table border="0" align="center" width="60%">
|
||||
<tr bgcolor="{th_bg}">
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!-- BEGIN form -->
|
||||
<br><br>
|
||||
<center>
|
||||
{title}<br>
|
||||
{message}<br>
|
||||
<form action="{actionurl}" method="POST">
|
||||
{hidden_vars}
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
<br>
|
||||
<center>{title}</center><p>
|
||||
<center>{message}</center><p>
|
||||
<table border="0" align="center" width="60%">
|
||||
<tr bgcolor="{th_bg}">
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!-- BEGIN form -->
|
||||
<br><br>
|
||||
<center>
|
||||
{title}<br>
|
||||
{message}<br>
|
||||
<form action="{actionurl}" method="POST">
|
||||
{hidden_vars}
|
||||
|
Loading…
Reference in New Issue
Block a user