implement customer comment in frontend
This commit is contained in:
@@ -236,4 +236,22 @@ if (isset($model->customer)) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isset($model->customer)) {
|
||||
|
||||
if ( isset($model->customer->comment )) {
|
||||
$commentClass = "alert alert-danger";
|
||||
echo Html::beginTag("div", ['class' => $commentClass, "role" => "alert"]);
|
||||
echo Html::beginTag("div");
|
||||
echo "Megjegyzés:";
|
||||
echo Html::endTag("div");
|
||||
echo Html::beginTag("strong", []);
|
||||
|
||||
echo $model->customer->comment;
|
||||
echo Html::endTag("strong");
|
||||
echo Html::endTag("div");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -19,7 +19,7 @@ use yii\base\Widget;
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'photo_data')->hiddenInput()->label(false) ?>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?php //echo $form->field($model, 'cardNumber')->widget(CardNumberTypeahead::className(),[]) ?>
|
||||
@@ -34,6 +34,12 @@ use yii\base\Widget;
|
||||
</div>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-6'>
|
||||
<?= $form->field($model, 'comment')->textInput(['maxlength' => true]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-6'>
|
||||
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
|
||||
@@ -44,19 +50,19 @@ use yii\base\Widget;
|
||||
<?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'sex')->dropDownList(Customer::sexes()) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-6'>
|
||||
<?= $form->field($model, 'mother_name')->textInput(['maxlength' => true]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'birth_place')->textInput(['maxlength' => true]) ?>
|
||||
@@ -69,9 +75,9 @@ use yii\base\Widget;
|
||||
]
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
@@ -124,16 +130,16 @@ use yii\base\Widget;
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php echo $form->field($model, 'city')->widget(CityNameTypeahead::className(),[
|
||||
'pluginEvents' =>[
|
||||
'pluginEvents' =>[
|
||||
"typeahead:select" => "function(a,b) {
|
||||
$('#customercreate-zip').typeahead( 'val', b.zip );
|
||||
}",]
|
||||
|
||||
|
||||
])?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $form->field($model, 'address')->textInput(['maxlength' => true]) ?>
|
||||
@@ -144,7 +150,7 @@ use yii\base\Widget;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/customer', 'Create') : Yii::t('common/customer', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
|
||||
Reference in New Issue
Block a user