From fc4e76908ecc99025ff67a8f145995c13f35def9 Mon Sep 17 00:00:00 2001 From: Nadja Heitmann Date: Thu, 31 Oct 2024 13:43:12 +0100 Subject: [PATCH] fix: Only remove network interface section if compute resource is proxmox (#371) (cherry picked from commit 04082e4e57573b5f708bc8945e70edca81774e12) --- .../form/add_from_profile_to_compute_attributes_form.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/overrides/compute_resources_vms/form/add_from_profile_to_compute_attributes_form.rb b/app/overrides/compute_resources_vms/form/add_from_profile_to_compute_attributes_form.rb index 7fe5cf557..3d6c502df 100644 --- a/app/overrides/compute_resources_vms/form/add_from_profile_to_compute_attributes_form.rb +++ b/app/overrides/compute_resources_vms/form/add_from_profile_to_compute_attributes_form.rb @@ -20,7 +20,8 @@ Deface::Override.new( virtual_path: 'compute_attributes/_compute_form', name: 'remove_networks_and_volumes_partial', - remove: "erb[loud]:contains('compute_resources_vms/form/networks'), erb[loud]:contains('compute_resources_vms/form/volumes')" + surround: "erb[loud]:contains('compute_resources_vms/form/networks'), erb[loud]:contains('compute_resources_vms/form/volumes')", + text: "<% unless compute_resource.class == ForemanFogProxmox::Proxmox %><%= render_original %><% end %>" ) Deface::Override.new(