src/ApplicationBundle/Modules/Authentication/Resources/views/pages/views/central_login.html.twig line 247

Open in your IDE?
  1. {% include '@Application/inc/central_header.html.twig' %}
  2. <style>
  3. :root {
  4.     --n-cream: #F7F5F0;
  5.     --n-dark:  #1A1D2E;
  6.     --n-amber: #C07D2A;
  7.     --n-muted: #6B7280;
  8.     --n-border: rgba(26,29,46,.09);
  9.     --n-error: #dc2626;
  10. }
  11. .n-auth-page {
  12.     min-height: calc(100vh - 140px);
  13.     background: var(--n-cream);
  14.     display: flex;
  15.     align-items: center;
  16.     justify-content: center;
  17.     padding: 72px 24px 96px;
  18. }
  19. .n-auth-card {
  20.     width: 100%;
  21.     max-width: 440px;
  22.     background: #fff;
  23.     border: 1.5px solid var(--n-border);
  24.     border-radius: 20px;
  25.     padding: 44px 40px 40px;
  26.     box-shadow: 0 8px 40px rgba(26,29,46,.08);
  27. }
  28. @media(max-width:480px) {
  29.     .n-auth-card { padding: 32px 24px 28px; }
  30. }
  31. .n-auth-logo {
  32.     text-align: center;
  33.     margin-bottom: 28px;
  34. }
  35. .n-auth-logo .n-brand-mark {
  36.     display: inline-flex;
  37.     align-items: center;
  38.     justify-content: center;
  39.     width: 52px;
  40.     height: 52px;
  41.     background: var(--n-dark);
  42.     border-radius: 14px;
  43.     margin-bottom: 12px;
  44. }
  45. .n-auth-logo .n-brand-mark img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
  46. .n-auth-logo h1 {
  47.     font-family: 'Montserrat', sans-serif;
  48.     font-size: 1.45rem;
  49.     font-weight: 700;
  50.     color: var(--n-dark);
  51.     margin: 0 0 4px;
  52. }
  53. .n-auth-logo p {
  54.     font-size: .85rem;
  55.     color: var(--n-muted);
  56.     margin: 0;
  57. }
  58. .n-error-msg {
  59.     background: #fef2f2;
  60.     border: 1.5px solid #fca5a5;
  61.     border-radius: 8px;
  62.     padding: 10px 14px;
  63.     font-size: .85rem;
  64.     color: var(--n-error);
  65.     margin-bottom: 20px;
  66.     text-align: center;
  67. }
  68. .n-field {
  69.     margin-bottom: 16px;
  70. }
  71. .n-field label {
  72.     display: block;
  73.     font-size: .8rem;
  74.     font-weight: 600;
  75.     color: var(--n-dark);
  76.     margin-bottom: 6px;
  77.     letter-spacing: .02em;
  78. }
  79. .n-field input {
  80.     width: 100%;
  81.     padding: 11px 14px;
  82.     border: 1.5px solid var(--n-border);
  83.     border-radius: 8px;
  84.     font-size: .95rem;
  85.     color: var(--n-dark);
  86.     background: var(--n-cream);
  87.     font-family: 'DM Sans', sans-serif;
  88.     outline: none;
  89.     transition: border-color .2s, background .2s;
  90.     box-sizing: border-box;
  91. }
  92. .n-field input:focus { border-color: var(--n-amber); background: #fff; }
  93. .n-field input.error_class { border-color: var(--n-error); }
  94. .n-password-wrap {
  95.     position: relative;
  96. }
  97. .n-password-wrap input { padding-right: 42px; }
  98. .n-toggle-pw {
  99.     position: absolute;
  100.     right: 12px;
  101.     top: 50%;
  102.     transform: translateY(-50%);
  103.     background: none;
  104.     border: none;
  105.     cursor: pointer;
  106.     padding: 0;
  107.     opacity: .5;
  108.     transition: opacity .2s;
  109. }
  110. .n-toggle-pw:hover { opacity: 1; }
  111. .n-toggle-pw img { width: 18px; }
  112. .n-remember-row {
  113.     display: flex;
  114.     justify-content: space-between;
  115.     align-items: center;
  116.     flex-wrap: wrap;
  117.     gap: 8px;
  118.     margin-bottom: 22px;
  119.     font-size: .83rem;
  120. }
  121. @media(max-width:360px) {
  122.     .n-remember-row { flex-direction: column; align-items: flex-start; }
  123. }
  124. .n-remember-row label {
  125.     display: flex;
  126.     align-items: center;
  127.     gap: 7px;
  128.     color: var(--n-muted);
  129.     cursor: pointer;
  130. }
  131. .n-remember-row a {
  132.     color: var(--n-amber);
  133.     font-weight: 600;
  134.     text-decoration: none;
  135. }
  136. .n-remember-row a:hover { text-decoration: underline; }
  137. .n-submit-btn {
  138.     width: 100%;
  139.     padding: 13px;
  140.     background: var(--n-dark);
  141.     color: #fff;
  142.     border: none;
  143.     border-radius: 10px;
  144.     font-family: 'DM Sans', sans-serif;
  145.     font-size: .97rem;
  146.     font-weight: 700;
  147.     cursor: pointer;
  148.     transition: background .2s, transform .15s;
  149.     margin-bottom: 16px;
  150. }
  151. .n-submit-btn:hover { background: var(--n-amber); transform: translateY(-1px); }
  152. .n-submit-btn.ready { background: var(--n-amber); }
  153. .n-auth-link {
  154.     text-align: center;
  155.     font-size: .85rem;
  156.     color: var(--n-muted);
  157.     margin-bottom: 24px;
  158. }
  159. .n-auth-link a { color: var(--n-amber); font-weight: 600; text-decoration: none; }
  160. .n-auth-link a:hover { text-decoration: underline; }
  161. .n-divider {
  162.     display: flex;
  163.     align-items: center;
  164.     gap: 12px;
  165.     margin-bottom: 16px;
  166.     color: var(--n-muted);
  167.     font-size: .8rem;
  168. }
  169. .n-divider::before,
  170. .n-divider::after {
  171.     content: '';
  172.     flex: 1;
  173.     border-top: 1px solid var(--n-border);
  174. }
  175. .n-social-btn {
  176.     width: 100%;
  177.     padding: 11px 16px;
  178.     border: 1.5px solid var(--n-border);
  179.     border-radius: 10px;
  180.     background: #fff;
  181.     display: flex;
  182.     align-items: center;
  183.     justify-content: center;
  184.     gap: 10px;
  185.     font-family: 'DM Sans', sans-serif;
  186.     font-size: .9rem;
  187.     font-weight: 600;
  188.     color: var(--n-dark);
  189.     text-decoration: none;
  190.     cursor: pointer;
  191.     transition: background .2s, border-color .2s;
  192. }
  193. .n-social-btn:hover { background: var(--n-cream); border-color: rgba(26,29,46,.2); color: var(--n-dark); text-decoration: none; }
  194. .n-social-btn img { width: 18px; }
  195. </style>
  196. <section class="n-auth-page login-account">
  197.     <div class="n-auth-card">
  198.         <div class="n-auth-logo">
  199.             <div class="n-brand-mark">
  200.                 <img src="{{ absolute_url(path('dashboard')) }}honeybee_web_assets/icons/honeybeeicon.svg?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}" alt="HoneyBee">
  201.             </div>
  202.             <h1>Welcome Back</h1>
  203.             <p>Sign in to your HoneyBee ERP account</p>
  204.         </div>
  205.         <form action="{{ url('core_login') }}" class="login-form" method="post" id="relevantForm">
  206.             {% if message != '' %}
  207.             <div class="n-error-msg">{{ message }}</div>
  208.             {% endif %}
  209.             <div class="n-field">
  210.                 <label for="username">User ID / Email Address</label>
  211.                 <div class="login-inputs">
  212.                     <input type="text" id="username" name="username" placeholder="your@company.com" required>
  213.                 </div>
  214.             </div>
  215.             <div class="n-field">
  216.                 <label for="password">Password</label>
  217.                 <div class="n-password-wrap login-inputs">
  218.                     <input type="password" id="password" name="password" placeholder="Your password" required>
  219.                     <button type="button" class="n-toggle-pw toggle-password">
  220.                         <img src="{{ absolute_url(path('dashboard')) }}honeybee_web_assets/icons/eye-close.svg?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}" class="eyeicon" alt="Toggle password">
  221.                     </button>
  222.                 </div>
  223.             </div>
  224.             <div class="n-remember-row">
  225.                 <label>
  226.                     <input type="hidden" id="applicantDirectLogin" name="applicantDirectLogin" value="1">
  227.                     <input type="checkbox" id="check">
  228.                     Remember me
  229.                 </label>
  230.                 <a href="{{ url('find_account_forgot_password', { 'encData': (encData|json_encode)|nzo_encrypt }) }}">Forgot Password?</a>
  231.             </div>
  232.             <button type="submit" class="n-submit-btn rel_form_submit">Sign In</button>
  233.             <p class="n-auth-link">Don't have an account? <a href="{{ url('sign_up') }}">Create Account</a></p>
  234.             <div class="n-divider">Or continue with</div>
  235.             <a href="{{ oAuthLink }}" class="n-social-btn social-button google">
  236.                 <img src="{{ absolute_url(path('dashboard')) }}honeybee_web_assets/images/login/google.svg?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}" alt="Google">
  237.                 Sign in with Google
  238.             </a>
  239.         </form>
  240.     </div>
  241. </section>
  242. {% include '@HoneybeeWeb/footer/central_footer.html.twig' %}
  243. <script>
  244.     var fbt = '';
  245.     function check_doc_and_submit(submitFlag) {
  246.         var checkFailed = 0;
  247.         submitFlag = submitFlag || 0;
  248.         $('.login-inputs input').each(function(ind, elem) {
  249.             if ($(this).prop('required')) {
  250.                 if ($(this).val() == '' || $(this).val() == 0) checkFailed = 1;
  251.             }
  252.         });
  253.         $('.small_error_text').each(function(ind, elem) {
  254.             if ($(elem).text() != '') checkFailed = 1;
  255.         });
  256.         if (checkFailed == 0) $('.rel_form_submit').addClass('ready');
  257.         else $('.rel_form_submit').removeClass('ready');
  258.         if (checkFailed == 0 && submitFlag == 1) {
  259.             $('.rel_form_submit').removeClass('ready');
  260.             $('.rel_form_submit').hide();
  261.             $('#relevantForm').submit();
  262.         }
  263.     }
  264.     $(document).ready(function() {
  265.         $('.login-inputs input').focus(function() { $(this).removeClass('error_class'); });
  266.         $('.login-inputs input').change(function() { check_doc_and_submit(0); });
  267.         $('input[type="submit"], button[type="submit"], .rel_form_submit').click(function(event) {
  268.             event.preventDefault();
  269.             check_doc_and_submit(1);
  270.         });
  271.         check_doc_and_submit(0);
  272.     });
  273. </script>