Project

General

Profile

« Previous | Next » 

Revision 4a6272be

Added by Stephen Beaver over 9 years ago

Added support for <collapse> tags in listtopic fields. e.g.:
<collapse>closed</collapse> // Creates a panel that is collapsible and iniatially closed
<collapse>open</collapse> // Creates a panel that is collapsible and iniatially open

View differences:

src/usr/local/www/interfaces_lagg_edit.php
246 246
	print_input_errors($input_errors);
247 247
}
248 248

  
249
print_r(build_member_list());
249 250
$form = new Form();
250 251

  
251 252
$section = new Form_Section('LAGG Configuration');
src/usr/local/www/pkg_edit.php
666 666
// Now loop through all of the fields defined in the XML
667 667
foreach ($pkg['fields']['field'] as $pkga) {
668 668

  
669
	$action = "";
670
	$uid = "";
671

  
669 672
	if ($pkga['type'] == "sorting") {
670 673
		continue;
671 674
	}
......
684 687
				$form->add($section);
685 688
			}
686 689

  
687
			$section = new Form_Section(strip_tags($pkga['name']));
690
			if (isset($pkga['collapse'])) {
691
				$uid = uniqid("section");
692

  
693
				$action = COLLAPSIBLE;
694

  
695
				if ($pkga['collapse'] == "open") {
696
					$action |= SEC_OPEN;
697
				} else {
698
					$action |= SEC_CLOSED;
699
				}
700
			}
701

  
702
			$section = new Form_Section(strip_tags($pkga['name']), $uid, $action);
688 703
		}
689 704

  
690 705
		continue;

Also available in: Unified diff