- <?php
-
-
-
- use domain\Config\TaxRate\TaxRate;
- use yii\bootstrap\ActiveForm;
- use yii\helpers\ArrayHelper;
- use yii\helpers\Html;
-
- $this->setTitle('Inscription') ;
- $this->setMeta('description', 'Inscrivez-vous en tant que client ou producteur afin de profiter des fonctionnalités du logiciel.');
-
- $this->params['breadcrumbs'][] = $this->title;
-
- ?>
- <div class="site-signup">
-
- <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: ?>
-
- <?= $this->render('_signup_sponsorship_message.php', [
- 'sponsorshipProducerFrom' => $sponsorshipProducerFrom
- ]); ?>
-
- <?php $form = ActiveForm::begin(['id' => 'form-signup', 'enableClientValidation'=> false]); ?>
- <?= $form->field($model, 'email') ?>
- <?= $form->field($model, 'password')->passwordInput() ?>
- <?= $form->field($model, 'lastname') ?>
- <?= $form->field($model, 'name') ?>
- <?= $form->field($model, 'phone') ?>
-
- <div id="user-producer" class="btn-group" role="group" aria-label="Basic radio toggle button group">
- <input id="option-user" class="btn-check" type="radio" name="SignupForm[option_user_producer]" value="user" id="option-user" autocomplete="off" <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>checked<?php endif; ?>>
- <label for="option-user" class="btn btn-secondary label-user <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>active<?php endif; ?>">Je suis client</label>
-
- <?php if($this->getProducerModule()->getManager()->isProducerSignupOpen()): ?>
- <input id="option-producer" class="btn-check" type="radio" name="SignupForm[option_user_producer]" value="producer" id="option-producer" autocomplete="off" <?php if($model->option_user_producer == 'producer'): ?>checked<?php endif; ?>>
- <label for="option-producer" class="btn btn-secondary label-producer <?php if($model->option_user_producer == 'producer'): ?>active<?php endif; ?>">Je suis producteur</label>
- <?php endif; ?>
- </div>
-
- <div id="fields-producer">
- <?= $form->field($model, 'name_producer') ?>
- <?= $form->field($model, 'type')->textInput(['placeholder' => 'Boulangerie, brasserie, ferme ...']); ?>
- <?= $form->field($model, 'postcode') ?>
- <?= $form->field($model, 'city') ?>
- <?= $form->field($model, 'id_tax_rate_default')
- ->dropDownList(ArrayHelper::map(TaxRate::find()->all(), 'id', function($model) { return $model->name; }), [
- 'prompt' => '--',
- ])
- ->label('TVA à appliquer par défaut'); ?>
- <?= $form->field($model, 'cgv')->checkbox()->label('J\'accepte les <button type="button" class="btn btn-sm btn-secondary btn-modal-cgv" data-bs-toggle="modal" data-bs-target="#modal-cgv">conditions générales de service</button> et les <button type="button" class="btn btn-sm btn-secondary btn-modal-prices" data-bs-toggle="modal" data-bs-target="#modal-prices">conditions tarifaires</button>') ?>
- </div>
- <div id="fields-user">
- <?= $form->field($model, 'id_producer')
- ->dropDownList($dataProducers, ['prompt' => '--','encode' => false,'options' => $optionsProducers]) ?>
- <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 class="block-newsletter">
- <?= $form->field($model, 'newsletter')
- ->hint(Yii::$app->parameterBag->get('newsletterProducerDescription'))
- ->checkbox() ?>
- </div>
- </div>
-
- <div class="block-newsletter">
- <?= $form->field($model, 'newsletter_souke')
- ->hint(Yii::$app->parameterBag->get('newsletterSoukeDescription'))
- ->checkbox() ?>
- </div>
-
- <?= $form->field($model, 'verifyCode')->widget(\yii\captcha\Captcha::className(), [
- 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
- ]) ?>
- <?= $form->field($model, 'is_test')->hiddenInput() ?>
-
- <div class="form-group form-buttons" id="buttons-signup">
- <?= Html::submitButton("<i class=\"bi bi-person-plus\"></i> S'inscrire", ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
- </div>
- <p class="need-help-login-signup">
- Besoin d'aide ? <a href="<?= Yii::$app->urlManager->createUrl(['site/contact']) ?>">Contactez-nous</a>
- </p>
- <?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">
- <h4 class="modal-title" id="myModalLabel">Conditions générales de service</h4>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
- </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 -->
- <div class="modal fade" id="modal-prices" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h4 class="modal-title" id="myModalLabel">Tarifs</h4>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
- </div>
- <div class="modal-body">
- <?= $this->render('../site/_prices_producer', ['dataProviderPrices' => $dataProviderPrices, 'paidFeaturesArray' => $paidFeaturesArray]); ?>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
- </div>
- </div>
- </div>
- </div>
|