From 42ba24c9f9e751038cb63cef45016d231915fefe Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 23 Feb 2022 16:05:08 +0100 Subject: Refactor selected clients drawing in commands Refactor duplicated code as a jinja macro. --- ogcp/templates/actions/image_restore.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ogcp/templates/actions/image_restore.html') diff --git a/ogcp/templates/actions/image_restore.html b/ogcp/templates/actions/image_restore.html index 9742bbd..6120688 100644 --- a/ogcp/templates/actions/image_restore.html +++ b/ogcp/templates/actions/image_restore.html @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% import "bootstrap/wtf.html" as wtf %} +{% import "macros.html" as macros %} {% block content %} @@ -7,11 +8,7 @@ {% set ip_count = ip_list | length %}

Restore partition image to {{ip_count}} {%if ip_count > 1%}computers{% else %}computer{% endif %}

- +{{ macros.cmd_selected_clients(ip_list) }} {{ wtf.quick_form(form, action=url_for('action_image_restore'), -- cgit v1.2.3-18-g5258