implement ticket_type comment in frontend/backend
This commit is contained in:
@@ -16,90 +16,99 @@ use common\components\Helper;
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$accountOptions = [];
|
||||
$discountOptions= [];
|
||||
$ticketTypeOptions= [];
|
||||
|
||||
|
||||
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
||||
$discountOptions = ['' => ''] + HtmlHelper::mkDiscountOptions($discounts, [ 'emptyOption' => true] );
|
||||
$ticketTypeOptions = HtmlHelper::mkTicketTypeOptions($ticketTypes);
|
||||
$ticketTypeOptions = [];
|
||||
foreach ($ticketTypes as $ticketType){
|
||||
$comment = "";
|
||||
if ( isset($ticketType->comment)){
|
||||
$comment = " (" . $ticketType->comment .")";
|
||||
}
|
||||
$ticketTypeOptions[$ticketType->id_ticket_type] = $ticketType->name . $comment;
|
||||
|
||||
}
|
||||
|
||||
// echo "default kassza: " . Account::readDefault();
|
||||
// echo " kassza: " . $model->id_account;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="row" >
|
||||
<div class="col-md-12" >
|
||||
<div class="ticket-form">
|
||||
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'id' => 'ticket_form',
|
||||
]); ?>
|
||||
|
||||
|
||||
<?= Html::activeHiddenInput($model, 'cart')?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type')->dropDownList($ticketTypeOptions) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
||||
|
||||
|
||||
<?php echo $form->field($model,'payment_method')->dropDownList(Transfer::paymentMethods()) ?>
|
||||
|
||||
|
||||
<?php echo $form->field($model, 'id_discount')->dropDownList($discountOptions) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $form->field($model, 'end')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'max_usage_count')->input('number') ?>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
if ( Helper::isTicketCreatePriceEditable()){
|
||||
echo $form->field($model, 'price_brutto')->input('number' );
|
||||
}else{
|
||||
echo $form->field($model, 'price_brutto')->input('number' ,['readonly' => true] );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'comment')->textarea(['maxlength' => true]) ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class='col-md-4'>
|
||||
<?php echo Html::a(Yii::t("frontend/ticket","Fizetve"),null,['class' => 'btn btn-danger btn-block', 'id' => 'btn_sell'] );?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
|
||||
<?php
|
||||
if ( Helper::isUserCartOn()){
|
||||
|
||||
<?php
|
||||
if ( Helper::isUserCartOn()){
|
||||
echo Html::a(Yii::t("frontend/ticket","To cart"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_user_cart'] );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
<?php
|
||||
if ( $receptionForm->isCardWithCustomer() ){
|
||||
echo Html::a(Yii::t("frontend/ticket","Write up"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_customer_cart'] );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user