%h1
  = @settings_group
  settings page

= form_tag admin_site_settings_path, :method => :put do
  - @settings.each do |s|
    = fields_for "site_settings[]", s do |f|
      .field
        = f.label s.setting_name
        = f.text_field :setting_value, :class => s.setting_type
  .actions
    %button{type: "submit"} Save

= @settings.inspect

%script
  $("input.color_field").minicolors({
  swatches: #{raw(@site_settings[:brand][:colors].values)}
  });

%h1
  = @settings_group
  settings page

= form_tag admin_site_settings_path, :method => :put do
  - @settings.each do |s|
    = fields_for "site_settings[]", s do |f|
      .field
        = f.label s.setting_name
        - if s.setting_type == "text_field" || s.setting_type == "color_field"
          = f.text_field :setting_value, :class => s.setting_type
        - elsif s.setting_type == "file_field"
          = f.file_field :setting_value, 'class': 'image_upload_input'

  .actions
    %button{type: "submit"} Save

= @settings.inspect

%script
  $("input.color_field").minicolors({
  swatches: #{raw(@site_settings[:brand][:colors].values)}
  });

Support for image upload field in settings (no working upload yet tho)
Support for image upload field in settings (no working upload yet tho)

