mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Pre-populate rename folder form with current name
Often people will be editing the existing name, not changing it completely. This matches what we do when someone wants to rename their template or service.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from flask import abort
|
||||
from notifications_utils.field import Field
|
||||
from werkzeug.utils import cached_property
|
||||
|
||||
@@ -307,6 +308,15 @@ class Service():
|
||||
)
|
||||
]
|
||||
|
||||
def get_template_folder(self, folder_id):
|
||||
try:
|
||||
return next(
|
||||
folder for folder in self.all_template_folders
|
||||
if folder['id'] == folder_id
|
||||
)
|
||||
except StopIteration:
|
||||
abort(404)
|
||||
|
||||
def is_folder_visible(self, template_folder_id, template_type='all'):
|
||||
|
||||
if template_type == 'all':
|
||||
|
||||
Reference in New Issue
Block a user