diff --git a/web/app.py b/web/app.py index 6225b3c..9c77a84 100644 --- a/web/app.py +++ b/web/app.py @@ -585,10 +585,22 @@ def create_app(): db.session.add(flash_entry_add) tos_entry_add = Misc( field_1 = 'terms_of_service', - field_2 = 'TOS', + field_2 = '''
+

Terms of Use

+
+

By using ''' + title + ''', you agree not to do anything malicious. You agree to use the system with respect and courtesy to others. Please operate with the laws of your country.

+ +
+
''', time = datetime.datetime.utcnow() ) db.session.add(tos_entry_add) + home_entry_add = Misc( + field_1 = 'home_page', + field_2 = '

Welcome to ' + title + '

.', + time = datetime.datetime.utcnow() + ) + db.session.add(home_entry_add) db.session.commit() # Query radioid.net for list of DMR IDs, then add to DB @@ -654,6 +666,7 @@ def create_app(): # The Home page is accessible to anyone @app.route('/') def home_page(): + home_text = Misc.query.filter_by(field_1='home_page').first() #content = Markup('Index') try: l_news = News.query.order_by(News.time.desc()).first() @@ -675,12 +688,17 @@ def create_app(): ''' except: content = '' - return render_template('index.html', news = Markup(content)) + return render_template('index.html', news = Markup(content), content_block = Markup(home_text.field_2)) + + @app.route('/tos') + def tos_page(): + tos_text = Misc.query.filter_by(field_1='terms_of_service').first() + content = tos_text.field_2 + + return render_template('flask_user_layout.html', markup_content = Markup(content)) @app.route('/help') def help_page(): - #content = Markup('Index') - return render_template('help.html') @app.route('/generate_passphrase/pi-star', methods = ['GET']) @@ -1688,7 +1706,7 @@ def create_app(): art_count = 1 if art_count < 16: news_content = news_content + ''' -

''' + article.subject + '''

+

''' + article.subject + '''


 

''' + article.date + ''' - @@ -1826,10 +1844,17 @@ def create_app(): content = '''

Saved flash text.

Redirecting in 3 seconds.

''' + elif request.args.get('home') == 'save': + misc_edit_field_1('home_page', request.form.get('home_text'), None, None, None, None, None, None, None, None) + content = '''

Saved home page.

+

Redirecting in 3 seconds.

+ ''' else: email_text = Misc.query.filter_by(field_1='approval_email').first() flash_text = Misc.query.filter_by(field_1='approval_flash').first() + home_text = Misc.query.filter_by(field_1='home_page').first() + print(home_text) content = '''

 

@@ -1864,6 +1889,25 @@ def create_app():
+ +

 

+ +
+ + + + + + + + + +

+

 

+

+
+
+

 

''' return render_template('flask_user_layout.html', markup_content = Markup(content)) diff --git a/web/templates/flask_user/register.html b/web/templates/flask_user/register.html index 890f0ff..ab5fbc1 100644 --- a/web/templates/flask_user/register.html +++ b/web/templates/flask_user/register.html @@ -5,7 +5,15 @@

{%trans%}Register{%endtrans%}

 

-Your username MUST be your callsign. After filling out the fields, a confirmation link will be emailed to you. +Your username MUST be your callsign. After filling out the fields, a confirmation link may be emailed to you. +
+

 

+By registering, you acknowledge that you agree to the Terms of Use. +

 

+ +

+

 

+

 

diff --git a/web/templates/index.html b/web/templates/index.html index 8f85087..c5985a5 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -2,7 +2,7 @@ {% block content %}

 

-

Welcome to the {{ user_manager.USER_APP_NAME }}. +{{content_block}}