public function init() { parent::init(); /*$this->filter = ArrayHelper::map( \Yii::$app->cms->findUser()->all(), 'id', 'displayName' );*/ if ($this->grid->filterModel && $this->attribute) { $this->filter = \skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::widget(['model' => $this->grid->filterModel, 'attribute' => $this->attribute]); } }
?> <?php echo $form->field($searchModel, 'has_image')->checkbox(\Yii::$app->formatter->booleanFormat, false); ?> <?php echo $form->field($searchModel, 'has_full_image')->checkbox(\Yii::$app->formatter->booleanFormat, false); ?> <?php echo $form->field($searchModel, 'created_by')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?> <?php echo $form->field($searchModel, 'updated_by')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?> <?php echo $form->field($searchModel, 'created_at_from')->widget(\kartik\datetime\DateTimePicker::className()); ?> <?php echo $form->field($searchModel, 'created_at_to')->widget(\kartik\datetime\DateTimePicker::className()); ?> <?php echo $form->field($searchModel, 'updated_at_from')->widget(\kartik\datetime\DateTimePicker::className()); ?> <?php echo $form->field($searchModel, 'updated_at_to')->widget(\kartik\datetime\DateTimePicker::className());
<?php /** * @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 21.09.2016 */ /* @var $this yii\web\View */ /* @var $searchModel common\models\searchs\Game */ /* @var $dataProvider yii\data\ActiveDataProvider */ $filter = new \yii\base\DynamicModel(['id']); $filter->addRule('id', 'integer'); $filter->load(\Yii::$app->request->get()); if ($filter->id) { $dataProvider->query->andWhere(['id' => $filter->id]); } ?> <? $form = \skeeks\cms\modules\admin\widgets\filters\AdminFiltersForm::begin([ 'action' => '/' . \Yii::$app->request->pathInfo, ]); ?> <?php echo $form->field($searchModel, 'user_id')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className())->setVisible(); ?> <? $form::end(); ?>
<?php echo $form->fieldSet(\Yii::t('skeeks/shop/app', 'Main')); ?> <? if (\Yii::$app->request->get('cms_user_id')) : ?> <? $model->cms_user_id = \Yii::$app->request->get('cms_user_id'); ?> <div style="display: none;"> <?php echo $form->field($model, 'cms_user_id')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?> </div> <? elseif ($model->isNewRecord) : ?> <?php echo $form->field($model, 'cms_user_id')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?> <? endif; ?> <?php echo $form->field($model, 'name')->textInput(); ?> <?php echo $form->field($model, 'shop_person_type_id')->listBox(\yii\helpers\ArrayHelper::merge(['' => ' — '], \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopPersonType::find()->all(), 'id', 'name')), ['size' => 1, 'data-form-reload' => 'true']); ?> <? if ($model->relatedProperties) : ?> <?php echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/cms', 'Settings')]); ?>
CSS ); $form = ActiveForm::begin(['id' => 'sx-change-user', 'method' => 'get', 'usePjax' => false]); ?> <h1 style="text-align: center;">Новый заказ для покупателя: <a href="#" class="sx-change-user">выбрать</a> или <a href="#">создать</a></h1> <hr /> <div style="text-align: center"> <a href="#" class="btn btn-lg btn-primary sx-btn-for-me" data-me="<?php echo \Yii::$app->user->identity->id; ?> ">Создать для меня</a> </div> <div style="display: none;"> <?php echo \skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::widget(['id' => 'cmsUserId', 'name' => 'cmsUserId']); ?> </div> <? $this->registerJs(<<<JS $("#cmsUserId [name=cmsUserId]").on('change', function() { $("#sx-change-user").submit(); }); $('.sx-change-user').on('click', function() { $(".sx-btn-create").click(); });