templates/community/registration-form-setting.html.twig line 1

Open in your IDE?
  1. {% if app.user %}
  2.     {% if app.user.contact.avatar is defined and app.user.contact.avatar is not empty %}
  3.         {% set filelabel = sulu_resolve_media(app.user.contact.avatar.id, 'fr').fileVersion.name %}
  4.     {% else %}
  5.         {% set filelabel = 'Cliquez ici pour mettre une photo de profil' %}
  6.     {% endif %}
  7.     {% if app.user.contact.typologieActeur %}
  8.         {% set typologieActeurName = app.user.contact.typologieActeur.name %}
  9.     {% else %}
  10.         {% set typologieActeurName = '' %}
  11.     {% endif %}
  12.     {% if app.user.contact.typologieStructure %}
  13.         {% set typologieStructure = app.user.contact.typologieStructure.name %}
  14.     {% else %}
  15.         {% set typologieStructure = '' %}
  16.     {% endif %}
  17. {% else %}
  18.     {% set filelabel = 'Cliquez ici pour mettre une photo de profil' %}
  19.     {% set typologieActeurName = '' %}
  20.     {% set territoireIntervName = '' %}
  21.     {% set typologieStructure = '' %}
  22.     {% set type = 'profile' %}
  23. {% endif %}
  24. {% if formType is defined %}
  25.     {% set type = formType %}
  26. {% endif %}
  27. {% set liClass = "dflex w100 jcsb fwwrap" %}
  28. <div class="{{ type }}-form-container mlr-1em cblue">
  29.     {% if type is defined and type == "registration" %}
  30.         <div class="header-cont">
  31.             <h1 class="mb-0p5em">Inscription</h1>
  32.             <span class="lh24 mb-2em diblock">Pas encore membre de PQN-A ? Rien de plus simple ! Il suffit de créer votre espace personnel en 1 clic !</span>
  33.         </div>
  34.     {% endif %}
  35.     {% for message in app.flashes('error') %}
  36.         <div class="mb-10px">{{ message }}</div>
  37.     {% endfor %}
  38.     {{ form_start(form) }}
  39.     <div class="mes-informations br8 in">
  40.         {% include "articles/blocks/noscript.html.twig" %}
  41.         {% if type is defined and type == "registration" %}
  42.             <h2 class="fw400 fs36 lh40 mb-1em">Qui êtes-vous ?</h2>
  43.         {% else %}
  44.             <h2 class="fs24 fw400 lh32 mb-40px">Mes informations</h2>
  45.         {% endif %}
  46.         <ul>
  47.             <li class="{{liClass}}">
  48.                 {{ form_row(form.firstName) }}
  49.                 {{ form_row(form.lastName) }}
  50.             </li>
  51.             <li class="{{liClass}}">
  52.                 <div>
  53.                     {% if type == "registration" %}
  54.                         {{ form_errors(form.email) }}
  55.                         {{ form_widget(form.email) }}
  56.                     {% endif %}
  57.                     {{ form_label(form.mainEmail) }}
  58.                     {{ form_widget(form.mainEmail) }}
  59.                 </div>
  60.                 {{ form_row(form.number) }}
  61.             </li>
  62.             <li class="dflex jcsb fwwrap">
  63.                 {{ form_row(form.typologieActeurValue) }}
  64.                 <div id="autres-typologie-container">
  65.                     {% if form.typologieActeurValue.vars.value == "Autres" %}
  66.                         {{ form_label(form.autresTypologieActeur) }}
  67.                         {{ form_widget(form.autresTypologieActeur) }}
  68.                     {% endif %}
  69.                 </div>
  70.             </li>
  71.             <li class="dflex jcsb fwwrap">
  72.                 <div class="file-input-container prelative">
  73.                     <span class="fw400 fs14 lh20">
  74.                         Photo de profil
  75.                     </span>
  76.                     <div class="prelative">
  77.                         {{ form_row(form.avatar, {'label': filelabel}) }}
  78.                         <img src="/resources/img/paper-clip-icon.svg" alt="Profil" class="pabsolute" width="15" height="16">
  79.                     </div>
  80.                 </div>
  81.             </li>
  82.             <li class="dflex w100 fwwrap social-media-li">
  83.                 {{ form_row(form.socialMediaProfiles) }}
  84.             </li>
  85.             <li class="dflex w100 jcc">
  86.                 {{ form_row(form.submit) }}
  87.             </li>
  88.             {% if type is defined and type == "registration" %}
  89.                 {% include "community/block/info-oblig.html.twig" %}
  90.             {% endif %}
  91.         </ul>
  92.     </div>
  93.     <div class="mon-activite br8">
  94.         {% if type is defined and type == "registration" %}
  95.             <h2 class="fw400 fs36 lh40 mb-1em">Quel est votre travail ?</h2>
  96.         {% else %}
  97.             <h2 class="fs24 fw400 lh32 mb-40px">Mon activité</h2>
  98.         {% endif %}
  99.         <ul class="prelative">
  100.             {% if type is defined and type == "registration" %}
  101.                 <li>
  102.                     <button class="cblue fs16 lh24 pabsolute" id="previous1">
  103.                         Précédent
  104.                     </button>
  105.                 </li>
  106.             {% endif %}
  107.             <li class="{{liClass}}">
  108.                 {{ form_row(form.structure, {'attr': {'autocomplete': 'off'}}) }}
  109.                 <div id="structure-container">
  110.                     {{ form_row(form.structureText, {'value' : typologieStructure, 'attr': {'autocomplete': 'off'}}) }}
  111.                     <div>
  112.                         <label class="fw400 fs14 lh20"></label>
  113.                         <div id="registration_typologieStructure">
  114.                             {% for structure in form.typologieStructure %}
  115.                                 {{ form_label(structure, null, {
  116.                                     label_attr: {'tabindex': 0 },
  117.                                     'attr': {'autocomplete': 'off'}
  118.                                 }) }}
  119.                             {% endfor %}
  120.                         </div>
  121.                         <div class="hidden" id="structureRadioContainer">
  122.                             {% for structure in form.typologieStructure %}
  123.                                 {{ form_widget(structure) }}
  124.                             {% endfor %}
  125.                         </div>
  126.                     </div>
  127.                 </div>
  128.             </li>
  129.             <li class="{{liClass}}">
  130.                 {{ form_row(form.street) }}
  131.                 {{ form_row(form.city) }}
  132.             </li>
  133.             <li class="{{liClass}}">
  134.                 {{ form_row(form.zip) }}
  135.                 <div id="fonction-container">
  136.                     {% if form.fonction.vars.data is defined and form.fonction.vars.data is not empty %}
  137.                         {% set fonctionId = form.vars.id ~ '_fonction' %}
  138.                         <label for="{{fonctionId}}" class="fw400 fs14 lh20 required">{{ field_label(form.fonction) }}</label>
  139.                         <select name="{{ field_name(form.fonction) }}" id="{{fonctionId}}" data-value="{{form.fonction.vars.data}}">
  140.                             {% for label, value in field_choices(form.fonction) %}
  141.                                 <option value="{{ value }}" {% if value == form.fonction.vars.data %} selected {% endif %}>{{ label }}</option>
  142.                             {% endfor %}
  143.                         </select>
  144.                     {% endif %}
  145.                 </div>
  146.             </li>
  147.             <li class="{{liClass}}">
  148.                 {{ form_row(form.fonction_desc) }}
  149.             </li>
  150.             <li class="{{liClass}}">
  151.                 <div id="departement-container">
  152.                     {% set fonctionId = form.vars.id ~ '_departement' %}
  153.                     <label for="{{fonctionId}}" class="fw400 fs14 lh20 required">{{ field_label(form.departement) }}</label>
  154.                     <select name="{{ field_name(form.departement) }}" id="{{fonctionId}}" data-value="{{form.departement.vars.value}}" {% if app.user and app.user.contact.territoireInterv is not empty %} data-territoire="{{app.user.contact.territoireInterv.id}}" {% endif %}>
  155.                         <option value="">Aucun</option>
  156.                         {% for label, value in field_choices(form.departement) %}
  157.                             <option value="{{ value }}" {% if value == form.departement.vars.value %} selected {% endif %}>{{ label }}</option>
  158.                         {% endfor %}
  159.                     </select>
  160.                 </div>
  161.             </li>
  162.             <li class="{{liClass}} note-container">
  163.                 {{ form_row(form.note) }}
  164.             </li>
  165.             <li class="dflex w100 jcsb fdc fwwrap">
  166.                 <label class="fw400 fs14 lh20">
  167.                     Thématiques d'intervention et d'intérêt*
  168.                 </label>
  169.                 <div class="thematique-container fwwrap nolimit" id="thematique-container">
  170.                     {% for child in form.thematiques %}
  171.                         <div class="thematique-row">
  172.                             {{ form_widget(child) }}
  173.                             {{ form_label(child, null, {translation_domain: 'fr'}) }}
  174.                         </div>
  175.                     {% endfor %}
  176.                 </div>
  177.             </li>
  178.             <li class="dflex w100 jcsb fdc fwwrap">
  179.                 <label class="fw400 fs14 lh20">
  180.                     Abonnements aux lettres d’infos sur les sujets
  181.                 </label>
  182.                 <div class="thematique-container fwwrap nolimit" id="thematique-container">
  183.                     {% for child in form.optins %}
  184.                         <div class="thematique-row">
  185.                             {{ form_widget(child) }}
  186.                             {{ form_label(child, null, {translation_domain: 'fr'}) }}
  187.                         </div>
  188.                     {% endfor %}
  189.                 </div>
  190.             </li>
  191.             <li class="dflex w100 jcc">
  192.                 {{ form_row(form.submit2) }}
  193.             </li>
  194.             {% if type is defined and type == "registration" %}
  195.                 {% include "community/block/info-oblig.html.twig" %}
  196.             {% endif %}
  197.         </ul>
  198.     </div>
  199.     <div class="reset-password br8">
  200.         {% if type is defined and type == "registration" %}
  201.             <h2 class="fw400 fs36 lh40 mb-1em">Confidentialité</h2>
  202.         {% else %}
  203.             <h2 class="fs24 fw400 lh32 mb-40px">Modifier mon mot de passe</h2>
  204.         {% endif %}
  205.         <ul class="prelative">
  206.             {% if type is defined and type == "registration" %}
  207.                 <li>
  208.                     <button class="cblue fs16 lh24 pabsolute" id="previous2">
  209.                         Précédent
  210.                     </button>
  211.                 </li>
  212.             {% endif %}
  213.             <li class="{{liClass}}">
  214.                 <div class="prelative" id="firstpassword-container">
  215.                     {{ form_label(form.plainPassword.first) }}
  216.                     {{ form_widget(form.plainPassword.first) }}
  217.                     {% if type is defined and type == "registration" %}
  218.                         <button class="pabsolute showpass" id="showpass1">{{ source("/svg/eye-icon.html.twig") }}</button>
  219.                     {% endif %}
  220.                 </div>
  221.                 <div class="prelative">
  222.                     {{ form_label(form.plainPassword.second) }}
  223.                     {{ form_widget(form.plainPassword.second) }}
  224.                     {% if type is defined and type == "registration" %}
  225.                         <button class="pabsolute showpass" id="showpass2">{{ source("/svg/eye-icon.html.twig") }}</button>
  226.                     {% endif %}
  227.                 </div>
  228.             </li>
  229.             {% if type is defined and type == "registration" %}
  230.                 <li class="{{liClass}}">
  231.                     {{ form_row(form.visibleAnnuaire) }}
  232.                 </li>
  233.                 <li class="dflex w100 fwwrap terms">
  234.                     <div>
  235.                         {{ form_widget(form.terms) }}
  236.                         {{ form_label(form.terms) }}
  237.                     </div>
  238.                     <span class="fw400 fs14 lh20">Voir la
  239.                         <a href="/politique-de-confidentialite" class="cblue">politique de confidentialité</a>
  240.                     </span>
  241.                     {{ form_errors(form.terms) }}
  242.                 </li>
  243.             {% endif %}
  244.             {% if type is defined and type == "registration" %}
  245.                 {{ form_row(form.recaptcha) }}
  246.             {% endif %}
  247.             <li class="dflex w100 fdc aic mt-1em">
  248.                 {{ form_row(form.submit3) }}
  249.             </li>
  250.             {% if type is defined and type == "registration" %}
  251.                 {% include "community/block/info-oblig.html.twig" %}
  252.             {% endif %}
  253.         </ul>
  254.     </div>
  255.     {{ form_row(form._token) }}
  256.     {{ form_end(form, {render_rest: false}) }}
  257.     {% if type is defined and type == "profile" %}
  258.         <div class="center mb-40px">
  259.             <a href="{{ path('sulu_community.logout') }}" class="deconnect">Déconnexion</a>
  260.         </div>
  261.     {% endif %}
  262. </div>