From 76405413c2f10e559127ccf0de8a7ec551f4e4b7 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 16 Nov 2016 19:18:20 +0200 Subject: [PATCH] -Blog article form fixed -Table of sizes added -Catalog java script fixed --- views/blog-article/_form.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/views/blog-article/_form.php b/views/blog-article/_form.php index 4ac9c08..3b9e403 100755 --- a/views/blog-article/_form.php +++ b/views/blog-article/_form.php @@ -135,6 +135,11 @@ ?> id )) { + $data = 'function(params) { return {q:params.term}; }'; + } else { + $data = 'function(params) { return {q:params.term, id:' . $model->id . '}; }'; + } echo $form->field($model, 'blogArticles') ->widget( Select2::className(), @@ -156,7 +161,7 @@ 'url' => yii\helpers\Url::to([ '/blog/blog-article/article-list' ]), 'dataType' => 'json', 'data' => new JsExpression( - 'function(params) { return {q:params.term, id:' . $model->id . '}; }' + $data ), ], 'templateResult' => new JsExpression('function(article) { return article.text; }'), -- libgit2 0.21.4