templates/reset_password/request.html.twig line 1

  1. <!doctype html>
  2. <html lang="fr">
  3. <head>
  4.     <meta charset="utf-8" />
  5.     <title>SmartImmo Management — Admin</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <meta content="SmartImmo Management est une application de gestion locative" name="description" />
  8.     <meta content="SmartTechnology" name="author" />
  9.     <link rel="shortcut icon" href="{{ asset('assets/img/smartimmoManagementHead.png') }}">
  10.     <!-- Fonts -->
  11.     <link rel="preconnect" href="https://fonts.googleapis.com/">
  12.     <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
  13.     <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&family=Ubuntu:wght@400;500;700&display=swap" rel="stylesheet">
  14.     <style>
  15.         :root{
  16.             --brand:#1D4DBF;
  17.             --brand-600:#1a46ad;
  18.             --ink:#1b2130;
  19.             --muted:#6c7a90;
  20.             --bg:#f6f8fc;
  21.             --card:#ffffff;
  22.             --ring:rgba(29,77,191,.25);
  23.             --radius:16px;
  24.             --shadow:0 10px 30px rgba(22,34,66,.10);
  25.             --shadow-strong:0 12px 40px rgba(22,34,66,.18);
  26.         }
  27.         *{box-sizing:border-box}
  28.         html,body{height:100%}
  29.         body{
  30.             margin:0;
  31.             font-family: Poppins, Ubuntu, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  32.             color:var(--ink);
  33.             background:
  34.                     radial-gradient(1200px 600px at 10% -10%, rgba(29,77,191,.10), transparent 60%),
  35.                     radial-gradient(1000px 500px at 110% 10%, rgba(29,77,191,.08), transparent 60%),
  36.                     var(--bg);
  37.         }
  38.         /* Layout */
  39.         .auth-wrap{
  40.             min-height:100dvh;
  41.             display:grid;
  42.             place-items:center;
  43.             padding:24px;
  44.         }
  45.         .auth-card{
  46.             width:100%;
  47.             max-width:520px;
  48.             background:var(--card);
  49.             border-radius:var(--radius);
  50.             box-shadow:var(--shadow);
  51.             overflow:hidden;
  52.             transition:box-shadow .2s ease, transform .2s ease;
  53.         }
  54.         .auth-card:focus-within{ box-shadow:var(--shadow-strong); transform:translateY(-1px); }
  55.         /* Top brand banner */
  56.         .brand-top{
  57.             display:flex; align-items:center; justify-content:center;
  58.             padding:28px 28px 8px;
  59.         }
  60.         .brand-top img{ max-width:220px; height:auto; }
  61.         /* Headings */
  62.         .auth-head{ text-align:center; padding:4px 28px 0; }
  63.         .auth-head h1{
  64.             margin:0;
  65.             font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  66.             font-weight:600;
  67.             letter-spacing:.2px;
  68.         }
  69.         .auth-sub{
  70.             text-align:center;
  71.             color:var(--brand);
  72.             font-weight:500;
  73.             padding:6px 28px 4px;
  74.             font-size:.95rem;
  75.         }
  76.         /* Flash stack */
  77.         .flash-stack{ padding:0 28px; }
  78.         .alert{
  79.             border-radius:12px;
  80.             padding:10px 12px;
  81.             font-size:.9rem;
  82.             margin:10px 0 0;
  83.             border:1px solid transparent;
  84.         }
  85.         .alert-danger{
  86.             background:#fde8ea;
  87.             color:#7d1f2a;
  88.             border-color:#fac5cc;
  89.         }
  90.         /* Body / form */
  91.         .auth-body{ padding:18px 28px 24px; }
  92.         .auth-body p.text-muted{
  93.             color:var(--muted);
  94.             margin:0 0 12px;
  95.             font-size:.9rem;
  96.             line-height:1.45;
  97.         }
  98.         label.form-label{
  99.             display:block;
  100.             font-weight:500;
  101.             font-size:.9rem;
  102.             margin-bottom:6px;
  103.         }
  104.         .mb-3{ margin-bottom:14px; }
  105.         /* Inputs (works with or without Bootstrap) */
  106.         .form-control{
  107.             width:100%;
  108.             display:block;
  109.             border:1px solid #e5e8ef;
  110.             background:#fff;
  111.             border-radius:12px;
  112.             padding:10px 12px;
  113.             font-size:.95rem;
  114.             outline:none;
  115.             transition:border-color .15s ease, box-shadow .15s ease;
  116.         }
  117.         .form-control:focus{
  118.             border-color:var(--brand);
  119.             box-shadow:0 0 0 4px var(--ring);
  120.         }
  121.         /* Errors (Symfony form_errors output) */
  122.         .form-error-message, .form-errors, .invalid-feedback{
  123.             color:#9c2331;
  124.             font-size:.85rem;
  125.             margin-top:6px;
  126.         }
  127.         /* Button */
  128.         .btn{
  129.             appearance:none; border:0; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  130.             border-radius:12px; padding:10px 14px; font-weight:600; font-size:.95rem; text-decoration:none;
  131.             transition:transform .05s ease, box-shadow .15s ease, background .15s ease;
  132.         }
  133.         .btn-brand{
  134.             background:var(--brand);
  135.             color:#fff;
  136.             width:100%;
  137.             box-shadow:0 6px 16px rgba(29,77,191,.25);
  138.         }
  139.         .btn-brand:hover{ background:var(--brand-600); }
  140.         .btn-brand:active{ transform:translateY(1px); }
  141.         /* Links row */
  142.         .link-row{
  143.             display:flex; justify-content:center; gap:16px;
  144.             padding:0 28px 28px;
  145.         }
  146.         .btn-link{
  147.             color:var(--brand);
  148.             font-weight:500;
  149.             text-decoration:none;
  150.             font-size:.95rem;
  151.         }
  152.         .btn-link:hover{ text-decoration:underline; }
  153.         /* Small screens polish */
  154.         @media (max-width: 420px){
  155.             .auth-card{ border-radius:14px; }
  156.             .auth-body{ padding:16px 18px 20px; }
  157.             .flash-stack{ padding:0 18px; }
  158.             .brand-top{ padding:22px 18px 6px; }
  159.             .auth-head{ padding:0 18px; }
  160.             .auth-sub{ padding:6px 18px 2px; }
  161.             .link-row{ padding:0 18px 18px; }
  162.         }
  163.     </style>
  164. </head>
  165. <body>
  166. <div class="auth-wrap">
  167.     <div class="auth-card">
  168.         <!-- Brand -->
  169.         <div class="brand-top">
  170.             <img src="{{ asset('assets/img/smartImmoManagement.png') }}" alt="Smart Immo Management" />
  171.         </div>
  172.         <!-- Title + subtitle -->
  173.         <div class="auth-head">
  174.             <h1>Réinitialiser votre mot de passe</h1>
  175.         </div>
  176.         <!-- Flash errors -->
  177.         <div class="flash-stack">
  178.             {% for flashError in app.flashes('reset_password_error') %}
  179.                 <div class="alert alert-danger" role="alert">{{ flashError }}</div>
  180.             {% endfor %}
  181.         </div>
  182.         <!-- Body -->
  183.         <div class="auth-body">
  184.             <p class="text-muted small mb-3" style="font-size: 12px">
  185.                 Entrez votre adresse e-mail (et identifiant si demandé) pour recevoir un nouveau mot de passe.
  186.             </p>
  187.             {{ form_start(requestForm, {'attr': {'novalidate': 'novalidate'}}) }}
  188.             {# Username (optionnel selon votre logique) #}
  189.             <div class="mb-3">
  190.                 <label class="form-label" for="{{ requestForm.username.vars.id }}">Identifiant</label>
  191.                 {{ form_widget(requestForm.username, {'attr': {'class':'form-control', 'placeholder':'Votre identifiant'}}) }}
  192.                 {{ form_errors(requestForm.username) }}
  193.             </div>
  194.             {# Email #}
  195.             <div class="mb-3">
  196.                 <label class="form-label" for="{{ requestForm.email.vars.id }}">Adresse e-mail</label>
  197.                 {{ form_widget(requestForm.email, {'attr': {'class':'form-control', 'placeholder':'nom@domaine.com'}}) }}
  198.                 {{ form_errors(requestForm.email) }}
  199.             </div>
  200.             <button class="btn btn-brand" type="submit">
  201.                 Demander un nouveau mot de passe
  202.             </button>
  203.             {{ form_end(requestForm) }}
  204.         </div>
  205.         <!-- Links -->
  206.         <div class="link-row text-end">
  207.             <a class="btn-link" href="{{ path('app_login') }}">Retour à la page de connexion</a>
  208.         </div>
  209.     </div>
  210. </div>
  211. <!-- JS: vanilla (no jQuery) -->
  212. <script>
  213.     (function () {
  214.         // Si une nav principale existe (layout connecté), redirige vers le dashboard
  215.         if (document.querySelector("body nav")) {
  216.             window.location.href = "{{ path('app_dashboard') }}";
  217.         } else {
  218.             // Au cas où certains éléments auraient été masqués par CSS utilitaires
  219.             document.querySelectorAll("body div, body p").forEach(function(el){
  220.                 el.classList.remove("d-none");
  221.             });
  222.         }
  223.     })();
  224. </script>
  225. </body>
  226. </html>
  227. {#<!doctype html>#}
  228. {#<html lang="fr">#}
  229. {#<head>#}
  230. {#    <meta charset="utf-8" />#}
  231. {#    <title>SmartImmo Management — Admin</title>#}
  232. {#    <meta name="viewport" content="width=device-width, initial-scale=1">#}
  233. {#    <meta content="SmartImmo Management est une application de gestion locative" name="description" />#}
  234. {#    <meta content="SmartTechnology" name="author" />#}
  235. {#    <link rel="shortcut icon" href="{{ asset('assets/img/smartimmoManagementHead.png') }}">#}
  236. {#    <!-- Fonts -->#}
  237. {#    <link rel="preconnect" href="https://fonts.googleapis.com/">#}
  238. {#    <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>#}
  239. {#    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&family=Ubuntu:wght@400;500;700&display=swap" rel="stylesheet">#}
  240. {#</head>#}
  241. {#<body>#}
  242. {#<div class="auth-wrap">#}
  243. {#    <div class="auth-card">#}
  244. {#        <!-- Brand -->#}
  245. {#        <div class="brand-top">#}
  246. {#            <img src="{{ asset('assets/img/smartImmoManagement.png') }}" alt="Smart Immo Management" width="50%">#}
  247. {#        </div>#}
  248. {#        <!-- Title + subtitle -->#}
  249. {#        <div class="auth-head">#}
  250. {#            <h1>Espace Admin</h1>#}
  251. {#        </div>#}
  252. {#        <div class="auth-sub" style="color: dodgerblue">#}
  253. {#            Réinitialiser votre mot de passe#}
  254. {#        </div>#}
  255. {#        <!-- Flash errors -->#}
  256. {#        <div class="px-4 flash-stack">#}
  257. {#            {% for flashError in app.flashes('reset_password_error') %}#}
  258. {#                <div class="alert alert-danger" role="alert">{{ flashError }}</div>#}
  259. {#            {% endfor %}#}
  260. {#        </div>#}
  261. {#        <!-- Body -->#}
  262. {#        <div class="auth-body">#}
  263. {#            <p class="text-muted mb-3" style="font-size: 12px">#}
  264. {#                Entrez votre adresse e-mail (et identifiant si demandé) pour recevoir un nouveau mot de passe.#}
  265. {#            </p>#}
  266. {#            {{ form_start(requestForm, {'attr': {'novalidate': 'novalidate'}}) }}#}
  267. {#            #}{# Username (optionnel selon votre logique) #}
  268. {#            <div class="mb-3" style="margin-bottom: 10px">#}
  269. {#                <label class="form-label" for="{{ requestForm.username.vars.id }}">Identifiant</label>#}
  270. {#                {{ form_widget(requestForm.username, {'attr': {'class':'form-control', 'placeholder':'Votre identifiant'}}) }}#}
  271. {#                {{ form_errors(requestForm.username) }}#}
  272. {#            </div>#}
  273. {#            #}{# Email #}
  274. {#            <div class="mb-3">#}
  275. {#                <label class="form-label" for="{{ requestForm.email.vars.id }}">Adresse e-mail</label>#}
  276. {#                {{ form_widget(requestForm.email, {'attr': {'class':'form-control', 'placeholder':'nom@domaine.com'}}) }}#}
  277. {#                {{ form_errors(requestForm.email) }}#}
  278. {#            </div>#}
  279. {#            <button class="btn btn-brand" type="submit" style="margin-top: 20px">#}
  280. {#                Demander un nouveau mot de passe#}
  281. {#            </button>#}
  282. {#            {{ form_end(requestForm) }}#}
  283. {#        </div>#}
  284. {#        <!-- Links -->#}
  285. {#        <div class="link-row">#}
  286. {#            <a class="btn-link" href="{{ path('app_login') }}">Se connecter</a>#}
  287. {#        </div>#}
  288. {#    </div>#}
  289. {#</div>#}
  290. {#<!-- JS -->#}
  291. {#<!-- Safe redirect logic (moved AFTER jQuery load to avoid errors) -->#}
  292. {#<script>#}
  293. {#    (function(){#}
  294. {#        // If a main nav exists (already logged-in layout), bounce to dashboard#}
  295. {#        if ($("body nav").length > 0) {#}
  296. {#            window.location.href = "{{ path('app_dashboard') }}";#}
  297. {#        } else {#}
  298. {#            $("body div, body p").removeClass("d-none");#}
  299. {#        }#}
  300. {#    })();#}
  301. {#</script>#}
  302. {#</body>#}
  303. {#</html>#}