Commit 081327cf authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлена передача дополнительного параметра key. Необходим для правильной группировки условий.

parent 2222d9a2
// Метод добавляющий новое условие
$(document).on('click', 'a.add_condition', function() {
var id = $(this).data('id');
var container = $(this).closest('div.btn-group').parent().children('div.conditions-block');
var key = $(this).closest('tr').data('key');
$.ajax({
url: '/triggers/trigger-admin/getconditionhtml',
data: {
id: id
id: id,
key: key
},
method: 'GET',
success: function(response) {
......@@ -15,6 +18,7 @@ $(document).on('click', 'a.add_condition', function() {
})
});
// Метод добавляющий новую строку "И"
$(document).on('click', 'button.add-and-condition', function() {
var container = $(this).closest('table').children('tbody');
......
......@@ -39,7 +39,7 @@ class TriggerAdminController extends AdminController {
return (Yii::$app->request->isAjax) ? Json::encode($result) : $result;
}
public function actionGetconditionhtml($id){
public function actionGetconditionhtml($id, $key){
$condition = Conditions::init()->getConditionById($id);
$result = $this->renderPartial(
'condition-html',
......
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