mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Stop users from editing/adding templates without the correct permission
If sending SMS is disabled for a service, it should not be possible to add or modify SMS templates. If a user tries to do this, they should see a different page with a link to go back. The same thing should happen with email templates.
This commit is contained in:
47
app/templates/views/templates/action_blocked.html
Normal file
47
app/templates/views/templates/action_blocked.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Emails
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-five-sixths">
|
||||
<h1 class="heading-large">{{ notification_type.capitalize() }}</h1>
|
||||
<p>
|
||||
Sending {{ notification_type }} is an invitation‑only feature.
|
||||
</p>
|
||||
<p>
|
||||
If you want to try it out,
|
||||
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
|
||||
</p>
|
||||
|
||||
{% set
|
||||
back_link_dict = {
|
||||
'add_new_template': {
|
||||
'url' : '.add_template_by_type', 'text': 'Back to add new template'
|
||||
},
|
||||
'templates': {
|
||||
'url' : '.choose_template', 'text' : 'Back to templates'
|
||||
},
|
||||
'view_template': {
|
||||
'url' :'.view_template', 'text' : 'Back to the template'
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
{{ page_footer(
|
||||
back_link=url_for(
|
||||
back_link_dict[return_to]['url'],
|
||||
service_id=current_service.id,
|
||||
template_id=template_id),
|
||||
back_link_text=back_link_dict[return_to]['text']
|
||||
) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user