register.ejs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>The Subline</title>
  6. <link rel="icon" type="img/png" href="/shared/images/logo.png">
  7. <link rel="stylesheet" href="/otherPages/style.css">
  8. <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
  9. </head>
  10. <body id="register" class="main-background">
  11. <div class="header">
  12. <a class="headerStart" href="/" >
  13. <img src="/shared/images/logo.png" alt="Subline">
  14. <div class='headerLogo'>THE SUBLINE</div>
  15. </a>
  16. </div>
  17. <%- include("../shared/banner.ejs") %>
  18. <form method="post" action="/merchant/create/none">
  19. <h1> Join The Subline </h1>
  20. <label id="nameLabel">Restaurant Name
  21. <input type="text" name="name" required>
  22. </label>
  23. <label>Email
  24. <input type="email" name="email" required>
  25. </label>
  26. <label>Password
  27. <input type="password" name="password" required>
  28. </label>
  29. <label>Confirm Password
  30. <input type="password" name="confirmPassword" required>
  31. </label>
  32. <label id="agreement">
  33. <input type="checkbox" name="agree" required>
  34. <p>I agree to the
  35. <a href="/privacy">Privacy Policy</a> and the
  36. <a href="/terms">Terms and Conditions</a>
  37. </p>
  38. </label>
  39. <h2 class="customText">SIGN UP WITH:</h2>
  40. <button id="noneButton" class="submitButton" class="button">NO POS</button>
  41. <a href="/login">Already have an account? Please Sign In</a>
  42. </form>
  43. <%- include("../shared/footer") %>
  44. <script>
  45. let locals = <%- JSON.stringify(locals) %>
  46. if(locals.banner !== undefined){
  47. let bannerElem = document.getElementById("banner");
  48. bannerElem.children[0].style.background = locals.banner.color;
  49. bannerElem.children[1].innerText = locals.banner.message;
  50. bannerElem.style.display = "flex";
  51. switch(locals.banner.type){
  52. case "error":
  53. bannerElem.children[0].innerHTML = `
  54. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  55. <circle cx="12" cy="12" r="10"></circle>
  56. <line x1="15" y1="9" x2="9" y2="15"></line>
  57. <line x1="9" y1="9" x2="15" y2="15"></line>
  58. </svg>
  59. `;
  60. break;
  61. case "success":
  62. bannerElem.children[0].innerHTML = `
  63. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  64. <circle cx="12" cy="12" r="10"></circle>
  65. <line x1="12" y1="8" x2="12" y2="12"></line>
  66. <line x1="12" y1="16" x2="12.01" y2="16"></line>
  67. </svg>
  68. `;
  69. break;
  70. default:
  71. bannerElem.children[0].innerHTML = `
  72. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  73. <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
  74. <polyline points="22 4 12 14.01 9 11.01"></polyline>
  75. </svg>
  76. `;
  77. }
  78. let timer = setTimeout(()=>{
  79. bannerElem.style.display = "none"
  80. }, 7000);
  81. bannerElem.children[2].onclick = ()=>{
  82. bannerElem.style.display = "none";
  83. clearTimeout(timer);
  84. }
  85. }
  86. </script>
  87. </body>
  88. </html>