Commit 3e1c1a9b authored by Shakarim Sapa's avatar Shakarim Sapa

- Внесены изменения в логику определения типа параметра

parent d6cfffe5
......@@ -53,14 +53,11 @@ class ConditionBase {
$result = [];
if (isset($this->config['params'])) {
foreach($this->config['params'] as $name=>$param) {
if (empty($param['type']))
return '<input type="text" name="TriggerTrigger[conditions][]['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>';
switch($param['type']) {
$type = (empty($param['type'])) ? 'text' : $param['type'];
switch($type) {
case 'text':
$result[] = '<input type="text" name="TriggerTrigger[conditions][]['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>';
break;
default:
$result[] = '<input type="text" name="TriggerTrigger[conditions][]['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>';
$result[] = '<input type="text" name="Conditions[]['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>';
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment