|
|
|
|
|
|
|
|
<?= $form->field($model, 'photo')->fileInput() ?> |
|
|
<?= $form->field($model, 'photo')->fileInput() ?> |
|
|
<?php |
|
|
<?php |
|
|
if (strlen($model->photo)) { |
|
|
if (strlen($model->photo)) { |
|
|
$base_url = Yii::$app->urlManagerProducer->baseUrl ; |
|
|
|
|
|
echo '<img src="'.$base_url.'/uploads/' . $model->photo . '" width="400px" /><br />'; |
|
|
|
|
|
|
|
|
$base_url = Yii::$app->urlManagerProducer->getHostInfo().'/'.Yii::$app->urlManagerProducer->baseUrl ; |
|
|
|
|
|
echo '<img src="'.$base_url.'uploads/' . $model->photo . '" width="400px" /><br />'; |
|
|
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />'; |
|
|
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />'; |
|
|
} |
|
|
} |
|
|
?> |
|
|
?> |