- <?php
-
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
-
- /* @var $this yii\web\View */
- /* @var $model common\models\User */
-
- $this->title = 'Paramètres';
- $this->params['breadcrumbs'][] = 'Paramètres';
- ?>
- <div class="user-update">
-
- <h1><?= Html::encode($this->title) ?></h1>
-
- <div class="user-form">
- <?php $form = ActiveForm::begin(); ?>
- <div class="">
- <?= $form->field($model, 'code_postal') ?>
- <?= $form->field($model, 'ville') ?>
- <?php //$form->field($model, 'description')->textarea(['rows' => 10]) ?>
- <?= $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/' ;
-
- 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 />';
- }
- ?>
- <div class="form-group">
- <?= Html::submitButton('Mettre à jour', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
- </div>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
-
- </div>
-
-
-
|