mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Fix selection and display of extra fields in prefs and index
This commit is contained in:
parent
9bf3a84693
commit
74d54f6c6e
@ -81,7 +81,7 @@
|
||||
"d_email_work" => "", //yn
|
||||
"d_email_home" => "", //yn
|
||||
"bday" => "birthday",
|
||||
"url" => "URL",
|
||||
"url" => "url",
|
||||
//"access" => "access"
|
||||
);
|
||||
|
||||
|
@ -28,9 +28,19 @@
|
||||
"addressbook_footer" => "footer.tpl" ));
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
$extrafields = array(
|
||||
"pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes"
|
||||
);
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
|
||||
// create column list and the top row of the table based on user prefs
|
||||
while ($column = each($this->stock_contact_fields)) {
|
||||
while ($column = each($qfields)) {
|
||||
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) &&
|
||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
|
||||
$showcol = display_name($column[0]);
|
||||
@ -57,7 +67,9 @@
|
||||
// following sets up the filter for read, then restores the filter string for later checking
|
||||
if ($filter == "none") { $filter = ""; }
|
||||
$savefilter = $filter;
|
||||
if ($filter != "" ) { $filter = "access=$filter"; }
|
||||
// Set filter to display entries where tid is blank, else they may be accounts, etc.
|
||||
if ($filter != "" ) { $filter = "tid="; }
|
||||
//if ($filter != "" ) { $filter = "access=$filter"; }
|
||||
|
||||
$qfilter = $filter;
|
||||
$filter = $savefilter;
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
$extrafields = array(
|
||||
"pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes"
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes"
|
||||
);
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
}
|
||||
if (! $totalerrors) {
|
||||
$phpgw->preferences->read_repository();
|
||||
while (list($pref[0]) = each($this->stock_contact_fields)) {
|
||||
while (list($pref[0]) = each($qfields)) {
|
||||
if ($ab_selected["$pref[0]"]) {
|
||||
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user