|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- use yii\helpers\Html;
- use yii\bootstrap\ActiveForm;
-
- /* @var $this yii\web\View */
- /* @var $form yii\bootstrap\ActiveForm */
- /* @var $model \frontend\models\SignupForm */
-
- $this->title = 'Inscription';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="site-signup">
- <h1 class="title-systeme-commande"><span class="glyphicon glyphicon-user"></span> <?= Html::encode($this->title) ?></h1>
-
- <div class="row">
- <div class="col-lg-5">
- <?php if(YII_ENV == 'demo'): ?>
- <div class="alert alert-warning">
- Les inscriptions sont désactivées sur l'espace de démonstration. Utilisez
- les identifiants indiqués sur la page de <?= Html::a('connexion', Yii::$app->urlManager->createUrl(['site/login'])); ?> pour vous identifier.
- </div>
- <?php else: ?>
- <?php $form = ActiveForm::begin(['id' => 'form-signup','enableClientValidation'=> false]); ?>
- <?= $form->field($model, 'email') ?>
- <?= $form->field($model, 'password')->passwordInput() ?>
- <?= $form->field($model, 'nom') ?>
- <?= $form->field($model, 'prenom') ?>
- <?= $form->field($model, 'telephone') ?>
- <?php //$form->field($model, 'is_boulanger')->checkbox() ?>
-
- <div id="client-boulanger" class="btn-group" data-toggle="buttons">
- <label class="btn btn-default <?php if($model->option_client_boulanger == 'client' || !$model->option_client_boulanger): ?>active<?php endif; ?>">
- <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
- </label>
- <label class="btn btn-default <?php if($model->option_client_boulanger == 'boulanger'): ?>active<?php endif; ?>">
- <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
- </label>
- </div>
-
- <div id="champs-boulanger">
- <?= $form->field($model, 'nom_magasin') ?>
- <?= $form->field($model, 'siret') ?>
- <?= $form->field($model, 'code_postal') ?>
- <?= $form->field($model, 'ville') ?>
- <?= $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).') ?>
- </div>
- <div id="champs-client">
- <?= $form->field($model, 'id_etablissement')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
- <div id="bloc-code-acces">
- <?= $form->field($model, 'code',[
- 'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',
-
- ])
- ->label('Code')
- ->hint('Renseignez-vous auprès de votre producteur pour qu\'il vous fournisse le code d\'accès') ; ?>
- </div>
- </div>
-
- <div class="form-group" id="boutons-inscrire">
- <?= Html::submitButton("S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
- </div>
- <?php ActiveForm::end(); ?>
- <?php endif; ?>
-
-
- </div>
- </div>
- </div>
-
- <!-- CGV -->
- <div class="modal fade" id="modal-cgv" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title" id="myModalLabel">Conditions générales de service</h4>
- </div>
- <div class="modal-body">
- <?= $this->render('_cgv_content.php'); ?>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
- </div>
- </div>
- </div>
- </div>
-
- <!-- Tarifs -->
- <?= $this->render('../site/_tarifs_boulanger'); ?>
|