<%= setting_fields.label setting.name, setting.name.to_s.titleize %>
<% case setting.vartype %>
<% when 0 %>
<%= setting_fields.text_field( setting.name ) %>
<% when 1 %>
<%= setting_fields.text_area( setting.name ) %>
<% when 2 %>
<% setting.type_opt.split(',').each do |option|%>
<% end %>
<% when 3 %>
<% setting.type_opt.split(',').each do |option|%>
<% end %>
<% when 4 %>
<%= setting_fields.radio_button( setting.name, "true" ) %>
True
<%= setting_fields.radio_button( setting.name, "false" ) %>
False
<% when 5 %>
<%= setting_fields.select( setting.name, setting.type_opt.split(',').collect {|opt| opt.humanize.titleize} ) %>
<% end %>
<% end %>
<% end %>