mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
Rename form class
It’s not just feedback now. Support is what we’re calling the whole feature.
This commit is contained in:
@@ -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="Can’t be empty")])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user