<table width="100%"> <tr> <td style="width: 270px; vertical-align: top"> <div> <label>Плановая дата</label> <div class="well well-sm" style="background-color: #fff; width:245px;"> <?php echo DatePicker::widget(['model' => $model, 'attribute' => 'plan_date', 'type' => DatePicker::TYPE_INLINE, 'language' => 'ru', 'pluginOptions' => ['format' => 'yyyy-mm-dd']]); ?> </div> </div> </td> <td style="vertical-align: top"> <?php echo $form->field($model, 'client')->dropDownList(Clients::getClients()); ?> <?php //= $form->field($model, 'client')->textInput(['maxlength' => true]) ?> <?php //= $form->field($model, 'plan_date')->textInput() ?> <?php echo $form->field($model, 'plan')->textarea(array('rows' => 3)); ?> <?php //= $form->field($model, 'plan')->textInput(['maxlength' => true]) ?>
<?php $form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <?php //= $form->field($model, 'id') ?> <div style="clear: both;"> <div class="col-md-2" style="margin-left: 0; padding-left: 0;"> <?php echo $form->field($model, 'active')->dropDownList(Tasks::getStatusesArray(), array('prompt' => 'Все')); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'client')->dropDownList(Clients::getClients(), array('prompt' => 'Любой')); ?> </div> <div class="col-md-3"> <?php echo '<label class="control-label">Даты</label>'; echo DatePicker::widget(['model' => $model, 'attribute' => 'fromDate', 'attribute2' => 'toDate', 'type' => DatePicker::TYPE_RANGE, 'form' => $form, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="col-md-3"> <?php if (User::isUserAdmin(Yii::$app->user->identity->username) or User::isUserModer(Yii::$app->user->identity->username)) { echo $form->field($model, 'user_ispol')->dropDownList(User::getUsers(), array('prompt' => 'Все')); } else { //echo $form->field($model, 'user_ispol')->dropDownList(Clients::getStatusesArray(), array('prompt'=>'Все')); }