|
|
@@ -44,17 +44,17 @@ use yii\widgets\ActiveForm; |
|
|
|
/* @var $form yii\widgets\ActiveForm */ |
|
|
|
?> |
|
|
|
|
|
|
|
<div class="produit-form"> |
|
|
|
<div class="product-form"> |
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'actif')->radioList([1 => 'Oui',0 => 'Non' ]) ?> |
|
|
|
<?= $form->field($model, 'nom')->textInput(['maxlength' => 255]) ?> |
|
|
|
<?= $form->field($model, 'active')->radioList([1 => 'Oui',0 => 'Non' ]) ?> |
|
|
|
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> |
|
|
|
<?= $form->field($model, 'description')->textInput(['maxlength' => 255]) ?> |
|
|
|
<?= $form->field($model, 'recette')->textarea() ?> |
|
|
|
<?= $form->field($model, 'prix')->textInput() ?> |
|
|
|
<?= $form->field($model, 'poids')->textInput() ?> |
|
|
|
<?= $form->field($model, 'quantite_max') |
|
|
|
<?= $form->field($model, 'recipe')->textarea() ?> |
|
|
|
<?= $form->field($model, 'price')->textInput() ?> |
|
|
|
<?= $form->field($model, 'weight')->textInput() ?> |
|
|
|
<?= $form->field($model, 'quantity_max') |
|
|
|
->hint('Renseignez ce champs si vous souhaitez limiter la quantité commandable pour ce produit.') |
|
|
|
->textInput() ?> |
|
|
|
|
|
|
@@ -66,29 +66,19 @@ use yii\widgets\ActiveForm; |
|
|
|
} |
|
|
|
?> |
|
|
|
|
|
|
|
<?php if(Yii::$app->user->identity->id_etablissement == 1): ?> |
|
|
|
<?= $form->field($model, 'illustration')->fileInput() ?> |
|
|
|
<?php |
|
|
|
if(strlen($model->illustration)) { |
|
|
|
echo '<img src="../../frontend/web/uploads/'.$model->illustration.'" width="200px" /><br />' ; |
|
|
|
echo '<input type="checkbox" name="delete_illustration" id="delete_illustration" /> <label for="delete_illustration">Supprimer l\'illustration</label><br /><br />' ; |
|
|
|
} |
|
|
|
?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<h2>Jours de production</h2> |
|
|
|
<div id="jours-production"> |
|
|
|
<?= $form->field($model, 'lundi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'mardi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'mercredi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'jeudi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'vendredi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'samedi')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'dimanche')->checkbox() ?> |
|
|
|
<div id="days-production"> |
|
|
|
<?= $form->field($model, 'monday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'tuesday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'wednesday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'thursday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'friday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'saterday')->checkbox() ?> |
|
|
|
<?= $form->field($model, 'sunday')->checkbox() ?> |
|
|
|
</div> |
|
|
|
<div class="clr"></div> |
|
|
|
|
|
|
|
<?= $form->field($model, 'id_etablissement')->hiddenInput()->label('') ?> |
|
|
|
<?= $form->field($model, 'id_producer')->hiddenInput()->label('') ?> |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> |