From 98afc0f37abf992f25788dc4e57e5ccaae92b47a Mon Sep 17 00:00:00 2001 From: Romano Licker Date: Fri, 31 Aug 2012 15:00:48 +0200 Subject: [PATCH] disable the submenu radio button if no main items are available --- app/views/wiki_menu_items/edit.rhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/wiki_menu_items/edit.rhtml b/app/views/wiki_menu_items/edit.rhtml index 00a76b32b3..7b8d5d2d7a 100644 --- a/app/views/wiki_menu_items/edit.rhtml +++ b/app/views/wiki_menu_items/edit.rhtml @@ -31,9 +31,9 @@ <%= form.label 'index_page', l(:label_wiki_show_index_page_link) %>

- <%= form.radio_button 'setting', :sub_item %> - <%= form.label 'setting_sub_item', l(:label_wiki_show_submenu_item), {:id => 'with-select'} %> <% disabled = @possible_parent_menu_items.empty? %> + <%= form.radio_button 'setting', :sub_item, :disabled => disabled %> + <%= form.label 'setting_sub_item', l(:label_wiki_show_submenu_item), {:id => 'with-select'} %> <%= select_tag "parent_wiki_menu_item", options_for_select(@possible_parent_menu_items), :disabled => disabled %>