diff --git a/web/app.py b/web/app.py index ed0ac10..ce5e4f5 100644 --- a/web/app.py +++ b/web/app.py @@ -498,7 +498,7 @@ def create_app(): """Prepare and process the login form.""" # Authenticate username/email and login authenticated users. - + safe_next_url = self._get_safe_next_url('next', self.USER_AFTER_LOGIN_ENDPOINT) safe_reg_next = self._get_safe_next_url('reg_next', self.USER_AFTER_REGISTER_ENDPOINT) @@ -539,11 +539,14 @@ def create_app(): return self._do_login_user(user, safe_next_url, login_form.remember_me.data) # Render form + tos_db = Misc.query.filter_by(field_1='terms_of_service').first() + print(Misc.query.filter_by(field_1='terms_of_service').first()) self.prepare_domain_translations() template_filename = self.USER_LOGIN_AUTH0_TEMPLATE if self.USER_ENABLE_AUTH0 else self.USER_LOGIN_TEMPLATE return render_template(template_filename, form=login_form, login_form=login_form, + tos='hello there!', register_form=register_form) #user_manager = UserManager(app, db, User) @@ -580,6 +583,12 @@ def create_app(): time = datetime.datetime.utcnow() ) db.session.add(flash_entry_add) + tos_entry_add = Misc( + field_1 = 'terms_of_service', + field_2 = 'TOS', + time = datetime.datetime.utcnow() + ) + db.session.add(tos_entry_add) db.session.commit() # Query radioid.net for list of DMR IDs, then add to DB @@ -732,26 +741,19 @@ def create_app(): svr_content = '' for i in sl: svr_content = svr_content + ''' -

 

- - - - - - - - - - - - - - -
-

Server: ''' + i.name + '''

-
- ''' + i.public_notes + ''' -
+
+

''' + i.name + '''

+
+
''' + i.public_notes + '''
+

 

+ +
+ + +
+
+ + ''' try: #content = Markup('The HTML String') @@ -772,73 +774,54 @@ def create_app(): script_links[i[0]] = link_num #print(script_links) content = content + '''\n - - - - - - -
-

Your passphrase for ''' + str(i[0]) + ''':

-

Copy and paste: ''' + str(gen_passphrase(int(i[0]))) + '''

-
- -

Phonetically spelled: ''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''

- -
-

 

+
+

''' + str(i[0]) + '''

+
MMDVM Passphrase: +
''' + str(gen_passphrase(int(i[0]))) + '''
+
+
+

''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''

+
+
''' elif i[1] == 0: link_num = str(random.randint(1,99999999)).zfill(8) + str(time.time()) + str(random.randint(1,99999999)).zfill(8) script_links[i[0]] = link_num #print(script_links) content = content + '''\n - - - - - - -
-

Your passphrase for ''' + str(i[0]) + ''':

-

Copy and paste: ''' + str(gen_passphrase(int(i[0]))) + '''

-
- -

Phonetically spelled: ''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''

- -
-

 

+
+

''' + str(i[0]) + '''

+
MMDVM Passphrase: +
''' + str(gen_passphrase(int(i[0]))) + '''
+
+
+

''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''

+
+
''' elif i[1] == '': content = content + ''' - - - - - - -
-

Your passphrase for ''' + str(i[0]) + ''':

-

Copy and paste: ''' + legacy_passphrase + '''

-
-

Phonetically spelled: ''' + convert_nato(legacy_passphrase) + '''

-
-

 

''' +
+

''' + str(i[0]) + '''

+
MMDVM Passphrase: +
''' + legacy_passphrase + '''
+
+
+

''' + convert_nato(legacy_passphrase) + '''

+
+
+ ''' else: content = content + ''' - - - - - - -
-

Your passphrase for ''' + str(i[0]) + ''':

-

Copy and paste: ''' + str(i[1]) + '''

-
-

Phonetically spelled: ''' + convert_nato(str(i[1])) + '''

-
-

 

+
+

''' + str(i[0]) + '''

+
MMDVM Passphrase: +
''' + str(i[1]) + '''
+
+
+

''' + convert_nato(str(i[1])) + '''

+
+
''' #content = content + '\n\n' + str(script_links[i[0]]) except: diff --git a/web/templates/flask_user/register.html b/web/templates/flask_user/register.html index 93e521a..890f0ff 100644 --- a/web/templates/flask_user/register.html +++ b/web/templates/flask_user/register.html @@ -49,28 +49,5 @@

 

- - - - - {% endblock %} diff --git a/web/templates/view_passphrase.html b/web/templates/view_passphrase.html index 428f565..0322267 100644 --- a/web/templates/view_passphrase.html +++ b/web/templates/view_passphrase.html @@ -2,9 +2,10 @@ {% block content %}

 

Click here for automated Pi-Star script.

 

-
-
{{server_content}}
-
{{passphrase_content}}
-
+
+
{{server_content}}
+
{{passphrase_content}}
+
+

 

{% endblock %}