mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Cleanup display, and include addressbook's custom fields
This commit is contained in:
parent
767c0362a9
commit
142624d6c5
@ -22,6 +22,16 @@
|
|||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
$this = CreateObject("phpgwapi.contacts");
|
$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;
|
||||||
|
|
||||||
if ($submit) {
|
if ($submit) {
|
||||||
$totalerrors = 0;
|
$totalerrors = 0;
|
||||||
@ -68,13 +78,15 @@
|
|||||||
$i = 0; $j = 0;
|
$i = 0; $j = 0;
|
||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||||
while (list($col, $descr) = each($this->stock_contact_fields)) {
|
while (list($col, $descr) = each($qfields)) {
|
||||||
// echo "<br>test: $col - $i $j - " . count($abc);
|
// echo "<br>test: $col - $i $j - " . count($abc);
|
||||||
$i++; $j++;
|
$i++; $j++;
|
||||||
$showcol = display_name($descr);
|
$showcol = display_name($descr);
|
||||||
if ($showcol) {
|
// yank the *'s prior to testing for a valid column description
|
||||||
|
$coltest = ereg_replace("\*","",$showcol);
|
||||||
|
if ($coltest) {
|
||||||
echo "\t<td><input type=\"checkbox\" name=\"ab_selected[" . $col . "]\" value=\"True\""
|
echo "\t<td><input type=\"checkbox\" name=\"ab_selected[" . $col . "]\" value=\"True\""
|
||||||
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($showcol)
|
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . $showcol
|
||||||
. "</option></td>\n";
|
. "</option></td>\n";
|
||||||
} else {
|
} else {
|
||||||
$i--;
|
$i--;
|
||||||
@ -84,11 +96,11 @@
|
|||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$i = 0;
|
$i = 0;
|
||||||
}
|
}
|
||||||
if ($i == 0 && $showcol) {
|
if ($i == 0 && $coltest) {
|
||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||||
}
|
}
|
||||||
if ($j == count($this->stock_contact_fields)) {
|
if ($j == count($qfields)) {
|
||||||
if ($i == 1) {
|
if ($i == 1) {
|
||||||
echo "\t<td> </td><td> </td>\n";
|
echo "\t<td> </td><td> </td>\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user