mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 15:48:28 -04:00
Merge pull request #1403 from alphagov/ken-admin-orgs
Add pages to create and manage organisation branding for Emails
This commit is contained in:
@@ -26,6 +26,7 @@ from wtforms import (
|
||||
SelectField)
|
||||
from wtforms.fields.html5 import EmailField, TelField, SearchField
|
||||
from wtforms.validators import (DataRequired, Email, Length, Regexp, Optional)
|
||||
from flask_wtf.file import FileField as FileField_wtf, FileAllowed
|
||||
|
||||
from app.main.validators import (Blacklist, CsvFileValidator, ValidGovEmail, NoCommasInPlaceHolders, OnlyGSMCharacters)
|
||||
|
||||
@@ -548,6 +549,28 @@ class ServiceBrandingOrg(Form):
|
||||
)
|
||||
|
||||
|
||||
class ServiceSelectOrg(Form):
|
||||
|
||||
def __init__(self, organisations=[], *args, **kwargs):
|
||||
self.organisation.choices = organisations
|
||||
super(ServiceSelectOrg, self).__init__(*args, **kwargs)
|
||||
|
||||
organisation = RadioField(
|
||||
'Organisation',
|
||||
validators=[
|
||||
DataRequired()
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class ServiceManageOrg(Form):
|
||||
|
||||
name = StringField('Name')
|
||||
|
||||
colour = StringField('Colour', render_kw={'onkeyup': 'update_colour_span()', 'onblur': 'update_colour_span()'})
|
||||
file = FileField_wtf('Upload a PNG logo', validators=[FileAllowed(['png'], 'PNG Images only!')])
|
||||
|
||||
|
||||
class LetterBranding(Form):
|
||||
|
||||
def __init__(self, choices=[], *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user