Skip to content

Commit

Permalink
Removed Client and Seller filters from the AdvancedSearch view for no…
Browse files Browse the repository at this point in the history
…n-support
  • Loading branch information
SilverFire committed Jul 21, 2016
1 parent b6c2519 commit 86d625e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
25 changes: 14 additions & 11 deletions src/views/domain/_search.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use hipanel\modules\client\widgets\combo\ClientCombo;
use hipanel\modules\client\widgets\combo\SellerCombo;
use hipanel\modules\domain\models\Domain;
use hipanel\widgets\DatePicker;
use yii\helpers\Html;
Expand All @@ -17,13 +18,15 @@
<?= $search->field('note') ?>
</div>

<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('client_id')->widget(ClientCombo::classname()) ?>
</div>
<?php if (Yii::$app->user->can('support')) { ?>
<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('client_id')->widget(ClientCombo::class) ?>
</div>

<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('seller_id')->widget(ClientCombo::classname()) ?>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('seller_id')->widget(SellerCombo::class) ?>
</div>
<?php } ?>

<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('state')->dropDownList(Domain::stateOptions(), ['prompt' => '--']) ?>
Expand All @@ -33,13 +36,13 @@
<div class="form-group">
<?= Html::tag('label', Yii::t('hipanel/domain', 'Registered range'), ['class' => 'control-label']); ?>
<?= DatePicker::widget([
'model' => $search->model,
'type' => DatePicker::TYPE_RANGE,
'attribute' => 'created_from',
'attribute2' => 'created_till',
'model' => $search->model,
'type' => DatePicker::TYPE_RANGE,
'attribute' => 'created_from',
'attribute2' => 'created_till',
'pluginOptions' => [
'autoclose' => true,
'format' => 'dd-mm-yyyy',
'format' => 'dd-mm-yyyy',
],
]) ?>
</div>
Expand Down
14 changes: 8 additions & 6 deletions src/views/host/_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
<?= $search->field('domain_like') ?>
</div>

<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('client_id')->widget(ClientCombo::classname()) ?>
</div>
<?php if (Yii::$app->user->can('support')) { ?>
<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('client_id')->widget(ClientCombo::class) ?>
</div>

<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('seller_id')->widget(SellerCombo::classname()) ?>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<?= $search->field('seller_id')->widget(SellerCombo::class) ?>
</div>
<?php } ?>

0 comments on commit 86d625e

Please sign in to comment.