Skip to content

Commit

Permalink
Combo2 ~> combo, fixing calls
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed May 14, 2015
1 parent 7091a12 commit a452070
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion controllers/TicketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace hipanel\modules\ticket\controllers;

use hipanel\modules\client\assets\combo2\Client;
use hipanel\modules\client\assets\combo2\ClientCombo;
use Yii;
use hipanel\modules\ticket\models\Thread;
use hipanel\modules\ticket\models\TicketSettings;
Expand Down
43 changes: 13 additions & 30 deletions views/ticket/_advanced_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @license http://hiqdev.com/hipanel/license
* @copyright Copyright (c) 2015 HiQDev
*/
use hipanel\widgets\Combo2;
use hipanel\widgets\DefaultCombo2;
use hipanel\modules\client\widgets\combo\ClientCombo;
use hipanel\widgets\combo\StaticCombo;
use yii\helpers\Url;
use yii\web\JsExpression;

Expand All @@ -15,62 +15,45 @@
$model->topics = 'general';
else
$model->topics = array_keys($model->topics);
print $form->field($model, 'topics')->widget(Combo2::classname(), [
'type' => DefaultCombo2::className(),
'fieldOptions' => [
'pluginOptions' => [
'allowClear' => true,
'data' => array_merge(["" => ""], $topic_data),
],
]
print $form->field($model, 'topics')->widget(StaticCombo::className(), [
'data' => array_merge(["" => ""], $topic_data)
]); ?>
<div class="row">
<div class="col-md-6">
<!-- State -->
<?php
if ($model->isNewRecord)
$model->state = 'opened';
print $form->field($model, 'state')->widget(Combo2::classname(), [
'type' => DefaultCombo2::className(),
'fieldOptions' => [
'pluginOptions' => [
'data' => array_merge(["" => ""], $state_data),
]
]
print $form->field($model, 'state')->widget(StaticCombo::classname(), [
'data' => array_merge(["" => ""], $state_data),
]); ?>
</div>
<div class="col-md-6">
<!-- Priority -->
<?php
if ($model->isNewRecord)
$model->priority = 'medium';
print $form->field($model, 'priority')->widget(Combo2::classname(), [
'type' => DefaultCombo2::className(),
'fieldOptions' => [
'pluginOptions' => [
'data' => array_merge(["" => ""], $priority_data),
'allowClear' => true,
]
]
print $form->field($model, 'priority')->widget(StaticCombo::classname(), [
'data' => array_merge(["" => ""], $priority_data),
]); ?>
</div>
</div>

<!-- Responsible -->
<?= $form->field($model, 'responsible_id')->widget(Combo2::classname(), [
'type' => \hipanel\modules\client\assets\combo2\Manager::className()
<?= $form->field($model, 'responsible_id')->widget(ClientCombo::classname(), [
'clientType' => 'manager'
]); ?>

<?php if ($model->scenario == 'insert') : ?>
<?= $form->field($model, 'watchers')->widget(Combo2::classname(), [
'type' => \hipanel\modules\client\assets\combo2\Manager::className()
<?= $form->field($model, 'watchers')->widget(ClientCombo::classname(), [
'clientType' => 'manager'
]); ?>
<?php endif; ?>

<?php
if ($model->isNewRecord)
$model->recipient_id = \Yii::$app->user->identity->id;
print $form->field($model, 'recipient_id')->widget(Combo2::classname(), ['type' => \hipanel\modules\client\assets\combo2\Client::className()]); ?>
print $form->field($model, 'recipient_id')->widget(ClientCombo::classname()); ?>

<?php if ($model->scenario != 'answer') : ?>
<?= $form->field($model, 'spent')->widget(kartik\widgets\TimePicker::className(), [
Expand Down
2 changes: 1 addition & 1 deletion views/ticket/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
'subject',
'spent',
'author',
'rescipient',
'recipient',
]
]); ?>

Expand Down

0 comments on commit a452070

Please sign in to comment.