From 65d2d75ddb3670b39fdca0d67d87a8f48b797059 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 16 Sep 2024 12:05:04 +0200 Subject: templates: improve client report in image create view Remove the line reporting the IP of the selected client. No other view does that and that information is already available in the client pills. Add client pills widget. --- ogcp/templates/actions/image_create.html | 4 +--- ogcp/views.py | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'ogcp') diff --git a/ogcp/templates/actions/image_create.html b/ogcp/templates/actions/image_create.html index 0865ea0..c607b97 100644 --- a/ogcp/templates/actions/image_create.html +++ b/ogcp/templates/actions/image_create.html @@ -10,9 +10,7 @@

{{_('Create a partition image')}}

-

- {{ _('Selected client') }}: {{ form.ip.data }} -

+{{ macros.cmd_selected_clients(selected_clients) }} {{ wtf.quick_form(form, action=url_for('action_image_create'), diff --git a/ogcp/views.py b/ogcp/views.py index 9a0c8e2..5418018 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -2574,8 +2574,11 @@ def action_image_create(): form.repository.render_kw = {'readonly': True} scopes, clients = get_scopes(set(ips)) + selected_clients = list(get_selected_clients(scopes['scope']).items()) + return render_template('actions/image_create.html', form=form, - scopes=scopes) + scopes=scopes, + selected_clients=selected_clients) @app.route('/action/image/update', methods=['GET', 'POST']) -- cgit v1.2.3-18-g5258