add inventory changes

This commit is contained in:
2016-03-23 08:15:37 +01:00
parent 7db129de92
commit e7b16f20ce
15 changed files with 413 additions and 62 deletions

View File

@@ -2,18 +2,27 @@
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>