summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-20 23:47:28 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-20 23:47:28 +0545
commitf6014228679d653b32043974671dfcc9ec8e3fc0 (patch)
tree3965468a974f54926e0e2658f35450d2bf7cd040 /usr/local/www/pkg_edit.php
parente5db68d2798d00d64835089b5a0217c9402c39dc (diff)
downloadpfsense-f6014228679d653b32043974671dfcc9ec8e3fc0.zip
pfsense-f6014228679d653b32043974671dfcc9ec8e3fc0.tar.gz
More combinedfields and usecolspan2 fixes
Actually the "tr" tag needs to be a single tag-pair that encloses all of the set of fields with combinedfields specified - combinedfields=begin is where the "tr" tag starts and combinedfields=end is where the "tr" tag ends, enclosing a whole set of combined fields. That allows usecolspan2 to work. In the previous change I had made it enclose every field in its own "tr" tag-pair That caused usecolspan2 to be ineffective at spreading the combined fields across the display. Also colspan needs to be initialised each time around the loop - it was getting applied to all fields further down the page after the first one it was used in. This is the version for 2.2.*
Diffstat (limited to 'usr/local/www/pkg_edit.php')
-rw-r--r--usr/local/www/pkg_edit.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index cf27668..0d7c3cd 100644
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -469,9 +469,12 @@ if ($pkg['tabs'] <> "") {
}
$size = "";
+ $colspan="";
if (isset($pkga['dontdisplayname'])){
$input="";
- if ($pkga['combinefields'] != "begin")
+ // We do not want a separate tr tag pair for each field in a set of combined fields.
+ // The case of putting the first tr tag at the beginning of a combine-fields set is already handled above.
+ if (!isset($pkga['combinefields']))
$input .= "<tr valign='top' id='tr_{$pkga['fieldname']}'>";
if(isset($pkga['usecolspan2']))
$colspan="colspan='2'";
@@ -489,7 +492,9 @@ if ($pkg['tabs'] <> "") {
if (isset($pkga['required']))
$req = 'req';
$input="";
- if ($pkga['combinefields'] != "begin") {
+ // We do not want a separate tr tag pair for each field in a set of combined fields.
+ // The case of putting the first tr tag at the beginning of a combine-fields set is already handled above.
+ if (!isset($pkga['combinefields'])) {
$input .= "<tr>";
}
$input .= "<td valign='top' width=\"22%\" class=\"vncell{$req}\">";
@@ -903,13 +908,16 @@ if ($pkg['tabs'] <> "") {
#check typehint value
if($pkga['typehint'])
echo " " . $pkga['typehint'];
- $input = "</td></tr>";
#check combinefields options
if (isset($pkga['combinefields'])){
+ // At the end of each combined-fields field we just want to end a td tag.
+ $input = "</td>";
+ // The tr tag and... ends are only used to end the whole set of combined fields.
if ($pkga['combinefields']=="end")
- $input.="</table></td></tr>";
+ $input.="</tr></table></td></tr>";
}
else{
+ $input = "</td></tr>";
if($pkga['usecolspan2'])
$input.= "</tr><br />";
}
OpenPOWER on IntegriCloud