Signed-off-by: Paul Kelly <paul.ian.kelly@googlemail.com>
···
From: Paul Kelly --- lib/foreman/controller/host_details.rb | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)diff --git a/lib/foreman/controller/host_details.rb b/lib/foreman/controller/host_details.rb
index 5fc6856…1d08a3c 100644
— a/lib/foreman/controller/host_details.rb
+++ b/lib/foreman/controller/host_details.rb
@@ -27,13 +27,14 @@ module Foreman::Controller::HostDetails
def use_image_selected
item = item_object
- iname = item_name
render(:update) do |page|
if item.use_image
-
page["##{item_name}_image_file"].value = item.image_file || item.default_image_file
-
page["##{item_name}_image_file"].attr('disabled', false)
-
page["##{iname}_image_file"].value = item.image_file || item.default_image_file
-
page["##{iname}_image_file"].attr('disabled', false) else
-
page["##{item_name}_image_file"].value = ""
-
page["##{item_name}_image_file"].attr('disabled', true)
-
page["##{iname}_image_file"].value = ""
-
endpage["##{iname}_image_file"].attr('disabled', true) end
end
–
1.7.4.1