mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
allow checkboxes for task parameters
This commit is contained in:
parent
317f10b5d1
commit
ff69d6e08e
|
@ -93,6 +93,19 @@ $(document).ready( function() {
|
||||||
if($additionalparams) {
|
if($additionalparams) {
|
||||||
foreach($additionalparams as $param) {
|
foreach($additionalparams as $param) {
|
||||||
switch($param['type']) {
|
switch($param['type']) {
|
||||||
|
case 'boolean':
|
||||||
|
$this->formField(
|
||||||
|
getMLText("task_".$extname."_".$taskname."_".$param['name']),
|
||||||
|
array(
|
||||||
|
'element'=>'input',
|
||||||
|
'type'=>'checkbox',
|
||||||
|
'id'=>'params_'.$param['name'],
|
||||||
|
'name'=>'params['.$param['name'].']',
|
||||||
|
'value'=>'1',
|
||||||
|
'checked'=>false,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
?>
|
?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
@ -168,6 +181,19 @@ $(document).ready( function() {
|
||||||
if($additionalparams = $taskobj->getAdditionalParams()) {
|
if($additionalparams = $taskobj->getAdditionalParams()) {
|
||||||
foreach($additionalparams as $param) {
|
foreach($additionalparams as $param) {
|
||||||
switch($param['type']) {
|
switch($param['type']) {
|
||||||
|
case 'boolean':
|
||||||
|
$this->formField(
|
||||||
|
getMLText("task_".$task->getExtension()."_".$task->getTask()."_".$param['name']),
|
||||||
|
array(
|
||||||
|
'element'=>'input',
|
||||||
|
'type'=>'checkbox',
|
||||||
|
'id'=>'params_'.$param['name'],
|
||||||
|
'name'=>'params['.$param['name'].']',
|
||||||
|
'value'=>'1',
|
||||||
|
'checked'=>$task->getParameter()[$param['name']] == 1,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
?>
|
?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user