add reception customer update changes
This commit is contained in:
42
frontend/views/common/_form_card_number.php
Normal file
42
frontend/views/common/_form_card_number.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Customer */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$customername = "";
|
||||
$number = "";
|
||||
if ( isset($card)){
|
||||
$number = $card->number;
|
||||
}
|
||||
if ( isset($customer) ){
|
||||
$customername = $customer->name;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'enableAjaxValidation' => false,
|
||||
'method' => 'get',
|
||||
'action' => $route
|
||||
]); ?>
|
||||
<div class="row" >
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::textInput("number", $number )?>
|
||||
</div>
|
||||
<div class='col-md-12'>
|
||||
<?php echo $customername; ?>
|
||||
</div>
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::submitButton("search",[ 'class' => 'btn btn-primary']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
|
||||
|
||||
76
frontend/views/common/_menu_reception.php
Normal file
76
frontend/views/common/_menu_reception.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $card common\models\Card */
|
||||
/* @var $customer common\models\Customer */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<style >
|
||||
.btn.btn-reception{
|
||||
width:100%;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$customername = "";
|
||||
if ( isset($customer ) ){
|
||||
$customername = $customer->name;
|
||||
}
|
||||
|
||||
|
||||
function mkCustomerBtn($card, $label,$route = null ){
|
||||
|
||||
$url = null;
|
||||
$classes = 'btn btn-primary btn-reception';
|
||||
if ( $card == null ){
|
||||
$classes .= ' disabled';
|
||||
}
|
||||
if ( isset($route)){
|
||||
$url = [$route, 'number' => $card->number];
|
||||
}
|
||||
return Html::a( $label , $url, ['class' => $classes ] );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-8'>
|
||||
<?php echo mkCustomerBtn( $card, Yii::t( 'frontend/customer' , 'Adatlap') , 'customer/update' ); ?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php echo Html::a(Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , null, ['class' => 'btn btn-primary btn-reception'] )?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-8'>
|
||||
<?php echo mkCustomerBtn( $card, Yii::t( 'frontend/customer' , 'Befizetések') ); ?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php echo Html::a(Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , null, ['class' => 'btn btn-primary btn-reception'] )?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::a(Yii::t( 'frontend/customer', 'Jelentkezések') , null,['class' => 'btn btn-primary btn-reception'] )?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-12'>
|
||||
<?php echo mkCustomerBtn( $card, Yii::t( 'frontend/customer' , 'Egyenleg') ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::a(Yii::t( 'frontend/customer', 'Termékeladás') , null,['class' => 'btn btn-primary btn-reception'] )?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user