Skip to content

Commit

Permalink
Merge pull request #2859 from skateman/bz-1517908
Browse files Browse the repository at this point in the history
Fix handling default values for help menu settings
(cherry picked from commit 2e33e59)

https://bugzilla.redhat.com/show_bug.cgi?id=1517908
  • Loading branch information
mzazrivec authored and simaishi committed Dec 4, 2017
1 parent d379259 commit d1d48d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/controllers/ops_controller/settings/help_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def help_menu_form_field_changed
param = params["#{item}_#{field}"]
next if param.nil?

@edit[:new][item][field] = param == 'null' ? false : param
@edit[:new][item][field] = param
@edit[:new][item].delete(field) if param.empty?
end
end

Expand Down
9 changes: 3 additions & 6 deletions app/presenters/menu/default_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,15 @@ def help_menu_section
menu = {
:documentation => {
:title => N_('Documentation'),
:href => '/support/index?support_tab=about',
:type => nil,
:href => '/support/index?support_tab=about'
},
:product => {
:title => I18n.t('product.support_website_text'),
:href => I18n.t("product.support_website").html_safe,
:type => :new_window,
:href => I18n.t("product.support_website").html_safe
},
:about => {
:title => N_('About'),
:href => '#aboutModal',
:type => :modal
:href => '#aboutModal'
}
}.map do |key, value|
Menu::Item.new(key,
Expand Down

0 comments on commit d1d48d7

Please sign in to comment.