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.

signup.php 4.2KB

8 years ago
8 years ago
8 years ago
8 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 $form = ActiveForm::begin(['id' => 'form-signup','enableClientValidation'=> false]); ?>
  15. <?= $form->field($model, 'email') ?>
  16. <?= $form->field($model, 'password')->passwordInput() ?>
  17. <?= $form->field($model, 'nom') ?>
  18. <?= $form->field($model, 'prenom') ?>
  19. <?= $form->field($model, 'telephone') ?>
  20. <?php //$form->field($model, 'is_boulanger')->checkbox() ?>
  21. <div id="client-boulanger" class="btn-group" data-toggle="buttons">
  22. <label class="btn btn-default <?php if($model->option_client_boulanger == 'client' || !$model->option_client_boulanger): ?>active<?php endif; ?>">
  23. <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
  24. </label>
  25. <label class="btn btn-default <?php if($model->option_client_boulanger == 'boulanger'): ?>active<?php endif; ?>">
  26. <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 boulanger
  27. </label>
  28. </div>
  29. <div id="champs-boulanger">
  30. <?= $form->field($model, 'nom_magasin') ?>
  31. <?= $form->field($model, 'siret') ?>
  32. <?= $form->field($model, 'code_postal') ?>
  33. <?= $form->field($model, 'ville') ?>
  34. <?= $form->field($model, 'cgv')->checkbox()->label('J\'accepte les <a data-toggle="modal" data-target="#modal-cgv" href="javascript:void(0);">conditions générales de vente</a>') ?>
  35. </div>
  36. <div id="champs-client">
  37. <?= $form->field($model, 'id_etablissement')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
  38. <div id="bloc-code-acces">
  39. <?= $form->field($model, 'code',[
  40. 'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',
  41. ])
  42. ->label('Code')
  43. ->hint('Renseignez-vous auprès de votre boulangerie pour qu\'elle vous fournisse le code d\'accès') ; ?>
  44. </div>
  45. </div>
  46. <div class="form-group" id="boutons-inscrire">
  47. <?= Html::submitButton("S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
  48. </div>
  49. <?php ActiveForm::end(); ?>
  50. </div>
  51. </div>
  52. </div>
  53. <!-- CGV -->
  54. <div class="modal fade" id="modal-cgv" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  55. <div class="modal-dialog modal-lg" role="document">
  56. <div class="modal-content">
  57. <div class="modal-header">
  58. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  59. <h4 class="modal-title" id="myModalLabel">Conditions générales de vente</h4>
  60. </div>
  61. <div class="modal-body">
  62. <?= $this->render('_cgv_content.php'); ?>
  63. </div>
  64. <div class="modal-footer">
  65. <button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
  66. </div>
  67. </div>
  68. </div>
  69. </div>