mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +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;
|
||||
case 'select':
|
||||
$vals = $task->getParameter()[$param['name']];
|
||||
foreach($param['options'] as &$opt) {
|
||||
if(in_array($opt[0], $vals))
|
||||
$opt[2] = true;
|
||||
}
|
||||
$this->formField(
|
||||
getMLText('task_'.$extname."_".$taskname."_".$param['name']),
|
||||
getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'params['.$param['name'].']',
|
||||
'multiple'=>false,
|
||||
'name'=>'params['.$param['name'].'][]',
|
||||
'multiple'=>isset($param['multiple']) ? $param['multiple'] : false,
|
||||
'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(
|
||||
'help'=>$param['description']
|
||||
|
|
Loading…
Reference in New Issue
Block a user