mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 20:29:49 -04:00
Add page to change a service's contact link
Added a page which lets users with the 'manage_service' permission change the contact link for their service. There are no links to this page yet since only services using document download will need to set a contact link.
This commit is contained in:
@@ -28,7 +28,7 @@ from wtforms import (
|
||||
widgets,
|
||||
)
|
||||
from wtforms.fields.html5 import EmailField, SearchField, TelField
|
||||
from wtforms.validators import DataRequired, Length, Optional, Regexp
|
||||
from wtforms.validators import URL, DataRequired, Length, Optional, Regexp
|
||||
|
||||
from app.main.validators import (
|
||||
Blacklist,
|
||||
@@ -572,6 +572,14 @@ class ProviderForm(StripWhitespaceForm):
|
||||
priority = IntegerField('Priority', [validators.NumberRange(min=1, max=100, message="Must be between 1 and 100")])
|
||||
|
||||
|
||||
class ServiceContactLinkForm(StripWhitespaceForm):
|
||||
url = StringField(
|
||||
"URL",
|
||||
validators=[DataRequired(message='Can’t be empty'),
|
||||
URL(message='Must be a valid URL')]
|
||||
)
|
||||
|
||||
|
||||
class ServiceReplyToEmailForm(StripWhitespaceForm):
|
||||
email_address = email_address(label='Email reply to address', gov_user=False)
|
||||
is_default = BooleanField("Make this email address the default")
|
||||
|
||||
Reference in New Issue
Block a user