mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
eval parameter 'multiple'
This commit is contained in:
parent
1ab07d53f7
commit
42a81b6b0e
|
@ -401,7 +401,10 @@ $(document).ready( function() {
|
|||
);
|
||||
break;
|
||||
case 'select':
|
||||
$vals = $task->getParameter()[$param['name']];
|
||||
if(!empty($param['multiple']))
|
||||
$vals = $task->getParameter()[$param['name']];
|
||||
else
|
||||
$vals = [$task->getParameter()[$param['name']]];
|
||||
foreach($param['options'] as &$opt) {
|
||||
if(in_array($opt[0], $vals))
|
||||
$opt[2] = true;
|
||||
|
@ -411,7 +414,7 @@ $(document).ready( function() {
|
|||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'params['.$param['name'].'][]',
|
||||
'name'=>'params['.$param['name'].']'.(!empty($param['multiple']) ? '[]' : ''),
|
||||
'multiple'=>isset($param['multiple']) ? $param['multiple'] : false,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))),
|
||||
'options'=>$param['options'],
|
||||
|
@ -429,7 +432,10 @@ $(document).ready( function() {
|
|||
);
|
||||
break;
|
||||
case "users":
|
||||
$userids = $task->getParameter()[$param['name']];
|
||||
if(!empty($param['multiple']))
|
||||
$userids = $task->getParameter()[$param['name']];
|
||||
else
|
||||
$userids = [$task->getParameter()[$param['name']]];
|
||||
$users = $dms->getAllUsers();
|
||||
foreach ($users as $currUser) {
|
||||
if (!$currUser->isGuest())
|
||||
|
@ -440,7 +446,7 @@ $(document).ready( function() {
|
|||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'params['.$param['name'].'][]',
|
||||
'name'=>'params['.$param['name'].']'.(!empty($param['multiple']) ? '[]' : ''),
|
||||
'multiple'=>isset($param['multiple']) ? $param['multiple'] : false,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))),
|
||||
'options'=>$options
|
||||
|
|
Loading…
Reference in New Issue
Block a user