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:
Katie Smith
2018-06-05 10:37:41 +01:00
parent 1fc4e1657d
commit e1d4181be3
7 changed files with 125 additions and 1 deletions

View File

@@ -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='Cant 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")