summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-22 16:53:59 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-22 16:53:59 -0300
commit5a0d15b11775017b4f3b3d1c6d2e7a893c3badfb (patch)
tree67f112e4c2d1de8bffff7cd44d6054f917670b5c
parent826e152485622f1235daeb2bf014cef77aa7e877 (diff)
parentbec3f9253fa3e2c8f6004aebb8630e0b78bbfbcb (diff)
downloadpfsense-5a0d15b11775017b4f3b3d1c6d2e7a893c3badfb.zip
pfsense-5a0d15b11775017b4f3b3d1c6d2e7a893c3badfb.tar.gz
Merge pull request #1672 from phil-davis/patch-1
-rw-r--r--usr/local/www/pkg_edit.php33
1 files changed, 23 insertions, 10 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 0d7c3cd..ad56f5a 100644
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -472,10 +472,14 @@ if ($pkg['tabs'] <> "") {
$colspan="";
if (isset($pkga['dontdisplayname'])){
$input="";
- // 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']))
+ // If this is in a set of combined fields and;
+ // - it is a "begin" (case already handled above) or
+ // - usecolspan2 is in effect (so we want to spread all the combined fields horizontally)
+ // then we do not want this "tr" to be inserted.
+ // Thus only insert the "tr" if the not (!) of the above condition.
+ if (!((isset($pkga['combinefields'])) && (($pkga['combinefields'] == "begin") || (isset($pkga['usecolspan2']))))) {
$input .= "<tr valign='top' id='tr_{$pkga['fieldname']}'>";
+ }
if(isset($pkga['usecolspan2']))
$colspan="colspan='2'";
else
@@ -492,9 +496,12 @@ if ($pkg['tabs'] <> "") {
if (isset($pkga['required']))
$req = 'req';
$input="";
- // 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'])) {
+ // If this is in a set of combined fields and;
+ // - it is a "begin" (case already handled above) or
+ // - usecolspan2 is in effect (so we want to spread all the combined fields horizontally)
+ // then we do not want this "tr" to be inserted.
+ // Thus only insert the "tr" if the not (!) of the above condition.
+ if (!((isset($pkga['combinefields'])) && (($pkga['combinefields'] == "begin") || (isset($pkga['usecolspan2']))))) {
$input .= "<tr>";
}
$input .= "<td valign='top' width=\"22%\" class=\"vncell{$req}\">";
@@ -910,11 +917,17 @@ if ($pkg['tabs'] <> "") {
echo " " . $pkga['typehint'];
#check combinefields options
if (isset($pkga['combinefields'])){
- // At the end of each combined-fields field we just want to end a td tag.
+ // At the end of each combined-fields field we always 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.="</tr></table></td></tr>";
+ // The tr tag end is used to end the whole set of combined fields,
+ // but also if usecolspan2 is not in effect then we also put each combined field in its own tr.
+ if (($pkga['combinefields'] == "end") || (!isset($pkga['usecolspan2']))) {
+ $input.="</tr>";
+ }
+ // At the end of the combined fields we finish up the table that encloses the combined fields...
+ if ($pkga['combinefields'] == "end") {
+ $input.="</table></td></tr>";
+ }
}
else{
$input = "</td></tr>";
OpenPOWER on IntegriCloud