{% extends 'FrontCommun/base.html.twig' %}{% block stylesheets %} {{ parent() }} <link href="{{ asset('assets-commun/login/style.css') }}" rel="stylesheet" type="text/css"/> <style> span.form_errors { font-size: 12px; color: red; text-align: center; } .not_confirm_password { border: 2px solid red !important; } .confirm_password { border: 2px solid green !important; } .form-horizontal .form-group { margin-right: 0; margin-left: 0 } .fxt-template-layout33 .fxt-form-content .fxt-inner-wrap { max-width: initial !important; width: 100%; } .fxt-template-layout33 .fxt-heading-content:before { background-image: url(' {{ domaineBack("DOMAINE_BACK") }}{{'/file_manager/source/login/login.png'}}'); } .fxt-template-layout33 .fxt-form-content .fxt-description { text-align: left; } </style>{% endblock %}{% block body %} <section class="fxt-template-animation0 fxt-template-layout33"> <div class="fxt-content-wrap"> <div class="fxt-heading-content"> </div> <div class="fxt-form-content"> <div class="fxt-main-form"> <div class="fxt-inner-wrap fxt-opacity fxt-transition-delay-13"> <div class="fxt-transformX-R-50 fxt-transition-delay-10"> <a href="/" class="fxt-logo"><img src="{{ src_logo }}" alt="Logo"></a> </div> <div class="fxt-transformX-R-50 fxt-transition-delay-10"> {% for article in ArticlesElement().desktop %} {% if article.code=="login" %} {% for ele in article.elements %} {{ ele.texte|raw}} {% endfor %} {% endif %} {% endfor %} </div> <h2 class="fxt-page-title"> {{ "S'inscrire"|trans}}</h2> <div class=" login-block"> {{ form_start(form,{attr:{id:'form-subscribe'}}) }} <div class="row hp-field"> <div class="col-md-4 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Téléphone commercial"|trans }} </label> {{ form_widget(form.tel2) }} </div> </div> <div class="col-md-4 col-sm-12 col-xs-12"> <div class="form-group"> <label class="control-label"> {{ "Email commercial"|trans }} </label> {{ form_widget(form.emailAgence) }} </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Registre de commerce"|trans }} </label> {{ form_widget(form.registre) }} </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Pattente"|trans }} </label> {{ form_widget(form.pattente) }} </div> </div> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="form-group"> <label class="control-label"> {{ "Commentaire"|trans }} </label> {{ form_widget(form.message) }} </div> </div> </div> <div class="row"> <div class="col-md-4 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Nom de la société"|trans }} (*) </label> {{ form_widget(form.nomagence) }} </div> </div> <div class="col-md-4 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Nom du contact"|trans }} (*) </label> {{ form_widget(form.nomprenom) }} </div> </div> <div class="col-md-4 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Téléphone"|trans }} (*) </label> {{ form_widget(form.tel) }} </div> </div> </div> <div class="row"> {% set col_md = form.bureau is defined ? 4 : 6 %} <div class="col-md-{{ col_md }}"> <div class="form-group"> <label class="control-label">{{ "Pays"|trans }} (*)</label> {{ form_widget(form.pays) }} </div> </div> <div class="col-md-{{ col_md }}"> <div class="form-group"> <label class="control-label">{{ "Ville"|trans }} (*)</label> {{ form_widget(form.ville) }} </div> </div> {% if form.bureau is defined %} <div class="col-md-4"> <div class="form-group"> <label class="control-label">{{ "Bureau"|trans }} (*)</label> {{ form_widget(form.bureau) }} </div> </div> {% endif %} <div class="col-md-6"> <div class="form-group"> <label class="control-label"> {{ "Adresse"|trans }} </label> {{ form_widget(form.adresse) }} </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"> {{ "Logo"|trans }} </label> {{ form_widget(form.file) }} </div> </div> </div> <div class="row"> <div class="col-md-6 col-sm-12 col-xs-12"> <div class="form-group"> <label class="control-label"> {{ "Email"|trans }} (*) </label> {{ form_widget(form.email) }} </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group"> <label class="control-label"> {{ "Login"|trans }} (*) </label> {{ form_widget(form.login) }} </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group has-feedback"> <label class="control-label"> {{ "Mot de passe"|trans }} (*) </label> {{ form_widget(form.password) }} <span class="glyphicon glyphicon-eye-close form-control-feedback view-password" onclick="viewPassword($(this))"></span> </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group has-feedback"> <label class="control-label"> {{ "Confirmez votre mot de passe"|trans }} (*) </label> {{ form_widget(form.confirmpass) }} <span class="glyphicon glyphicon-eye-close form-control-feedback view-password" onclick="viewPassword($(this))"></span> </div> </div> </div> {% if configAffichage!= null and configAffichage.GENERALE.RECAPTCHA_FORM is defined and configAffichage.GENERALE.RECAPTCHA_FORM == 'oui' %} {% if agence is defined and agence.recaptcha is defined and agence.recaptcha != '' %} <div class="form-group"> <div class="g-recaptcha" data-sitekey="{{ agence.recaptcha }}" data-callback="onSubmit" data-expired-callback="onExpired" data-action="submit"> </div> </div> <br> {% endif %} {% endif %} <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <button type="submit" class="fxt-btn-fill hideBtn" id="submit-validate" style="padding: 8px 15px !important;">s'inscrire </button> </div> <div id="flash-message" class="alert alert-danger" style="display:none;"> ⏰ Votre vérification a expiré. Veuillez la recommencer. </div> </div> {{ form_widget(form.type) }} {{ form_widget(form._token) }} <input type="hidden" name="js_ok" value="0"> {{ form_end(form, {'render_rest': false}) }} </div> </div> </div> </div> </div> </section>{% endblock %}{% block javascripts %} {{ parent() }} <script type="text/javascript" src="{{ asset('assets-commun/login/js/imagesloaded.pkgd.min.js') }}"></script> <script type="text/javascript" src="{{ asset('assets-commun/login/js/validator.min.js') }}"></script> <script type="text/javascript" src="{{ asset('assets-commun/login/js/main.js') }}"></script>{% endblock %}{% block jquery %} <script> document.querySelector('[name=js_ok]').value = "1"; {% for flashError in app.flashes('verify_email_error') %} viewAlert("{{ flashError }}", 'danger'); {% endfor %} function validateGSM(e) { e.val(e.val().replace(/[^0-9 ]/g, '')) } $('#form_tel').change(function () { validateGSM($(this)) }) $('#form_tel').keyup(function () { validateGSM($(this)) }) function viewPassword(e) { e.toggleClass('glyphicon-eye-close').toggleClass('glyphicon-eye-open').toggle(e.prev().val() !=''); if (e.prev().attr('type') === "password") e.prev().attr('type', 'text'); else e.prev().attr('type', 'password'); } $('.view-password').prev().on('input',function(){ $(this).next().toggle($(this).val() !='') }) $('#bureau').attr('required',true) </script> {% if configAffichage!= null and configAffichage.GENERALE.RECAPTCHA_FORM is defined and configAffichage.GENERALE.RECAPTCHA_FORM == 'oui' and agence is defined and agence.recaptcha is defined and agence.recaptcha != '' %} <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script type="text/javascript"> const submitButton = document.querySelector('button[type="submit"]'); submitButton.classList.add("disabled"); function onSubmit(token) { console.log("reCAPTCHA validé !"); document.getElementById("flash-message").style.display = "none"; submitButton.classList.remove('disabled'); submitButton.disabled = false; // Ensure the button is not disabled } function onExpired() { document.getElementById("flash-message").style.display = "block"; // Désactiver le bouton Submit dans la fonction onExpired submitButton.classList.add("disabled"); submitButton.disabled = true; grecaptcha.reset(); } window.onload = function () { var $recaptcha = document.querySelector('#g-recaptcha-response'); if ($recaptcha) { $recaptcha.setAttribute("required", "required"); } }; $('#form-subscribe').submit(function () { $('[name="g-recaptcha-response"]').remove() }) </script> {% endif %}{% endblock %}