Skip to content

Commit

Permalink
Dialog select models
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Aug 22, 2017
1 parent ec3bec5 commit ee0dae7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/grid/UserColumnData.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ public function init()

if ($this->grid->filterModel && $this->attribute)
{
$this->filter = \skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::widget([
$this->filter = false;
/*$this->filter = \skeeks\cms\backend\widgets\SelectModelDialogUserWidget::widget([
'model' => $this->grid->filterModel,
'attribute' => $this->attribute,
]);
]);*/
}

}
Expand Down
5 changes: 4 additions & 1 deletion src/views/admin-cms-content-element/_form-additionaly.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@

<? if ($contentModel->parent_content_id) : ?>
<?= $form->field($model, 'parent_content_element_id')->widget(
\skeeks\cms\modules\admin\widgets\formInputs\CmsContentElementInput::className()
\skeeks\cms\backend\widgets\SelectModelDialogContentElementWidget::class,
[
'content_id' => $contentModel->parent_content_id
]
)->label($contentModel->parentContent->name_one) ?>
<? endif; ?>
<?= $form->fieldSetEnd()?>
8 changes: 6 additions & 2 deletions src/views/admin-cms-content-element/_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
<?= $form->field($searchModel, 'has_full_image')->checkbox(\Yii::$app->formatter->booleanFormat, false); ?>


<?= $form->field($searchModel, 'created_by')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?>
<?= $form->field($searchModel, 'updated_by')->widget(\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogUserInput::className()); ?>
<?= $form->field($searchModel, 'created_by')->widget(
\skeeks\cms\backend\widgets\SelectModelDialogUserWidget::class
); ?>
<?= $form->field($searchModel, 'updated_by')->widget(
\skeeks\cms\backend\widgets\SelectModelDialogUserWidget::class
); ?>


<?= $form->field($searchModel, 'created_at_from')->widget(
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin-cms-content-element/multi-rp.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
&& $property->handler->fieldElement == \skeeks\cms\relatedProperties\propertyTypes\PropertyTypeElement::FIELD_ELEMENT_SELECT) : ?>
<?
echo $form->field($element->relatedPropertiesModel, $property->code)->widget(
\skeeks\cms\modules\admin\widgets\formInputs\SelectModelDialogContentElementInput::class,
\skeeks\cms\backend\widgets\SelectModelDialogContentElementWidget::class,
[
'content_id' => $property->handler->content_id
]
Expand Down
7 changes: 6 additions & 1 deletion src/views/admin-cms-site/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
]
); ?>

<?= $form->field($model, 'name'); ?>
<?= $form->field($model, 'name')->widget(
\skeeks\cms\backend\widgets\SelectModelDialogContentElementWidget::class,
[
'content_id' => 6
]
); ?>
<?= $form->field($model, 'code')->textInput(); ?>


Expand Down

0 comments on commit ee0dae7

Please sign in to comment.