Project

General

Profile

« Previous | Next » 

Revision ceb3d750

Added by Christian McDonald about 1 year ago

Introduce `class` tag to field markup in pkg xml spec.

View differences:

src/etc/inc/xmlparse.inc
34 34
	$ret = array(
35 35
		'acls', 'alias', 'aliasurl', 'allowedip', 'allowedhostname', 'authserver',
36 36
		'bridged', 'build_port_path',
37
		'ca', 'cacert', 'cert', 'crl', 'clone', 'config', 
37
		'ca', 'cacert', 'cert', 'crl', 'clone', 'config',
38 38
		'container', 'columnitem', 'checkipservice',
39 39
		'depends_on_package', 'disk', 'dnsserver', 'dnsupdate', 'domainoverrides', 'dyndns',
40 40
		'earlyshellcmd', 'element', 'encryption-algorithm-option',
......
58 58

  
59 59
/* Package XML tags that should be treated as a list not as a traditional array */
60 60
function listtags_pkg() {
61
	$ret = array('build_port_path', 'depends_on_package', 'onetoone', 'queue', 'rule', 'servernat', 'alias', 'additional_files_needed', 'tab', 'template', 'menu', 'rowhelperfield', 'service', 'step', 'package', 'columnitem', 'option', 'item', 'field', 'package', 'file');
62

  
61
	$ret = array(
62
		'additional_files_needed', 'alias', 'build_port_path', 'class', 'columnitem', 'depends_on_package',
63
		'field', 'file', 'item', 'menu', 'onetoone', 'option', 'package', 'queue', 'rowhelperfield', 'rule', 'servernat',
64
		'service', 'step', 'tab', 'template'
65
	);
63 66
	return array_flip($ret);
64 67
}
65 68

  
......
125 128
	if (isset($listtags[strtolower($name)])) {
126 129
		array_pop($curpath);
127 130
	}
128
	
131

  
129 132
	$depth--;
130 133
}
131 134

  
src/usr/local/www/pkg_edit.php
771 771

  
772 772
			$grp->setHelp($pkga['description']);
773 773

  
774
			foreach (array_get_path($pkga, 'class', []) as $class) {
775
				$grp->addClass($class);
776
			}
777

  
774 778
			if ($pkga['width']) {
775 779
				$grp->setWidth($pkga['width']);
776 780
			}

Also available in: Unified diff