mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
This is for tickets coming from non-logged-in users. It’s effectively the same as reporting a problem, but doesn’t have the banner about the status page (because we can’t tell if they’re actually reporting a problem now we’re not asking). It also gives a more generic page title.
27 lines
562 B
Python
27 lines
562 B
Python
from werkzeug.routing import BaseConverter
|
|
|
|
from app.models.feedback import (
|
|
GENERAL_TICKET_TYPE,
|
|
PROBLEM_TICKET_TYPE,
|
|
QUESTION_TICKET_TYPE,
|
|
)
|
|
|
|
|
|
class TemplateTypeConverter(BaseConverter):
|
|
|
|
regex = '(?:email|sms|letter)'
|
|
|
|
|
|
class TicketTypeConverter(BaseConverter):
|
|
|
|
regex = f'(?:{PROBLEM_TICKET_TYPE}|{QUESTION_TICKET_TYPE}|{GENERAL_TICKET_TYPE})'
|
|
|
|
|
|
class LetterFileExtensionConverter(BaseConverter):
|
|
|
|
regex = '(?:pdf|png)'
|
|
|
|
|
|
class SimpleDateTypeConverter(BaseConverter):
|
|
regex = r'([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))'
|