mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-14 02:09:44 -04:00
add new template folder
The add new templates page now has option to add template folders. Tweaked wording of other options and h1 to clarify options since it's not all about templates any more. Added api client and stuff for it
This commit is contained in:
committed by
Alexey Bezhan
parent
37295f4b6e
commit
7cbf5de240
@@ -850,21 +850,22 @@ class DateFilterForm(StripWhitespaceForm):
|
||||
class ChooseTemplateType(StripWhitespaceForm):
|
||||
|
||||
template_type = RadioField(
|
||||
'What kind of template do you want to add?',
|
||||
'',
|
||||
validators=[
|
||||
DataRequired()
|
||||
]
|
||||
)
|
||||
|
||||
def __init__(self, include_letters=False, include_copy=False, *args, **kwargs):
|
||||
def __init__(self, include_letters=False, include_copy=False, include_folder=False, *args, **kwargs):
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.template_type.choices = filter(None, [
|
||||
('email', 'Email'),
|
||||
('sms', 'Text message'),
|
||||
('letter', 'Letter') if include_letters else None,
|
||||
('email', 'Email template'),
|
||||
('sms', 'Text message template'),
|
||||
('letter', 'Letter template') if include_letters else None,
|
||||
('copy-existing', 'Copy of an existing template') if include_copy else None,
|
||||
('folder', 'Folder') if include_folder else None,
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user