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

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

parent d6cfffe5
...@@ -53,14 +53,11 @@ class ConditionBase { ...@@ -53,14 +53,11 @@ class ConditionBase {
$result = []; $result = [];
if (isset($this->config['params'])) { if (isset($this->config['params'])) {
foreach($this->config['params'] as $name=>$param) { foreach($this->config['params'] as $name=>$param) {
if (empty($param['type'])) $type = (empty($param['type'])) ? 'text' : $param['type'];
return '<input type="text" name="TriggerTrigger[conditions][]['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>'; switch($type) {
switch($param['type']) {
case 'text': 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: 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; 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