fitness-web/frontend/views/contract/_make_contract.php
Roland Schneider 2e3a8d53ca Fix hide reception cart
- add property user_cart_on
- add property product_sale_default_focus
- add property ticket_create-price_editable
- add discount product/ticket enabled
2016-02-28 15:48:30 +01:00

120 lines
2.9 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\TicketType;
use common\components\Helper;
use frontend\components\HtmlHelper;
use kartik\widgets\DatePicker;
use common\models\Transfer;
use common\models\Discount;
/* @var $this yii\web\View */
/* @var $model common\models\Contract */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$types = TicketType::findAll(['status' => TicketType::STATUS_ACTIVE ,'installment_enabled' => '1']);
$types = HtmlHelper::mkTicketTypeOptions($types);
$discounts = Discount::readTicketDiscounts();
$discounts = ['' => ''] + HtmlHelper::mkDiscountOptions($discounts);
?>
<h1>Szerződés létrehozása</h1>
<div class="contract-form">
<?php $form = ActiveForm::begin(); ?>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'name')->textInput() ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'mothername')->textInput() ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'birthdate')->widget(DatePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd'
]
]) ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'birthplace')->textInput() ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'zip')->textInput() ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'city')->textInput() ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'address')->textInput() ?>
</div>
<div class="col-md-6">
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'bank_name')->textInput() ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'bank_account')->textInput() ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'phone')->textInput() ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'email')->textInput() ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'ticket_type')->dropDownList($types) ?>
</div>
<div class="col-md-6">
</div>
</div>
<div class="row">
<div class="col-md-6">
<?= $form->field($model, 'payment_method')->dropDownList(Transfer::paymentMethods()) ?>
</div>
<div class="col-md-6">
<?= $form->field($model, 'id_discount')->dropDownList( $discounts ) ?>
</div>
</div>
<div class="form-group">
<?= Html::submitButton( Yii::t('common/contract', 'Szerződés és első bérlet létrehozása') , ['class' => 'btn btn-success' ]) ?>
</div>
<?php ActiveForm::end(); ?>
</div>