Rename form class

It’s not just feedback now. Support is what we’re calling the whole
feature.
This commit is contained in:
Chris Hill-Scott
2016-12-12 11:35:23 +00:00
parent 8d7869ee54
commit a43112db88
2 changed files with 3 additions and 3 deletions

View File

@@ -403,7 +403,7 @@ class SupportType(Form):
)
class Feedback(Form):
class Support(Form):
name = StringField('Name')
email_address = StringField('Email address')
feedback = TextAreaField('Your message', validators=[DataRequired(message="Cant be empty")])

View File

@@ -2,7 +2,7 @@ import requests
from flask import render_template, url_for, redirect, flash, current_app, abort
from flask_login import current_user
from app.main import main
from app.main.forms import SupportType, Feedback
from app.main.forms import SupportType, Support
@main.route('/support', methods=['GET', 'POST'])
@@ -20,7 +20,7 @@ def support():
def feedback(ticket_type):
if ticket_type not in ['problem', 'question']:
abort(404)
form = Feedback()
form = Support()
if form.validate_on_submit():
if current_user.is_authenticated:
user_email = current_user.email_address