|
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\widgets\ActiveForm; |
|
|
|
use common\helpers\Url ; |
|
|
|
|
|
|
|
/* @var $this yii\web\View */ |
|
|
|
/* @var $model common\models\User */ |
|
|
@@ -67,12 +68,7 @@ $this->params['breadcrumbs'][] = 'Paramètres'; |
|
|
|
<?= $form->field($model, 'photo')->fileInput() ?> |
|
|
|
<?php |
|
|
|
if (strlen($model->photo)) { |
|
|
|
|
|
|
|
if(Yii::$app->getRequest()->serverName == 'localhost') |
|
|
|
$base_url = '../../frontend/web/' ; |
|
|
|
else |
|
|
|
$base_url = 'http://www.laboiteapain.net/' ; |
|
|
|
|
|
|
|
$base_url = Url::frontend() ; |
|
|
|
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 />'; |
|
|
|
} |