Explorar el Código

체크박스 동작 방식 변경

https://github.com/openNAMU/openNAMU/issues/2599
잉여개발기 hace 5 meses
padre
commit
133a31b3e4
Se han modificado 2 ficheros con 8 adiciones y 10 borrados
  1. 1 1
      app.py
  2. 7 9
      route/tool/func.py

+ 1 - 1
app.py

@@ -924,7 +924,7 @@ app.route('/api/v2/lang', defaults = { 'legacy' : '' }, methods = ['POST'])(api_
 
 # Func-main
 # 여기도 전반적인 조정 시행 예정
-app.route('/other')(main_tool_other)
+app.route('/other')(golang_view())
 app.route('/manager', methods = ['POST', 'GET'])(main_tool_admin)
 app.route('/manager/<int:num>', methods = ['POST', 'GET'])(main_tool_redirect)
 app.route('/manager/<int:num>/<everything:add_2>', methods = ['POST', 'GET'])(main_tool_redirect)

+ 7 - 9
route/tool/func.py

@@ -1879,16 +1879,14 @@ def get_edit_text_bottom_check_box(conn):
     curs.execute(db_change('select data from other where name = "copyright_checkbox_text"'))
     sql_d = curs.fetchall()
     if sql_d and sql_d[0][0] != '':
+        checked = ''
         if 'bottom_check_box_pass' in flask.session and flask.session['bottom_check_box_pass'] > 0:
-            cccb_text = '' + \
-                sql_d[0][0] + \
-                '<hr class="main_hr">' + \
-            ''
-        else:
-            cccb_text = '' + \
-                '<label class="__ON_CHECKLABEL__"><input class="__ON_CHECKBOX__" type="checkbox" name="copyright_agreement" value="yes"> ' + sql_d[0][0] + '</label>' + \
-                '<hr class="main_hr">' + \
-            ''
+            checked = 'checked'
+
+        cccb_text = '' + \
+            '<label class="__ON_CHECKLABEL__"><input class="__ON_CHECKBOX__" type="checkbox" name="copyright_agreement" value="yes"> ' + sql_d[0][0] + '</label>' + \
+            '<hr class="main_hr">' + \
+        ''
         
     return cccb_text