You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 line
1.7KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /* @var $this yii\web\View */
  5. /* @var $model common\models\User */
  6. $this->title = 'Paramètres';
  7. $this->params['breadcrumbs'][] = 'Paramètres';
  8. ?>
  9. <div class="user-update">
  10. <h1><?= Html::encode($this->title) ?></h1>
  11. <div class="user-form">
  12. <?php $form = ActiveForm::begin(); ?>
  13. <div class="col-md-6">
  14. <?= $form->field($model, 'code_postal') ?>
  15. <?= $form->field($model, 'ville') ?>
  16. <?= $form->field($model, 'description')->textarea(['rows' => 10]) ?>
  17. <div class="form-group">
  18. <?= Html::submitButton('Mettre à jour', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  19. </div>
  20. </div>
  21. <div class="col-md-6">
  22. <?= $form->field($model, 'logo')->fileInput() ?>
  23. <?php
  24. if (strlen($model->logo)) {
  25. echo '<img src="../../frontend/web/uploads/' . $model->logo . '" width="200px" /><br />';
  26. echo '<input type="checkbox" name="delete_logo" id="delete_logo" /> <label for="delete_logo">Supprimer le logo</label><br /><br />';
  27. }
  28. ?>
  29. <?= $form->field($model, 'photo')->fileInput() ?>
  30. <?php
  31. if (strlen($model->photo)) {
  32. echo '<img src="../../frontend/web/uploads/' . $model->photo . '" width="400px" /><br />';
  33. echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />';
  34. }
  35. ?>
  36. </div>
  37. <?php ActiveForm::end(); ?>
  38. </div>
  39. </div>