disable the submenu radio button if no main items are available

pull/41/head
Romano Licker 12 years ago committed by Jens Ulferts
parent 8906ba3554
commit 98afc0f37a
  1. 4
      app/views/wiki_menu_items/edit.rhtml

@ -31,9 +31,9 @@
<%= form.label 'index_page', l(:label_wiki_show_index_page_link) %>
</p>
<p>
<%= 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 %>
</p>
</fieldset>

Loading…
Cancel
Save