_form.html.haml 2.9 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 12 13 14
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :signup_enabled do
            = f.check_box :signup_enabled
15
            Signup enabled
16
    .form-group
17 18 19 20
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :signin_enabled do
            = f.check_box :signin_enabled
21
            Signin enabled
22
    .form-group
23 24 25 26 27
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :gravatar_enabled do
            = f.check_box :gravatar_enabled
            Gravatar enabled
28
    .form-group
29 30 31 32 33 34
      .col-sm-offset-2.col-sm-10
        .checkbox
          = f.label :twitter_sharing_enabled do
            = f.check_box :twitter_sharing_enabled, :'aria-describedby' => 'twitter_help_block'
            %strong Twitter enabled
          %span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter
35 36 37
  %fieldset
    %legend Misc
    .form-group
38
      = f.label :default_projects_limit, class: 'control-label col-sm-2'
39 40
      .col-sm-10
        = f.number_field :default_projects_limit, class: 'form-control'
41
    .form-group
42
      = f.label :default_branch_protection, class: 'control-label col-sm-2'
43 44
      .col-sm-10
        = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
45 46 47 48 49 50 51 52
    .form-group
      = f.label :restricted_visibility_levels, class: 'control-label col-sm-2'
      .col-sm-10
        - data_attrs = { toggle: 'buttons' }
        .btn-group{ data: data_attrs }
          - restricted_level_checkboxes('restricted-visibility-help').each do |level|
            = level
        %span.help-block#restricted-visibility-help Selected levels cannot be used by non-admin users for projects or snippets
53
    .form-group
54
      = f.label :home_page_url, class: 'control-label col-sm-2'
55
      .col-sm-10
56 57
        = 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
58
    .form-group
59
      = f.label :sign_in_text, class: 'control-label col-sm-2'
60
      .col-sm-10
61 62
        = f.text_area :sign_in_text, class: 'form-control', rows: 4
        .help-block Markdown enabled
63 64 65 66 67
    .form-group
      = f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'control-label col-sm-2'
      .col-sm-10
        = f.number_field :max_attachment_size, class: 'form-control'

68 69
  .form-actions
    = f.submit 'Save', class: 'btn btn-primary'