_form.html.haml 1.2 KB
Newer Older
1 2 3 4 5 6 7
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f|
  - if @application_setting.errors.any?
    #error_explanation
      .alert.alert-danger
        - @application_setting.errors.full_messages.each do |msg|
          %p= msg

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  %fieldset
    %legend Features
    .form-group
      = f.label :signup_enabled, class: 'control-label'
      .col-sm-10
        = f.check_box :signup_enabled, class: 'checkbox'
    .form-group
      = f.label :signin_enabled, class: 'control-label'
      .col-sm-10
        = f.check_box :signin_enabled, class: 'checkbox'
    .form-group
      = f.label :gravatar_enabled, class: 'control-label'
      .col-sm-10
        = f.check_box :gravatar_enabled, class: 'checkbox'
  %fieldset
    %legend Misc
    .form-group
      = f.label :default_projects_limit, class: 'control-label'
      .col-sm-10
        = f.number_field :default_projects_limit, class: 'form-control'
    .form-group
      = f.label :sign_in_text, class: 'control-label'
      .col-sm-10
        = f.text_area :sign_in_text, class: 'form-control'
32 33
  .form-actions
    = f.submit 'Save', class: 'btn btn-primary'