From 4503724ad6faf90356a0142bf51a7d0a1b5dab7c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 12 Dec 2016 11:18:25 +0000 Subject: [PATCH] Add a support index page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our support process is about to get more fully fledged so we’ll need an index page to route people properly. We reckon that users will also want to know what the support process is, so let’s explain it on this page. --- app/main/views/feedback.py | 11 ++- app/templates/admin_template.html | 4 +- app/templates/views/service-settings.html | 2 +- app/templates/views/signedout.html | 2 +- .../views/{ => support}/feedback.html | 0 app/templates/views/support/index.html | 86 +++++++++++++++++++ tests/app/main/views/test_feedback.py | 5 ++ 7 files changed, 103 insertions(+), 7 deletions(-) rename app/templates/views/{ => support}/feedback.html (100%) create mode 100644 app/templates/views/support/index.html diff --git a/app/main/views/feedback.py b/app/main/views/feedback.py index 73eae1df0..e481676ad 100644 --- a/app/main/views/feedback.py +++ b/app/main/views/feedback.py @@ -4,7 +4,12 @@ from app.main import main from app.main.forms import Feedback -@main.route('/feedback', methods=['GET', 'POST']) +@main.route('/support', methods=['GET', 'POST']) +def support(): + return render_template('views/support/index.html') + + +@main.route('/support/feedback', methods=['GET', 'POST']) def feedback(): form = Feedback() if form.validate_on_submit(): @@ -38,6 +43,6 @@ def feedback(): ) abort(500, "Feedback submission failed") flash("Thanks, we’ve received your feedback", 'default_with_tick') - return redirect(url_for('.feedback')) + return redirect(url_for('.support')) - return render_template('views/feedback.html', form=form) + return render_template('views/support/feedback.html', form=form) diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index f85071468..60ff553fa 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -40,7 +40,7 @@ Menu