_form.html.haml 1.7 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
  %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'
28 29 30 31
    .form-group
      = f.label :default_branch_protection, class: 'control-label'
      .col-sm-10
        = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
32 33 34 35
    .form-group
      = f.label :home_page_url, class: 'control-label'
      .col-sm-10
        = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com'
36
        %span.help-block We will redirect non-logged in users to this page
37 38 39 40
    .form-group
      = f.label :sign_in_text, class: 'control-label'
      .col-sm-10
        = f.text_area :sign_in_text, class: 'form-control'
41 42
  .form-actions
    = f.submit 'Save', class: 'btn btn-primary'