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.

etablissement.php 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. use yii\helpers\Html ;
  8. use yii\bootstrap\ActiveForm;
  9. $this->title = 'Producteur '.Html::encode($etablissement->nom) ;
  10. ?>
  11. <div id="page-etablissement">
  12. <h1 class="title-systeme-commande"><?= Html::encode($etablissement->nom) ?></h1>
  13. <p class="info"><span class="alert alert-warning">Veuillez vous connecter pour réserver les produits de cet établissement.</span></p>
  14. <?php if(isset($etablissement->photo) && strlen($etablissement->photo)): ?>
  15. <!--<img class="img-back" width="200px" height="auto" src="./uploads/<?= $etablissement->photo ?>" />-->
  16. <?php endif; ?>
  17. <div class="col-md-6">
  18. <h2>Connexion</h2>
  19. <?php $form = ActiveForm::begin(['id' => 'login-form','enableClientValidation'=> false]); ?>
  20. <?= $form->field($model_login, 'email') ?>
  21. <?= $form->field($model_login, 'password')->passwordInput() ?>
  22. <?= $form->field($model_login, 'rememberMe')->checkbox() ?>
  23. <p>
  24. Si vous avez oublié votre mot de passe, vous pouvez le <?= Html::a('réinitialiser', ['site/request-password-reset']) ?>.
  25. </p>
  26. <div class="form-group">
  27. <?= Html::submitButton('Connexion', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
  28. </div>
  29. <?php ActiveForm::end(); ?>
  30. </div>
  31. <div class="col-md-6">
  32. <h2>Inscription</h2>
  33. <?php $form = ActiveForm::begin(['id' => 'form-signup','enableClientValidation'=> false]); ?>
  34. <?= $form->field($model_signup, 'email') ?>
  35. <?= $form->field($model_signup, 'password')->passwordInput() ?>
  36. <?= $form->field($model_signup, 'nom') ?>
  37. <?= $form->field($model_signup, 'prenom') ?>
  38. <?= $form->field($model_signup, 'telephone') ?>
  39. <?php //$form->field($model, 'is_boulanger')->checkbox() ?>
  40. <?php if(strlen($etablissement->code)): ?>
  41. <?= $form->field($model_signup, 'code',[
  42. 'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',
  43. ])
  44. ->label('Code')
  45. ->hint('Renseignez-vous auprès de votre producteur pour qu\'il vous fournisse le code d\'accès') ; ?>
  46. <?php endif; ?>
  47. <div class="form-group" id="boutons-inscrire">
  48. <?= Html::submitButton("S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
  49. </div>
  50. <?php ActiveForm::end(); ?>
  51. </div>
  52. </div>