add editable account on reception/customer-cart, add towel handling

This commit is contained in:
2016-10-21 20:39:02 +02:00
parent 8585286150
commit 90c598f8c6
26 changed files with 649 additions and 37 deletions

View File

@@ -81,5 +81,28 @@ $card = $model->card;
</div>
<?php ActiveForm::end(); ?>
<?php if ( isset($model->customer) ) { ?>
<?php $form = ActiveForm::begin([
'action' => ['customer/towel', 'number' => $model->getCardNumber()],
'method' => 'post',
]); ?>
<div class="row" style="margin-top: 6px; margin-bottom: 6px;">
<div class='col-md-12'>
<?php echo Html::hiddenInput('TowelForm[number]', $model->getCardNumber())?>
<?php echo Html::textInput('TowelForm[count]','',['class'=>"form-control", 'placeholder' =>'Törölköző darab' ,'type' => 'number']) ?>
</div>
</div>
<div class="row">
<div class='col-md-6'>
<?= Html::submitButton(Yii::t('frontend/collection', 'Bérel'), [ 'name' => 'TowelForm[direction]', 'value' => 'out', 'class' => 'btn btn-primary btn-block']) ?>
</div>
<div class='col-md-6'>
<?= Html::submitButton(Yii::t('frontend/collection', 'Vissza ad'), ['name' => 'TowelForm[direction]', 'value' => 'in', 'class' => 'btn btn-primary btn-block']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
<?php }?>