add inventory to frontend

This commit is contained in:
2016-03-24 07:44:00 +01:00
parent e7b16f20ce
commit ed837d6580
27 changed files with 1259 additions and 71 deletions

View File

@@ -0,0 +1,32 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Account;
use common\components\Helper;
use frontend\components\HtmlHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Inventory */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$accounts = ['' =>'Mind'] + HtmlHelper::mkAccountOptions( Account::readAccounts() );
?>
<div class="inventory-form">
<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?php echo $form->field($model, "id_account")->dropDownList($accounts)?>
<?php echo $form->field($model, "name")->textInput()?>
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/inventory', 'Létrehoz') : Yii::t('common/inventory', 'Módosít'), [ 'name'=>'Inventory[submit]' ,'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>