From 5497c6cc1da79bf2105aecbfc82bd7f2394d3bb3 Mon Sep 17 00:00:00 2001
From: duyanhehe <duyanhex@gmail.com>
Date: Wed, 23 Apr 2025 20:45:25 +0700
Subject: [PATCH] add terms of service

---
 app/routes/auth.py                        |   9 +-
 app/templates/users/register.html         |   4 +-
 app/templates/users/terms_of_service.html | 142 ++++++++++++++++++++++
 3 files changed, 149 insertions(+), 6 deletions(-)
 create mode 100644 app/templates/users/terms_of_service.html

diff --git a/app/routes/auth.py b/app/routes/auth.py
index 03dba39..6870e79 100644
--- a/app/routes/auth.py
+++ b/app/routes/auth.py
@@ -124,10 +124,9 @@ def signout():
     return redirect(url_for("auth.login"))
 
 
-@auth_bp.route("/forget_password")
-def forget_password():
+@auth_bp.route("/terms")
+def terms():
     """
-    Password recovery route
-    Displays the password reset form
+    Terms and services route
     """
-    return render_template("users/forget_pass.html")
+    return render_template("users/terms_of_service.html")
diff --git a/app/templates/users/register.html b/app/templates/users/register.html
index 20fd92f..de72ae2 100644
--- a/app/templates/users/register.html
+++ b/app/templates/users/register.html
@@ -204,7 +204,9 @@
                         />
                         <label class="form-check-label" for="termOfService">
                           I agree to all statements in
-                          <a href="#!" class="text-decoration-none"
+                          <a
+                            href="{{ url_for('auth.terms') }}"
+                            class="text-decoration-none"
                             >Terms of service</a
                           >
                         </label>
diff --git a/app/templates/users/terms_of_service.html b/app/templates/users/terms_of_service.html
new file mode 100644
index 0000000..bb391d4
--- /dev/null
+++ b/app/templates/users/terms_of_service.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <title>Terms of Service</title>
+
+    <!-- Stylesheets -->
+    <link
+      rel="stylesheet"
+      href="{{ url_for('static', filename='css/login.css') }}"
+    />
+    <link
+      href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
+      rel="stylesheet"
+      integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
+      crossorigin="anonymous"
+    />
+    <link
+      href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/6.0.0/mdb.min.css"
+      rel="stylesheet"
+    />
+    <style>
+      body,
+      html {
+        height: 100%;
+        margin: 0;
+      }
+      .vh-120 {
+        min-height: 100vh;
+        background: rgb(49, 47, 47) no-repeat center center;
+        background-size: cover;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+    </style>
+  </head>
+  <body class="bg-light">
+    <section class="vh-100 d-flex align-items-center">
+      <div class="container">
+        <div class="row justify-content-center">
+          <div class="col-12 col-lg-10 col-xxl-8">
+            <div class="card border-0 shadow-lg" style="border-radius: 15px">
+              <div class="row g-0">
+                <!-- Image Section -->
+                <div class="col-12 col-md-4 d-none d-md-block">
+                  <img
+                    src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-login-form/draw2.svg"
+                    class="img-fluid h-100"
+                    alt="Terms image"
+                    style="object-fit: cover; border-radius: 15px 0 0 15px"
+                  />
+                </div>
+
+                <!-- Terms Content Section -->
+                <div class="col-12 col-md-8">
+                  <div class="card-body p-4 p-lg-5">
+                    <h2 class="h4 text-center mb-4">Terms of Service</h2>
+                    <div
+                      class="terms-content overflow-auto"
+                      style="max-height: 60vh"
+                    >
+                      <h5>1. Acceptance of Terms</h5>
+                      <p>
+                        By accessing and using Horizon Restaurant Management
+                        System, you agree to be bound by these Terms of Service.
+                      </p>
+
+                      <h5>2. User Responsibilities</h5>
+                      <p>
+                        Users must maintain accurate account information and
+                        ensure the security of their login credentials.
+                      </p>
+
+                      <h5>3. System Usage</h5>
+                      <p>
+                        The system is provided for restaurant management
+                        purposes only. Any unauthorized use is strictly
+                        prohibited.
+                      </p>
+
+                      <h5>4. Data Privacy</h5>
+                      <p>
+                        We are committed to protecting your personal information
+                        in accordance with applicable privacy laws.
+                      </p>
+
+                      <h5>5. Service Availability</h5>
+                      <p>
+                        While we strive for 24/7 availability, we cannot
+                        guarantee uninterrupted access to the system.
+                      </p>
+
+                      <h5>6. Intellectual Property</h5>
+                      <p>
+                        All content and functionality within the system remain
+                        the property of Horizon Restaurant Management.
+                      </p>
+
+                      <h5>7. Limitation of Liability</h5>
+                      <p>
+                        We shall not be liable for any indirect, incidental, or
+                        consequential damages arising from system use.
+                      </p>
+
+                      <h5>8. Modifications</h5>
+                      <p>
+                        We reserve the right to modify these terms at any time.
+                        Users will be notified of significant changes.
+                      </p>
+                    </div>
+
+                    <!-- Back Button -->
+                    <div class="text-center mt-4">
+                      <a
+                        href="{{ url_for('auth.register') }}"
+                        class="btn btn-primary"
+                        >Back to Registration</a
+                      >
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </section>
+
+    <!-- Scripts -->
+    <script
+      src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
+      integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
+      crossorigin="anonymous"
+    ></script>
+    <script
+      type="text/javascript"
+      src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/6.0.0/mdb.min.js"
+    ></script>
+  </body>
+</html>
-- 
GitLab