From efd0b8acb3f4f098697c8c30bd196dacda39b704 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 18 Jul 2024 15:34:09 +0200 Subject: ogcp: add image restrict functionality Add center scope restriction using /image/restrict. Add view in Images to update scope permissions. Disable images in Commands for image update and restore if the client belongs to a disabled center. Consolidate template code to render scope selection checkboxes. --- ogcp/templates/actions/image_details.html | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'ogcp/templates/actions/image_details.html') diff --git a/ogcp/templates/actions/image_details.html b/ogcp/templates/actions/image_details.html index 87105cb..ab66503 100644 --- a/ogcp/templates/actions/image_details.html +++ b/ogcp/templates/actions/image_details.html @@ -7,9 +7,23 @@

{{_('Image details')}}

-{{ wtf.quick_form(form, - method='post', - button_map={'create': 'primary'}, - extra_classes="mx-5") }} +
+
+ {{ form.hidden_tag() }} + + {% for field in form if field.type != 'CSRFToken' and field.name not in ['scopes'] %} + {% if not field.flags.hidden %} +
+ +
+ {{ field(class="form-control") }} +
+
+ {% endif %} + {% endfor %} + + {% include 'scopes_checkbox_group.html' %} +
+
{% endblock %} -- cgit v1.2.3-18-g5258