Add a selectField to edit and create templates that is only visible for platform admins that makes the template a priority template.

There is a check that the template can not be created as priority if the user is not a platform admin.
There is a check that the template can not change the `priority` unless they are a platform admin.
This commit is contained in:
Rebecca Law
2017-01-18 15:11:34 +00:00
parent dfc751ef02
commit 3dfb3806d2
8 changed files with 210 additions and 45 deletions

View File

@@ -20,6 +20,9 @@
</div>
<div class="column-three-quarters">
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
{% if current_user.has_permissions([], admin_override=True) %}
{{ textbox(form.process_type, width='1-1') }}
{% endif %}
{{ page_footer(
'Save',
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,

View File

@@ -19,6 +19,9 @@
</div>
<div class="column-two-thirds">
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=5) }}
{% if current_user.has_permissions([], admin_override=True) %}
{{ textbox(form.process_type, width='1-1') }}
{% endif %}
{{ page_footer(
'Save',
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,