support for additional parameters of type 'password'

This commit is contained in:
Uwe Steinmann 2020-06-25 08:54:37 +02:00
parent 619e8a8d30
commit cfc2ca1e24

View File

@ -152,16 +152,30 @@ $(document).ready( function() {
) )
); );
break; break;
case 'password':
$this->formField(
getMLText('task_'.$extname."_".$taskname."_".$param['name']),
array(
'element'=>'input',
'type'=>'password',
'id'=>'params_'.$param['name'],
'name'=>'params['.$param['name'].']',
'required'=>false
)
);
break;
default: default:
?> $this->formField(
<div class="control-group"> getMLText('task_'.$extname."_".$taskname."_".$param['name']),
<label class="control-label" for="params_<?= $param['name'] ?>"><?php printMLText('task_'.$extname."_".$taskname."_".$param['name']);?>:</label> array(
<div class="controls"> 'element'=>'input',
<input type="text" id="params_<?= $param['name'] ?>" name="params[<?= $param['name'] ?>]" value=""> 'type'=>'text',
</div> 'id'=>'params_'.$param['name'],
</div> 'name'=>'params['.$param['name'].']',
<?php 'required'=>false
break; )
);
break;
} }
} }
} }
@ -169,7 +183,7 @@ $(document).ready( function() {
<div class="control-group"> <div class="control-group">
<label class="control-label" for="login"></label> <label class="control-label" for="login"></label>
<div class="controls"> <div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button> <button type="submit" class="btn btn-primary"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div> </div>
</div> </div>
</form> </form>
@ -245,16 +259,32 @@ $(document).ready( function() {
) )
); );
break; break;
case 'password':
$this->formField(
getMLText("task_".$task->getExtension()."_".$task->getTask()."_".$param['name']),
array(
'element'=>'input',
'type'=>'password',
'id'=>'params_'.$param['name'],
'name'=>'params['.$param['name'].']',
'value'=>$task->getParameter()[$param['name']],
'required'=>false
)
);
break;
default: default:
?> $this->formField(
<div class="control-group"> getMLText("task_".$task->getExtension()."_".$task->getTask()."_".$param['name']),
<label class="control-label" for="params_<?= $param['name'] ?>"><?php printMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']);?>:</label> array(
<div class="controls"> 'element'=>'input',
<input type="text" id="params_<?= $param['name'] ?>" name="params[<?= $param['name'] ?>]" value="<?= $task->getParameter()[$param['name']] ?>"> 'type'=>'text',
</div> 'id'=>'params_'.$param['name'],
</div> 'name'=>'params['.$param['name'].']',
<?php 'value'=>$task->getParameter()[$param['name']],
break; 'required'=>false
)
);
break;
} }
} }
} }
@ -262,7 +292,7 @@ $(document).ready( function() {
<div class="control-group"> <div class="control-group">
<label class="control-label" for="login"></label> <label class="control-label" for="login"></label>
<div class="controls"> <div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button> <button type="submit" class="btn btn-primary"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div> </div>
</div> </div>
</form> </form>