implement customer comment in frontend

This commit is contained in:
Schneider Roland 2023-03-09 17:44:43 +01:00
parent 31edf22e0e
commit 8d98f510d1
3 changed files with 63 additions and 37 deletions

View File

@ -118,7 +118,9 @@ class CustomerUpdate extends \common\models\Customer
[['photo_data'] ,'safe'],
[['birth_place'] ,'safe'],
[['mother_name'] ,'safe'],
[['warn_mail_ticket_expire_enabled' ],'integer']
[['warn_mail_ticket_expire_enabled' ],'integer'],
[['comment'], 'string', 'max' => 255],
];
}

View File

@ -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");
}
}
?>

View File

@ -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]) ?>