mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
allow parameter of type 'folder' and 'users'
This commit is contained in:
parent
1488cdcfca
commit
182418c856
|
@ -420,6 +420,32 @@ $(document).ready( function() {
|
|||
)
|
||||
);
|
||||
break;
|
||||
case "folder":
|
||||
$folderid = $task->getParameter()[$param['name']];
|
||||
$this->formField(
|
||||
getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||
$this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $folderid ? $dms->getFolder($folderid) : 0, 'params['.$param['name']."]")
|
||||
);
|
||||
break;
|
||||
case "users":
|
||||
$userids = $task->getParameter()[$param['name']];
|
||||
$users = $dms->getAllUsers();
|
||||
foreach ($users as $currUser) {
|
||||
if (!$currUser->isGuest())
|
||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), in_array($currUser->getID(), $userids), array(array('data-subtitle', htmlspecialchars($currUser->getEmail()))));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'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'=>$options
|
||||
)
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$this->formField(
|
||||
getMLText("task_".$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||
|
|
Loading…
Reference in New Issue
Block a user