huaisianhuang пре 4 година
родитељ
комит
31ad73d179

+ 4 - 2
api/static/lan.js

@@ -40,7 +40,8 @@ var zh = {
     "sup_img_profile": "2. 影像連結檔案格式支援:",
     "submit_to_wait": "3. 點選“送出”之後需等待一段影片製作的時間,請您耐心等候,待製作完畢可於通知網址查看",
     "add_eng": "加入英文:",
-    "submut": "送出"
+    "submut": "送出",
+    "privacy_term": "同意隱私政策及使用條款"
 };
 
 var en = {
@@ -66,7 +67,8 @@ var en = {
     "sup_img_profile": "2. Support File Format:",
     "submit_to_wait": "3. After Clicking Submit, You Will Need To Wait For A Period Of Time For The Production Of The Video. Please Wait Patiently. You Can Check It At The Notification URL When The Production Is Completed.",
     "add_eng": "Allow English Lines:",
-    "submut": "Submit"
+    "submut": "Submit",
+    "privacy_term": "I Agree to privacy policy and terms of use."
 };
 
 

+ 6 - 2
api/static/style.css

@@ -597,8 +597,8 @@ footer {
 
 #avatarmega .modal-header {
 	position: absolute;
-	top: -1.5rem;
-	right: 1rem;
+	top: -.5rem;
+	right: 1.5rem;
 }
 
 .linker__box {
@@ -788,6 +788,10 @@ body {
 	min-width: 350px;
 }
 
+.link_privacy {
+	color: black;
+}
+
 .login-content img {
 	height: 80px;
 }

+ 1 - 1
api/templates/index.html

@@ -85,7 +85,7 @@
     <!-- footer -->
     <footer class="fixed-bottom text-center py-2">
         {% block footer %}
-    
+        
         {% endblock %}
     </footer>
     <!-- ================================================================= -->

+ 4 - 0
api/templates/login.html

@@ -73,6 +73,10 @@
                             <input type="password" class="form-control" id="password" name="password"  placeholder="Password">
                             <label for="password"><i class="fas fa-lock me-2"></i>Password</label>
                         </div>
+                        <div class="mb-3">
+                            <input type="checkbox" id="privacy" name="privacy" checked required>
+                            <label for="privacy"><a href="./privacy.html" class="link_privacy" target="_blank" set-lan="html:privacy_term">同意隱私政策及使用條款</a></label>
+                        </div>
                         <div class="d-flex justify-content-center">
                             <button type="submit" class="btn btn-primary align-items-center">Register</button>
                         </div>

+ 1 - 1
api/templates/make_video_slide.html

@@ -29,7 +29,7 @@
         <!-- fieldsets -->
         <fieldset>
           <h3 class="fs-subtitle">SLIDE 連結<img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="將作為影片的內嵌標題"></h3>
-          <input id=slide_raw_url type="text" name='t1' class='title_new' value="" placeholder="標題" /><label for="myCheck">加入英文:</label> 
+          <input id=slide_raw_url type="text" name='t1' class='title_new' value="" placeholder="連結" /><label for="myCheck">加入英文:</label> 
           <input type="checkbox" id="multiLang" > <br/>
         </fieldset>
         <fieldset>

+ 59 - 0
api/templates/privacy.html

@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html lang="en" >
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>隱私政策及使用條款</title>
+  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
+  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
+    crossorigin="anonymous">
+  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
+  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+  <style>
+    .h2 {
+        text-align: center;
+        font-size: 1.2rem;
+        font-weight: 500;
+        margin-top: 2rem;
+    }
+    .terms {
+        font-size: .9rem;
+        width: 95%;
+        min-width: 250px;
+        height: auto;
+        overflow: scroll;
+        margin-bottom: 1rem;
+        margin-left: auto;
+        margin-right: auto;
+        border: 1px solid rgb(163, 163, 163);
+        line-height: 1.5rem;
+    }
+    .pl-0 {
+        padding-left: 0;
+    }
+  </style>
+</head>
+<body>
+    <div class="container">
+    
+    <main>
+        <h2 class="h2">隱私政策及使用條款</h2>
+        <div class="terms">
+          <ol class="pl-0">
+              <li>1. 集仕多股份有限公司(以下簡稱本公司),依需要取得您個人資料,並依個人資料保護法及相關法令規定,蒐集、處理及利用您個人資料。</li>
+          </ol>
+        </div>
+        
+        <!-- <button class="btn-term-exit" onclick="window.history.back();">回上一頁</button> -->
+    </main>
+    <div class="text-center">
+<!--
+      <img class="img-fluid mb-3" src="images/banner-bottom.jpg" alt="幸福空間 - 裝修市場問卷調查">
+-->
+
+    </div>
+  </div>
+    <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
+    <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script>
+</body>
+</html>

+ 18 - 3
api/templates/script_index.js

@@ -1,5 +1,20 @@
+const btnLogin = document.querySelector('#btn_login');
+const inputPassword = document.querySelector('#password');
 
-$("#btn_login").click(function () {
+inputPassword.addEventListener('keyup', loginByEnter);
+
+btnLogin.addEventListener('click', login);
+
+function loginByEnter(e) {
+  if (e.keyCode === 13) {
+    e.preventDefault();
+    console.log('login!');
+    login();
+  }
+};
+
+function login(){
+  console.log('login!');
   var url = "login";
   var xhr = new XMLHttpRequest();
   xhr.open("POST", url);
@@ -17,7 +32,7 @@ $("#btn_login").click(function () {
           icon: 'success',
           confirmButtonColor: '#3085d6',
         },function(isConfirm){
-          if(isConfirm){window.location.replace("/index");}
+          if(isConfirm){window.location.replace("/make_video");}
         }
         );
       }
@@ -35,5 +50,5 @@ $("#btn_login").click(function () {
   var data = "grant_type=&username=" + $('#username').val() + "&password="+$('#password').val()+"&scope=&client_id=&client_secret=";
   result = xhr.send(data);
   console.log(result);
-});
+}