From e64c3d370d87711177ac3d975c884d60dd817393 Mon Sep 17 00:00:00 2001 From: Hilda Stastna Date: Fri, 6 Sep 2019 17:30:52 +0200 Subject: [PATCH] Make Save button respond properly on changes in NTP Servers section Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1749841 Make the button respond properly while editing an existing Zone. --- app/controllers/ops_controller/settings/common.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/ops_controller/settings/common.rb b/app/controllers/ops_controller/settings/common.rb index fcd1dfb5c29c..1d7980f43df2 100644 --- a/app/controllers/ops_controller/settings/common.rb +++ b/app/controllers/ops_controller/settings/common.rb @@ -806,6 +806,8 @@ def settings_get_form_vars field = "ntp_server_#{field_num}" next unless params.key?(field) @edit[:new][:ntp][field] = params[field] + # remove unnecessary key from @edit[:new][:ntp] if there is no change + @edit[:new][:ntp].except!(*field) if params[field] == @edit[:new][:ntp][:server][field_num - 1] end end