mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Create new folders inside the current folder
When adding a new folder it is created inside the currently active one. The user is returned to the previously active folder page, which shows the added folder. This adds a new route to the add template/folder views. Thankfully, `url_for` recognizes when `template_folder_id` is `None` and will use the URL without `/folders/...`, so users without folder permissions should be unaffected by this change.
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
<div class="column-one-third">
|
||||
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id) }}" class="button align-with-heading">Add new template</a>
|
||||
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id, template_folder_id=current_template_folder_id) }}" class="button align-with-heading">Add new template</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user