From 373bf9ec3ffc86359efe40dc1042c368191f2b21 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 2 Oct 2005 18:58:24 +0000 Subject: [PATCH] r474: Updating custom fields to work with the
system --- showreport.php | 15 +++------------ templates/bugfield_input_checkbox.tpl | 6 ++++-- templates/bugfield_input_text.tpl | 6 ++++-- templates/bugfield_select_single.tpl | 6 ++++-- templates/bugfield_static_text.tpl | 6 ++++-- templates/customfield_bit.tpl | 7 ------- templates/showreport.tpl | 23 +++++------------------ 7 files changed, 24 insertions(+), 45 deletions(-) delete mode 100644 templates/customfield_bit.tpl diff --git a/showreport.php b/showreport.php index 1f63d99..a52665e 100644 --- a/showreport.php +++ b/showreport.php @@ -16,7 +16,6 @@ $fetchtemplates = array( 'showreport_comment', 'quicksearch', 'pcv_select_row', - 'customfield_bit', 'bugfield_static_text' ); @@ -197,31 +196,23 @@ else $fields = construct_custom_fields($bug); $show['customfields'] = ($fields ? true : false); -$bugsys->debug(count($fields) % 2); +$bugsys->debug('fields modulo: ' . count($fields) % 2); $i = 1; foreach ($fields AS $field) { $bugsys->debug("i = $i"); if ($i == 1) { - $left = $field; + $customfields['right'] .= $field; } else if ($i == 2) { - $right = $field; - eval('$customfields .= "' . $template->fetch('customfield_bit') . '";'); + $customfields['left'] .= $field; $i = 0; } $i++; } -if ((count($fields) % 2) != 0) -{ - $bugsys->debug('no modulo for you'); - $right = ''; - eval('$customfields .= "' . $template->fetch('customfield_bit') . '";'); -} - // ################################################################### // other elements diff --git a/templates/bugfield_input_checkbox.tpl b/templates/bugfield_input_checkbox.tpl index 856f4d6..43df667 100644 --- a/templates/bugfield_input_checkbox.tpl +++ b/templates/bugfield_input_checkbox.tpl @@ -1,4 +1,6 @@ - $field[name] - custom[$field[fieldid]]field$field[fieldid]" type="checkbox" value="1"$selected /> +
+ $field[name] +
custom[$field[fieldid]]field$field[fieldid]" type="checkbox" value="1"$selected />
+
\ No newline at end of file diff --git a/templates/bugfield_input_text.tpl b/templates/bugfield_input_text.tpl index ea4e601..c7e6a8b 100644 --- a/templates/bugfield_input_text.tpl +++ b/templates/bugfield_input_text.tpl @@ -1,4 +1,6 @@ - $field[name] - custom[$field[fieldid]]field$field[fieldid]" type="text" value="$value" size="35"maxlength="$field[maxlength] /> +
+ $field[name] +
custom[$field[fieldid]]field$field[fieldid]" type="text" value="$value" size="35"maxlength="$field[maxlength] />
+
diff --git a/templates/bugfield_select_single.tpl b/templates/bugfield_select_single.tpl index 4b39074..aec2751 100644 --- a/templates/bugfield_select_single.tpl +++ b/templates/bugfield_select_single.tpl @@ -1,4 +1,6 @@ - $field[name] - +
+ $field[name] +
+
\ No newline at end of file diff --git a/templates/bugfield_static_text.tpl b/templates/bugfield_static_text.tpl index 47aac79..6f88e54 100644 --- a/templates/bugfield_static_text.tpl +++ b/templates/bugfield_static_text.tpl @@ -1,4 +1,6 @@ - $field[name] - $field[value] +
+ $field[name] +
$field[value]
+
diff --git a/templates/customfield_bit.tpl b/templates/customfield_bit.tpl deleted file mode 100644 index 9034c8b..0000000 --- a/templates/customfield_bit.tpl +++ /dev/null @@ -1,7 +0,0 @@ - -$left - -$right -   - - diff --git a/templates/showreport.tpl b/templates/showreport.tpl index f0e9cc1..22a49be 100644 --- a/templates/showreport.tpl +++ b/templates/showreport.tpl @@ -86,7 +86,9 @@ $header
- + + $customfields[left] + @@ -170,28 +172,13 @@ $header - + + $customfields[right] - - - - - - - - $customfields - - - - - - - -
24" style="vertical-align: top"> -- 2.22.5