Merge pull request #3558 from alphagov/only-allow-new-template-if-permission-is-there

Services can only create templates of types they have turned on
This commit is contained in:
Pea M. Tyczynska
2020-08-17 14:39:16 +01:00
committed by GitHub
8 changed files with 121 additions and 20 deletions

View File

@@ -5,13 +5,13 @@
{% from "components/form.html" import form_wrapper %}
{% block service_page_title %}
{{ heading_action }} broadcast template
{{ heading_action }} template
{% endblock %}
{% block maincolumn_content %}
{{ page_header(
'{} broadcast template'.format(heading_action),
'{} template'.format(heading_action),
back_link=url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.choose_template', service_id=current_service.id, template_folder_id=template_folder_id)
) }}

View File

@@ -28,7 +28,7 @@
{{ page_footer('Add new folder', button_name='operation', button_value='add-new-folder') }}
</fieldset>
</div>
<div id="add_new_template_form">
<div id="add_new_template_form" {% if single_notification_channel %}data-channel="{{single_notification_channel}}" data-service="{{current_service.id}}"{% endif %}>
<div class="js-will-stick-at-bottom-when-scrolling">
{{ radios(templates_and_folders_form.add_template_by_template_type) }}
</div>