_form.html.haml 2.3 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
  %fieldset
    %legend Features
    .form-group
11
      = f.label :signup_enabled, class: 'control-label col-sm-2'
12
      .col-sm-10
13
        = f.check_box :signup_enabled, class: 'checkbox form-control'
14
    .form-group
15
      = f.label :signin_enabled, class: 'control-label col-sm-2'
16
      .col-sm-10
17
        = f.check_box :signin_enabled, class: 'checkbox form-control'
18
    .form-group
19
      = f.label :gravatar_enabled, class: 'control-label col-sm-2'
20
      .col-sm-10
21
        = f.check_box :gravatar_enabled, class: 'checkbox form-control'
22
    .form-group
23
      = f.label :twitter_sharing_enabled, "Twitter enabled", class: 'control-label col-sm-2'
24
      .col-sm-10
25 26
        = f.check_box :twitter_sharing_enabled, class: 'checkbox form-control', :'aria-describedby' => 'twitter_help_block'
        %span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter
27 28 29
  %fieldset
    %legend Misc
    .form-group
30
      = f.label :default_projects_limit, class: 'control-label col-sm-2'
31 32
      .col-sm-10
        = f.number_field :default_projects_limit, class: 'form-control'
33
    .form-group
34
      = f.label :default_branch_protection, class: 'control-label col-sm-2'
35 36
      .col-sm-10
        = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
37
    .form-group
38
      = f.label :home_page_url, class: 'control-label col-sm-2'
39
      .col-sm-10
40 41
        = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
        %span.help-block#home_help_block We will redirect non-logged in users to this page
42
    .form-group
43
      = f.label :sign_in_text, class: 'control-label col-sm-2'
44
      .col-sm-10
45 46
        = f.text_area :sign_in_text, class: 'form-control', rows: 4
        .help-block Markdown enabled
47 48
  .form-actions
    = f.submit 'Save', class: 'btn btn-primary'