templates/user/ask_password.html.twig line 1

Open in your IDE?
  1. {% extends "base_security.html.twig" %}
  2. {% block fos_user_title %}
  3.     <h4 class="auth-header">{{ 'menu.init_reset_password' | trans }}</h4>
  4. {% endblock fos_user_title %}
  5. {% block fos_user_content %}
  6.     <div class="container">
  7.         <div class="comoros-flag-animation">
  8.             <div class="flag-wave">
  9.                 <svg viewBox="0 0 600 400" xmlns="http://www.w3.org/2000/svg">
  10.                     <!-- Drapeau des Comores animé -->
  11.                     <defs>
  12.                         <linearGradient id="waveGrad" x1="0%" y1="0%" x2="100%" y2="0%">
  13.                             <stop offset="0%" style="stop-color:#3b6e2c;stop-opacity:1" />
  14.                             <stop offset="50%" style="stop-color:#ffffff;stop-opacity:1" />
  15.                             <stop offset="100%" style="stop-color:#cf0921;stop-opacity:1" />
  16.                         </linearGradient>
  17.                         <filter id="shadow">
  18.                             <feDropShadow dx="2" dy="4" stdDeviation="3" flood-opacity="0.3"/>
  19.                         </filter>
  20.                     </defs>
  21.                     
  22.                     <!-- Bande jaune (lune et étoiles) -->
  23.                     <rect x="0" y="0" width="600" height="400" fill="#f3c300"/>
  24.                     
  25.                     <!-- Bandes horizontales -->
  26.                     <rect x="80" y="0" width="520" height="80" fill="#3b6e2c"/>
  27.                     <rect x="80" y="80" width="520" height="80" fill="#ffffff"/>
  28.                     <rect x="80" y="160" width="520" height="80" fill="#cf0921"/>
  29.                     <rect x="80" y="240" width="520" height="160" fill="#f3c300"/>
  30.                     
  31.                     <!-- Triangle blanc -->
  32.                     <polygon points="0,0 120,0 120,400 0,400" fill="#ffffff"/>
  33.                     
  34.                     <!-- Triangle vert -->
  35.                     <polygon points="0,0 100,0 100,400 0,400" fill="#3b6e2c"/>
  36.                     
  37.                     <!-- Croissant et étoiles -->
  38.                     <g class="moon-stars" filter="url(#shadow)">
  39.                         <!-- Croissant de lune -->
  40.                         <circle cx="55" cy="200" r="35" fill="#f3c300"/>
  41.                         <circle cx="70" cy="195" r="28" fill="#3b6e2c"/>
  42.                         
  43.                         <!-- 4 étoiles -->
  44.                         <polygon points="45,120 48,130 58,130 50,136 53,146 45,140 37,146 40,136 32,130 42,130" fill="#ffffff" class="star1"/>
  45.                         <polygon points="85,280 88,290 98,290 90,296 93,306 85,300 77,306 80,296 72,290 82,290" fill="#ffffff" class="star2"/>
  46.                         <polygon points="25,300 28,310 38,310 30,316 33,326 25,320 17,326 20,316 12,310 22,310" fill="#ffffff" class="star3"/>
  47.                         <polygon points="95,140 98,150 108,150 100,156 103,166 95,160 87,166 90,156 82,150 92,150" fill="#ffffff" class="star4"/>
  48.                     </g>
  49.                 </svg>
  50.             </div>
  51.         </div>
  52.         <div class="form-text text-md-center">
  53.             <em>
  54.                 {{ 'menu.information_for_reset_password_with_tag' | trans({'%tag_br%': '<br/>'}) | raw }}
  55.             </em>
  56.         </div>
  57.         <form action="{{ path('register_ask_new_password') }}" method="POST" class="fos_user_resetting_request">
  58.             {{ form_widget(form._token) }}
  59.             <div class="form-group">
  60.                 <label for="">{{ 'menu.login_phone' | trans }}*</label>
  61.                 {{ form_widget(form.phone) }}
  62.                 <div class="pre-icon os-icon os-icon-user-male-circle"></div>
  63.             </div>
  64.             <div class="form-group">
  65.                 <label for="">{{ 'menu.optional_email' | trans }}</label>
  66.                 {{ form_widget(form.email) }}
  67.                 <div class="pre-icon os-icon os-icon-email-forward"></div>
  68.             </div>
  69.             <div class="form-group">
  70.                 <label for="">{{ 'menu.verification_code' | trans }}</label>
  71.                 {{ form_widget(form.validCode, { 'value': '' }) }}
  72.                 <div class="pre-icon os-icon os-icon-fingerprint"></div>
  73.             </div>
  74.             <div class="multi_submit">
  75.                 <input id="submit_change_password" class="btn btn-primary" type="submit" value="Initialiser" />
  76.                 <a class="btn btn-primary" href="{{ path('logout') }}">{{ 'menu.cancel' | trans }}</a>
  77.             </div>
  78.         </form>
  79.     </div>
  80. {% endblock fos_user_content %}
  81. {% block stylesheets %}
  82.     {{ parent() }}
  83.     <style>
  84.         /* ============================================
  85.            CADRE RECTANGLE - LARGEUR RÉDUITE
  86.            ============================================ */
  87.         
  88.         /* Cadre rectangle plus petit */
  89.         .auth-box-w {
  90.             max-width: 380px !important;
  91.             width: 100% !important;
  92.             margin: 30px auto !important;
  93.             padding: 25px 28px 30px 28px !important;
  94.             border-radius: 16px !important;
  95.             background: white !important;
  96.             box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
  97.             border: 1px solid #ddd !important;
  98.             position: relative !important;
  99.             z-index: 2 !important;
  100.         }
  101.         
  102.         /* Centrage de la carte */
  103.         .auth-wrapper {
  104.             display: flex !important;
  105.             justify-content: center !important;
  106.             align-items: center !important;
  107.             min-height: 100vh !important;
  108.             background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  109.             position: relative !important;
  110.             overflow: hidden !important;
  111.         }
  112.         
  113.         /* Animation du drapeau comorien en arrière-plan */
  114.         .comoros-flag-animation {
  115.             position: fixed !important;
  116.             top: 0 !important;
  117.             left: 0 !important;
  118.             width: 100% !important;
  119.             height: 100% !important;
  120.             z-index: 1 !important;
  121.             pointer-events: none !important;
  122.             overflow: hidden !important;
  123.         }
  124.         
  125.         .flag-wave {
  126.             position: absolute !important;
  127.             top: 50% !important;
  128.             left: 50% !important;
  129.             transform: translate(-50%, -50%) scale(0.8) !important;
  130.             width: 600px !important;
  131.             height: 400px !important;
  132.             opacity: 0.15 !important;
  133.             animation: floatFlag 8s ease-in-out infinite, rotateFlag 20s linear infinite !important;
  134.         }
  135.         
  136.         .flag-wave svg {
  137.             width: 100% !important;
  138.             height: 100% !important;
  139.             animation: waveFlag 3s ease-in-out infinite !important;
  140.         }
  141.         
  142.         /* Animation des étoiles */
  143.         .star1 {
  144.             animation: starGlow 2s ease-in-out infinite;
  145.             transform-origin: 45px 140px;
  146.         }
  147.         
  148.         .star2 {
  149.             animation: starGlow 2.5s ease-in-out infinite 0.5s;
  150.             transform-origin: 85px 300px;
  151.         }
  152.         
  153.         .star3 {
  154.             animation: starGlow 3s ease-in-out infinite 1s;
  155.             transform-origin: 25px 320px;
  156.         }
  157.         
  158.         .star4 {
  159.             animation: starGlow 2.2s ease-in-out infinite 1.5s;
  160.             transform-origin: 95px 160px;
  161.         }
  162.         
  163.         .moon-stars {
  164.             animation: pulse 3s ease-in-out infinite;
  165.         }
  166.         
  167.         @keyframes floatFlag {
  168.             0%, 100% {
  169.                 transform: translate(-50%, -50%) scale(0.8) translateY(0px);
  170.             }
  171.             50% {
  172.                 transform: translate(-50%, -50%) scale(0.85) translateY(-20px);
  173.             }
  174.         }
  175.         
  176.         @keyframes rotateFlag {
  177.             0% {
  178.                 transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
  179.             }
  180.             100% {
  181.                 transform: translate(-50%, -50%) scale(0.8) rotate(360deg);
  182.             }
  183.         }
  184.         
  185.         @keyframes waveFlag {
  186.             0%, 100% {
  187.                 transform: skewX(0deg) scaleX(1);
  188.             }
  189.             50% {
  190.                 transform: skewX(5deg) scaleX(1.05);
  191.             }
  192.         }
  193.         
  194.         @keyframes starGlow {
  195.             0%, 100% {
  196.                 opacity: 0.7;
  197.                 transform: scale(1);
  198.             }
  199.             50% {
  200.                 opacity: 1;
  201.                 transform: scale(1.2);
  202.             }
  203.         }
  204.         
  205.         @keyframes pulse {
  206.             0%, 100% {
  207.                 transform: scale(1);
  208.             }
  209.             50% {
  210.                 transform: scale(1.05);
  211.             }
  212.         }
  213.         
  214.         /* Logos en haut */
  215.         .logo-w {
  216.             padding: 10px 0 20px 0 !important;
  217.             margin-bottom: 10px !important;
  218.             gap: 15px !important;
  219.             display: flex !important;
  220.             justify-content: center !important;
  221.             position: relative !important;
  222.             z-index: 2 !important;
  223.         }
  224.         
  225.         .logo-w img {
  226.             max-width: 85px !important;
  227.             height: auto !important;
  228.         }
  229.         
  230.         /* Bouton langue */
  231.         #buttonSelectLang {
  232.             height: 32px !important;
  233.             margin: 0 !important;
  234.             padding: 4px 10px !important;
  235.             font-size: 11px !important;
  236.         }
  237.         
  238.         /* Titre */
  239.         .auth-header {
  240.             font-size: 22px !important;
  241.             font-weight: 600 !important;
  242.             text-align: center !important;
  243.             margin-bottom: 20px !important;
  244.             padding-bottom: 10px !important;
  245.             border-bottom: 2px solid #e0e0e0 !important;
  246.             color: #333 !important;
  247.         }
  248.         
  249.         /* Texte d'information */
  250.         .form-text {
  251.             background: #f9f9f9 !important;
  252.             padding: 10px 12px !important;
  253.             border-radius: 8px !important;
  254.             margin-bottom: 20px !important;
  255.             font-size: 12px !important;
  256.             color: #666 !important;
  257.             text-align: center !important;
  258.             border-left: 3px solid #007bff !important;
  259.         }
  260.         
  261.         /* Champs de formulaire */
  262.         .form-group {
  263.             margin-bottom: 18px !important;
  264.         }
  265.         
  266.         .form-group label {
  267.             font-size: 12px !important;
  268.             font-weight: 500 !important;
  269.             color: #333 !important;
  270.             margin-bottom: 5px !important;
  271.             display: block !important;
  272.         }
  273.         
  274.         .form-control {
  275.             width: 100% !important;
  276.             padding: 8px 10px !important;
  277.             border: 1px solid #ccc !important;
  278.             border-radius: 6px !important;
  279.             font-size: 13px !important;
  280.             background: #fff !important;
  281.         }
  282.         
  283.         .form-control:focus {
  284.             border-color: #007bff !important;
  285.             outline: none !important;
  286.             box-shadow: 0 0 0 2px rgba(0,123,255,0.1) !important;
  287.         }
  288.         
  289.         /* Boutons */
  290.         .multi_submit {
  291.             display: flex !important;
  292.             gap: 12px !important;
  293.             margin-top: 20px !important;
  294.         }
  295.         
  296.         .btn-primary {
  297.             flex: 1 !important;
  298.             background: #007bff !important;
  299.             border: none !important;
  300.             padding: 8px !important;
  301.             border-radius: 6px !important;
  302.             font-size: 13px !important;
  303.             font-weight: 500 !important;
  304.             cursor: pointer !important;
  305.             color: white !important;
  306.             text-align: center !important;
  307.             transition: background 0.2s !important;
  308.         }
  309.         
  310.         .btn-primary:hover {
  311.             background: #0056b3 !important;
  312.         }
  313.         
  314.         /* Cacher les icônes */
  315.         .pre-icon {
  316.             display: none !important;
  317.         }
  318.         
  319.         /* Petits drapeaux décoratifs */
  320.         .small-flags {
  321.             position: fixed !important;
  322.             bottom: 20px !important;
  323.             right: 20px !important;
  324.             z-index: 2 !important;
  325.             display: flex !important;
  326.             gap: 5px !important;
  327.         }
  328.         
  329.         .small-flag {
  330.             width: 30px !important;
  331.             height: 20px !important;
  332.             background: linear-gradient(135deg, #3b6e2c 33%, #ffffff 33%, #ffffff 66%, #cf0921 66%) !important;
  333.             border-radius: 3px !important;
  334.             animation: smallFlagWave 1s ease-in-out infinite !important;
  335.         }
  336.         
  337.         @keyframes smallFlagWave {
  338.             0%, 100% {
  339.                 transform: rotate(0deg);
  340.             }
  341.             50% {
  342.                 transform: rotate(5deg);
  343.             }
  344.         }
  345.         
  346.         /* Responsive */
  347.         @media (max-width: 500px) {
  348.             .auth-box-w {
  349.                 max-width: 95% !important;
  350.                 margin: 15px auto !important;
  351.                 padding: 18px 18px 22px 18px !important;
  352.             }
  353.             
  354.             .logo-w img {
  355.                 max-width: 60px !important;
  356.             }
  357.             
  358.             .multi_submit {
  359.                 flex-direction: column !important;
  360.                 gap: 8px !important;
  361.             }
  362.             
  363.             .flag-wave {
  364.                 transform: translate(-50%, -50%) scale(0.4) !important;
  365.             }
  366.         }
  367.     </style>
  368. {% endblock %}
  369. {% block fos_user_script %}
  370.     {{ parent() }}
  371.     <script>
  372.         change_submit_name();
  373.         $('#userbundle_user_validCode').on('input', function(e) {
  374.             change_submit_name();
  375.         });
  376.         
  377.         function change_submit_name() {
  378.             if($('#userbundle_user_validCode').val().length > 0) {
  379.                 $('#submit_change_password').val("Initialiser votre mot de passe");
  380.             } else {
  381.                 $('#submit_change_password').val("Demander le code");
  382.             }
  383.         }
  384.         
  385.         // animations supplémentaires
  386.         $(document).ready(function() {
  387.             // Créer des petites particules aux couleurs du drapeau
  388.             setInterval(function() {
  389.                 var colors = ['#3b6e2c', '#ffffff', '#cf0921', '#f3c300'];
  390.                 var particle = $('<div class="flag-particle"></div>');
  391.                 particle.css({
  392.                     position: 'fixed',
  393.                     width: '5px',
  394.                     height: '5px',
  395.                     background: colors[Math.floor(Math.random() * colors.length)],
  396.                     borderRadius: '50%',
  397.                     bottom: '0px',
  398.                     left: Math.random() * window.innerWidth + 'px',
  399.                     opacity: Math.random() * 0.5 + 0.2,
  400.                     zIndex: 1,
  401.                     pointerEvents: 'none'
  402.                 });
  403.                 $('body').append(particle);
  404.                 
  405.                 particle.animate({
  406.                     bottom: window.innerHeight + 'px',
  407.                     opacity: 0
  408.                 }, Math.random() * 3000 + 2000, function() {
  409.                     particle.remove();
  410.                 });
  411.             }, 500);
  412.         });
  413.     </script>
  414. {% endblock %}