Commit 7efdbf71 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлен новый параметр в метод, формирующий поле параметра;

parent 9c8927b0
...@@ -51,7 +51,7 @@ class ConditionBase { ...@@ -51,7 +51,7 @@ class ConditionBase {
* @param $condition_key * @param $condition_key
* @return array * @return array
*/ */
public function getParams($group_key, $condition_key){ public function getParams($group_key, $condition_key, $value=null){
$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) {
...@@ -59,7 +59,7 @@ class ConditionBase { ...@@ -59,7 +59,7 @@ class ConditionBase {
switch($type) { switch($type) {
case 'text': case 'text':
default: default:
$result[] = '<input type="text" name="Conditions['.$group_key.']['.$this->getId().$condition_key.']['.$name.']" class="form-control" style="margin-top: 5px;" placeholder="'.((isset($param['placeholder'])) ? $param['placeholder'] : '').'"/>'; $result[] = '<input type="text" value="'.((!is_null($value)) ? $value : '').'" name="Conditions['.$group_key.']['.$this->getId().$condition_key.']['.$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