35 lines
947 B
PHP
35 lines
947 B
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
use frontend\components\HtmlHelper;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\MoneyMovement */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
<?php
|
|
|
|
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
|
|
|
?>
|
|
<div class="money-movement-form">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
|
|
|
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
|
|
|
|
<?= $form->field($model, 'money')->textInput() ?>
|
|
|
|
<?= $form->field($model, 'comment')->textarea(['maxlength' => true]) ?>
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton($model->isNewRecord ? Yii::t('backend/money-movement', 'Create') : Yii::t('backend/money-movement', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|