From 4a6272bea5a2ec265b642c3ddc96280a03d07f45 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Mon, 11 Jan 2016 10:44:46 -0500 Subject: Added support for tags in listtopic fields. e.g.: closed // Creates a panel that is collapsible and iniatially closed open // Creates a panel that is collapsible and iniatially open --- src/usr/local/www/pkg_edit.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/usr/local/www/pkg_edit.php') diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 57e51ef..f525cff 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -666,6 +666,9 @@ $js_array = array(); // Now loop through all of the fields defined in the XML foreach ($pkg['fields']['field'] as $pkga) { + $action = ""; + $uid = ""; + if ($pkga['type'] == "sorting") { continue; } @@ -684,7 +687,19 @@ foreach ($pkg['fields']['field'] as $pkga) { $form->add($section); } - $section = new Form_Section(strip_tags($pkga['name'])); + if (isset($pkga['collapse'])) { + $uid = uniqid("section"); + + $action = COLLAPSIBLE; + + if ($pkga['collapse'] == "open") { + $action |= SEC_OPEN; + } else { + $action |= SEC_CLOSED; + } + } + + $section = new Form_Section(strip_tags($pkga['name']), $uid, $action); } continue; -- cgit v1.1