Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

90 lines
5.1KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\bootstrap\ActiveForm;
  4. /* @var $this yii\web\View */
  5. /* @var $form yii\bootstrap\ActiveForm */
  6. /* @var $model \frontend\models\SignupForm */
  7. $this->title = 'Inscription';
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="site-signup">
  11. <h1 class="title-systeme-commande"><span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<?= Html::encode($this->title) ?></h1>
  12. <div class="row">
  13. <div class="col-lg-5">
  14. <?php if(YII_ENV == 'demo'): ?>
  15. <div class="alert alert-warning">
  16. Les inscriptions sont désactivées sur l'espace de démonstration. Utilisez
  17. les identifiants indiqués sur la page de <?= Html::a('connexion', Yii::$app->urlManager->createUrl(['site/login'])); ?> pour vous identifier.
  18. </div>
  19. <?php else: ?>
  20. <?php $form = ActiveForm::begin(['id' => 'form-signup','enableClientValidation'=> false]); ?>
  21. <?= $form->field($model, 'email') ?>
  22. <?= $form->field($model, 'password')->passwordInput() ?>
  23. <?= $form->field($model, 'nom') ?>
  24. <?= $form->field($model, 'prenom') ?>
  25. <?= $form->field($model, 'telephone') ?>
  26. <?php //$form->field($model, 'is_boulanger')->checkbox() ?>
  27. <div id="client-boulanger" class="btn-group" data-toggle="buttons">
  28. <label class="btn btn-default <?php if($model->option_client_boulanger == 'client' || !$model->option_client_boulanger): ?>active<?php endif; ?>">
  29. <input type="radio" name="SignupForm[option_client_boulanger]" value="client" id="option-client" autocomplete="off" <?php if($model->option_client_boulanger == 'client' || !$model->option_client_boulanger): ?>checked<?php endif; ?>> Je suis client
  30. </label>
  31. <label class="btn btn-default <?php if($model->option_client_boulanger == 'boulanger'): ?>active<?php endif; ?>">
  32. <input type="radio" name="SignupForm[option_client_boulanger]" value="boulanger" id="option-boulanger" autocomplete="off" <?php if($model->option_client_boulanger == 'boulanger'): ?>checked<?php endif; ?>> Je suis producteur
  33. </label>
  34. </div>
  35. <div id="champs-boulanger">
  36. <?= $form->field($model, 'nom_magasin') ?>
  37. <?= $form->field($model, 'type')->textInput(['placeholder' => 'Boulangerie, brasserie, ferme ...']); ?>
  38. <?= $form->field($model, 'siret') ?>
  39. <?= $form->field($model, 'code_postal') ?>
  40. <?= $form->field($model, 'ville') ?>
  41. <?= $form->field($model, 'cgv')->checkbox()->label('J\'accepte les <a class="btn btn-xs btn-default" data-toggle="modal" data-target="#modal-cgv" href="javascript:void(0);">conditions générales de service</a> et les <a class="btn btn-xs btn-default" data-toggle="modal" data-target="#modal-tarifs" href="javascript:void(0);">conditions tarifaires</a> (prix libre).') ?>
  42. </div>
  43. <div id="champs-client">
  44. <?= $form->field($model, 'id_etablissement')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
  45. <div id="bloc-code-acces">
  46. <?= $form->field($model, 'code',[
  47. 'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',
  48. ])
  49. ->label('Code')
  50. ->hint('Renseignez-vous auprès de votre producteur pour qu\'il vous fournisse le code d\'accès') ; ?>
  51. </div>
  52. </div>
  53. <div class="form-group" id="boutons-inscrire">
  54. <?= Html::submitButton("S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
  55. </div>
  56. <?php ActiveForm::end(); ?>
  57. <?php endif; ?>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- CGV -->
  62. <div class="modal fade" id="modal-cgv" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  63. <div class="modal-dialog modal-lg" role="document">
  64. <div class="modal-content">
  65. <div class="modal-header">
  66. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  67. <h4 class="modal-title" id="myModalLabel">Conditions générales de service</h4>
  68. </div>
  69. <div class="modal-body">
  70. <?= $this->render('_cgv_content.php'); ?>
  71. </div>
  72. <div class="modal-footer">
  73. <button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <!-- Tarifs -->
  79. <?= $this->render('../site/_tarifs_producteur'); ?>