| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
- use yii\helpers\ArrayHelper;
- use app\models\User;
- use app\models\Auctions;
- use app\models\Bidding;
- /* @var $this yii\web\View */
- /* @var $model app\models\Bills */
- /* @var $form yii\widgets\ActiveForm */
- ?>
- <div class="bills-form">
- <?php $form = ActiveForm::begin(); ?>
- <?= $form->field($model, 'user_id')->dropDownList(
- ArrayHelper::map(User::find()->all(), 'id', 'username'),
- ['prompt' => 'Выберите пользователя']
- ) ?>
- <?= $form->field($model, 'type')->dropDownList([
- 'guarantee' => 'Guarantee',
- 'registration' => 'Registration',
- ], ['prompt' => 'Тип рахунку']) ?>
- <?= $form->field($model, 'payed')->dropDownList([
- '0' => 'Нові',
- '1' => 'Сплачено',
- '2' => 'Не сплачено',
- ], ['prompt' => '']) ?>
- <?= $form->field($model, 'auction_id')->dropDownList(
- ArrayHelper::map(Auctions::find()->all(), 'id', 'name'),
- ['prompt' => 'Выберите аукцион']
- ) ?>
- <?= $form->field($model, 'bid_id')->dropDownList(
- ArrayHelper::map(Bidding::find()->all(), 'id', 'id'),
- ['prompt' => 'Выберите ставку']
- ) ?>
- <div class="form-group">
- <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
|