mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Convert text inputs on ServiceUpdateEmailBranding
Includes changes to templates that use this form and associated tests.
This commit is contained in:
@@ -1554,13 +1554,17 @@ class PreviewBranding(StripWhitespaceForm):
|
||||
|
||||
|
||||
class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
||||
name = StringField('Name of brand')
|
||||
text = StringField('Text')
|
||||
colour = StringField(
|
||||
name = GovukTextInputField('Name of brand')
|
||||
text = GovukTextInputField('Text')
|
||||
colour = GovukTextInputField(
|
||||
'Colour',
|
||||
validators=[
|
||||
Regexp(regex="^$|^#(?:[0-9a-fA-F]{3}){1,2}$", message='Must be a valid color hex code (starting with #)')
|
||||
]
|
||||
],
|
||||
param_extensions={
|
||||
"classes": "govuk-input--width-6",
|
||||
"attributes": {"data-module": "colour-preview"}
|
||||
}
|
||||
)
|
||||
file = FileField_wtf('Upload a PNG logo', validators=[FileAllowed(['png'], 'PNG Images only!')])
|
||||
brand_type = RadioField(
|
||||
|
||||
Reference in New Issue
Block a user