#{get_breadcrumbs}

#{ form_for(@settings_ordered, :method => :post, :action => @form_save_url, :id => :setting_form) do |f| f.input_hidden(:csrf_token, get_csrf_token) @settings_ordered.each do |group, items| f.g.div(:id => "group_#{group}") do items.each do |s| # Get the value from either the value or default getter if ::Zen.settings[s.name.to_sym].nil? value = s.default else value = ::Zen.settings[s.name.to_sym] end case s.type when 'textbox' f.input_text( s.title, s.name, :value => value ) when 'textarea' f.textarea( s.title, s.name, :value => value, :rows => 8 ) when 'radio' f.input_radio( s.title, s.name, value, :values => s.values ) when 'checkbox' f.input_checkbox( s.title, s.name, value, :values => s.values ) when 'select' f.select( s.title, s.name, :values => s.values, :size => 1, :selected => value ) end end end end f.g.div(:class => 'clearfix') do f.g.div(:class => 'button') do f.g.input(:type => 'submit', :value => lang('settings.buttons.save')) end end end }