Skip to content

Instantly share code, notes, and snippets.

@MischaTheEvil
Created April 5, 2009 01:38
Show Gist options
  • Save MischaTheEvil/90348 to your computer and use it in GitHub Desktop.
Save MischaTheEvil/90348 to your computer and use it in GitHub Desktop.
Getting a "nested" setting
<p>
<label><%= l(:setting_collapse_menustab) %></label>
<%= check_box_tag 'settings[show_menus_tab]', 1, Setting.plugin_redmine_collapse['show_menus_tab'] == '1', :onclick=>"Element.toggle('menustab_content'); return true;" %><%= hidden_field_tag 'settings[show_menus_tab]', 0 %>
</p>
<div id="menustab_content" <%= Setting.plugin_redmine_collapse['show_menus_tab'] == '1' ? '' : 'style="display:none"' %>>
<p>
<label><%= l(:setting_collapse_pmtab) %></label>
<%= select_tag 'settings[show_projectmenu_tab]', options_for_select( [[l(:general_text_No), "0"], [l(:general_text_Yes), "1"]], @settings ['show_projectmenu_tab'] ) %>
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment