<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
use frontend\components\HtmlHelper;

/* @var $this yii\web\View */
/* @var $card common\models\Card */
/* @var $customer common\models\Customer */
/* @var $model frontend\models\ReceptionForm */
/* @var $form yii\widgets\ActiveForm */
?>

<style >
	 .btn.btn-reception{
		width:100%;
		margin-top: 6px;
		margin-bottom: 6px;
	}

</style>

<?php 
$customername = "";
if ( isset($model->customer ) ){
	$customername = $model->customer->name; 
}

$card = $model->card;

 


?>
    <div class='row'>
		<div class='col-md-8'>
			<?php echo   HtmlHelper::mkReceptionCustomerBtn( $model, Yii::t( 'frontend/customer' , 'Adatlap') , 'customer/update' );  ?>
		</div>
		<div class='col-md-4'>
			<?php echo Html::a(Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ]  )   , Url::toRoute('customer/create')  ,  ['class' =>   'btn btn-primary btn-reception'] )?>
		</div>
	</div>
    <div class='row'>
		<div class='col-md-8'>
			<?php echo HtmlHelper::mkReceptionCustomerBtn( $model, Yii::t( 'frontend/customer' , 'Befizetések')  , 'ticket/index');  ?>
		</div>
		<div class='col-md-4'>
			<?php echo HtmlHelper::mkReceptionCustomerBtn( $model, Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ]  )   , 'ticket/create' );  ?>
		</div>
	</div>
    <div class='row'>
		<div class='col-md-12'>
			<?php echo  HtmlHelper::mkReceptionBtn($model, Yii::t( 'frontend/transfer', 'Termékeladás'),  'product/sale')?>
		</div>
	</div>
	
	
    <div class='row'>
		<div class='col-md-12'>
			&nbsp;
		</div>
	</div>
	
	 <?php $form = ActiveForm::begin([
	        'action' => ['key/toggle', 'number' =>  $model->getCardNumber()],
	        'method' => 'post',
	    ]); ?>
	<div class="row" style="margin-bottom: 6px;">
		<div class='col-md-12'>
			<?php echo Html::hiddenInput('number', $model->getCardNumber())?>
			 <?php echo Html::textInput('KeyToggleForm[key]','',['class'=>"form-control", 'placeholder' =>'Kulcs']) ?>
		    
    	</div>
    </div>
    <div class="row">
    	<div class='col-md-12'>
        <?= Html::submitButton(Yii::t('frontend/collection', 'Kulcs Ki/Be'), ['class' => 'btn btn-primary btn-block']) ?>
    	</div>
		
	</div>
     <?php ActiveForm::end(); ?>		



