From bbb15c439373f82a7897e582af12360f03f8e27c Mon Sep 17 00:00:00 2001 From: SilverFire - Dima Naumenko Date: Fri, 15 May 2015 17:25:30 +0300 Subject: [PATCH] StaticCombo call update --- views/ticket/_advanced_form.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/views/ticket/_advanced_form.php b/views/ticket/_advanced_form.php index d148e57..7c18664 100644 --- a/views/ticket/_advanced_form.php +++ b/views/ticket/_advanced_form.php @@ -14,9 +14,15 @@ isNewRecord) $model->topics = 'general'; else - $model->topics = array_keys($model->topics); + $model->topics = implode(',', array_keys($model->topics)); print $form->field($model, 'topics')->widget(StaticCombo::className(), [ - 'data' => array_merge(["" => ""], $topic_data) + 'pluginOptions' => [ + 'select2Options' => [ + 'multiple' => true, + 'tags' => true, + ] + ], + 'data' => $topic_data ]); ?>
@@ -25,7 +31,7 @@ if ($model->isNewRecord) $model->state = 'opened'; print $form->field($model, 'state')->widget(StaticCombo::classname(), [ - 'data' => array_merge(["" => ""], $state_data), + 'data' => $state_data, ]); ?>
@@ -34,7 +40,7 @@ if ($model->isNewRecord) $model->priority = 'medium'; print $form->field($model, 'priority')->widget(StaticCombo::classname(), [ - 'data' => array_merge(["" => ""], $priority_data), + 'data' => $priority_data, ]); ?>