mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 05:01:43 +00:00
fix task parameters of type 'select'
This commit is contained in:
parent
5cf3b5fc3e
commit
9ea8a02893
|
@ -355,15 +355,20 @@ $(document).ready( function() {
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'select':
|
case 'select':
|
||||||
|
$vals = $task->getParameter()[$param['name']];
|
||||||
|
foreach($param['options'] as &$opt) {
|
||||||
|
if(in_array($opt[0], $vals))
|
||||||
|
$opt[2] = true;
|
||||||
|
}
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText('task_'.$extname."_".$taskname."_".$param['name']),
|
getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||||
array(
|
array(
|
||||||
'element'=>'select',
|
'element'=>'select',
|
||||||
'class'=>'chzn-select',
|
'class'=>'chzn-select',
|
||||||
'name'=>'params['.$param['name'].']',
|
'name'=>'params['.$param['name'].'][]',
|
||||||
'multiple'=>false,
|
'multiple'=>isset($param['multiple']) ? $param['multiple'] : false,
|
||||||
'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))),
|
'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))),
|
||||||
'options'=>$task->getParameter()[$param['options']],
|
'options'=>$param['options'],
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'help'=>$param['description']
|
'help'=>$param['description']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user