36 lines
897 B
PHP
36 lines
897 B
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
use common\models\ProductCategory;
|
|
use frontend\components\HtmlHelper;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\InventoryGroup */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
|
|
<?php
|
|
|
|
$cats = ProductCategory::read();
|
|
$cats = HtmlHelper::mkOptions($cats, 'id_product_category');
|
|
?>
|
|
|
|
|
|
<div class="inventory-group-form">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
|
|
|
|
<?= $form->field($model, 'id_product_category')->dropDownList($cats) ?>
|
|
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/inventory_group', 'Létrehoz') : Yii::t('common/inventory_group', 'Módosít'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|