From 04ce25e53890cefb705ce43f9046ce6c29b5d675 Mon Sep 17 00:00:00 2001 From: Bernhard Suttner Date: Fri, 8 Aug 2025 10:35:22 +0200 Subject: [PATCH] Fix issue that modal view for deploy/delete were not shown --- .../foreman_acd/app_instances/index.html.erb | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/app/views/foreman_acd/app_instances/index.html.erb b/app/views/foreman_acd/app_instances/index.html.erb index 664dd5c6..ad436636 100644 --- a/app/views/foreman_acd/app_instances/index.html.erb +++ b/app/views/foreman_acd/app_instances/index.html.erb @@ -22,13 +22,20 @@ :method => :get, :title => _("Show last deployment report for application #{app_instance}")) %> <%= action_buttons( - display_link_if_authorized(_("Deploy"), { :use_route=>"#", + display_link_if_authorized(_("Deploy"), { :use_route => :app_instances, :id => app_instance.id, :action => :deploy, :auth_object => app_instance, :controller => :app_instances }, - :remote => true, 'data-toggle': "modal", 'data-target': "#deploy#{app_instance.id}", - :title => _("Deploy application #{app_instance}")), + { + :remote => false, + :href => "#", # don't navigate + :data => { + :toggle => "modal", + :target => "#deploy#{app_instance.id}" + }, + :title => _("Deploy application #{app_instance}") + }), display_link_if_authorized(_("Run Playbook"), hash_for_remote_execution_path(:id => app_instance.id), :method => :post, @@ -37,13 +44,20 @@ hash_for_remote_execution_path(:id => app_instance.id, :customize => true), :method => :post, :title => _("Prepare job to run ansible playbook for application #{app_instance}")), - display_link_if_authorized(_("Delete"), { :use_route=>"#", + display_link_if_authorized(_("Delete"), { :use_route => :app_instances, :id => app_instance.id, :action => :destroy, :auth_object => app_instance, :controller => :app_instances }, - :remote => true, 'data-toggle': "modal", 'data-target': "#delete#{app_instance.id}", - :title => _("Delete application #{app_instance}")) + { + :remote => false, + :href => "#", # don't navigate + :data => { + :toggle => "modal", + :target => "#delete#{app_instance.id}" + }, + :title => _("Delete application #{app_instance}") + }) ) %>