diff --git a/module/program/ui/create.html.php b/module/program/ui/create.html.php
index 5c712bd1bb..17c5701774 100644
--- a/module/program/ui/create.html.php
+++ b/module/program/ui/create.html.php
@@ -15,7 +15,7 @@ form
set::label($lang->program->parent),
set::disabled($parentID),
set::value($parentID),
- set::options($parents),
+ set::items($parents),
on::change('setBudgetTipsAndAclList')
),
formGroup
@@ -30,7 +30,7 @@ form
set::width('1/4'),
set::name('PM'),
set::label($lang->program->PM),
- set::options($pmUsers)
+ set::items($pmUsers)
),
formRow
(
@@ -81,7 +81,7 @@ form
(
set::name('delta'),
set::class('pl-4'),
- set::control(['type' => 'radioList', 'inline' => true, 'rootClass' => 'ml-4', 'options' => $lang->program->endList]),
+ set::control(['type' => 'radioList', 'inline' => true, 'rootClass' => 'ml-4', 'items' => $lang->program->endList]),
on::change('computeEndDate')
),
),
@@ -98,7 +98,7 @@ form
set::name('acl'),
set::label($lang->project->acl),
set::value('private'),
- set::options($aclList),
+ set::items($aclList),
set::control('radioList'),
on::change('setWhite')
)
diff --git a/zin/wg/checklist/v1.php b/zin/wg/checklist/v1.php
index fa715f943b..89a1604eab 100644
--- a/zin/wg/checklist/v1.php
+++ b/zin/wg/checklist/v1.php
@@ -12,7 +12,6 @@ class checkList extends wg
'name?: string',
'value?: string|array',
'items?: array',
- 'options?: array',
'inline?: bool'
];
@@ -41,8 +40,7 @@ class checkList extends wg
protected function build()
{
- list($items, $options, $inline) = $this->prop(['items', 'options', 'inline']);
- if(is_array($options)) $items = $options;
+ list($items, $inline) = $this->prop(['items', 'inline']);
if(!empty($items))
{
diff --git a/zin/wg/control/v1.php b/zin/wg/control/v1.php
index 32a32eb507..f046a67260 100644
--- a/zin/wg/control/v1.php
+++ b/zin/wg/control/v1.php
@@ -22,7 +22,7 @@ class control extends wg
'placeholder?: string',
'disabled?: bool',
'form?: string',
- 'options?: array'
+ 'items?: array'
];
protected function created()
@@ -59,7 +59,7 @@ class control extends wg
protected function buildCheckbox()
{
- if($this->hasProp('options')) return $this->buildCheckList();
+ if($this->hasProp('items')) return $this->buildCheckList();
return new checkList
(
new checkbox(set($this->props->skip('type')))
@@ -105,7 +105,7 @@ class control extends wg
$type = $this->prop('type');
if(empty($type))
{
- $type = $this->hasProp('options') ? 'select' : 'text';
+ $type = $this->hasProp('items') ? 'select' : 'text';
}
$methodName = "build{$type}";
diff --git a/zin/wg/formgroup/v1.php b/zin/wg/formgroup/v1.php
index a947ed1a06..df984382cb 100644
--- a/zin/wg/formgroup/v1.php
+++ b/zin/wg/formgroup/v1.php
@@ -6,11 +6,11 @@ require_once dirname(__DIR__) . DS . 'control' . DS . 'v1.php';
class formGroup extends wg
{
- protected static $defineProps = 'name?: string, label?:string|bool, labelClass?: string, labelClass?: string, required?:bool|string="auto", tip?: string, tipClass?: string|array, tipProps: array, control?: array|string, width?: string, strong?: bool, value?: string|array, disabled?: bool, options?: array';
+ protected static $defineProps = 'name?: string, label?:string|bool, labelClass?: string, labelClass?: string, required?:bool|string="auto", tip?: string, tipClass?: string|array, tipProps: array, control?: array|string, width?: string, strong?: bool, value?: string|array, disabled?: bool, items?: array';
protected function build()
{
- list($name, $label, $labelClass, $labelProps, $required, $tip, $tipClass, $tipProps, $control, $width, $strong, $value, $disabled, $options) = $this->prop(['name', 'label', 'labelClass', 'labelProps', 'required', 'tip', 'tipClass', 'tipProps', 'control', 'width', 'strong', 'value', 'disabled', 'options']);
+ list($name, $label, $labelClass, $labelProps, $required, $tip, $tipClass, $tipProps, $control, $width, $strong, $value, $disabled, $items) = $this->prop(['name', 'label', 'labelClass', 'labelProps', 'required', 'tip', 'tipClass', 'tipProps', 'control', 'width', 'strong', 'value', 'disabled', 'items']);
if($required === 'auto') $required = isFieldRequired($name);
@@ -23,7 +23,7 @@ class formGroup extends wg
if($name !== NULL) $control['name'] = $name;
if($value !== NULL) $control['value'] = $value;
if($disabled !== NULL) $control['disabled'] = $disabled;
- if($options !== NULL) $control['options'] = $options;
+ if($items !== NULL) $control['items'] = $items;
}
return div
diff --git a/zin/wg/select/v1.php b/zin/wg/select/v1.php
index cfa1cd94fb..98ccfdb527 100644
--- a/zin/wg/select/v1.php
+++ b/zin/wg/select/v1.php
@@ -13,7 +13,6 @@ class select extends wg
'disabled?: bool',
'multiple?: bool',
'items?: array',
- 'options?: array',
'size?: number',
];
@@ -55,8 +54,7 @@ class select extends wg
protected function build()
{
- list($items, $options) = $this->prop(['items', 'options']);
- if(is_array($options)) $items = $options;
+ list($items) = $this->prop(['items']);
if(!empty($items))
{
@@ -73,7 +71,7 @@ class select extends wg
(
setClass('form-control'),
set::multiple($this->isMultiple()),
- set($this->props->skip(['items', 'options', 'value', 'multiple'])),
+ set($this->props->skip(['items', 'value', 'multiple'])),
$items,
$this->children()
);