summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
blob: 9f0c4f3b3a8af9f3615677f9981a2c8112fd3022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
= form_for [@project.namespace.becomes(Namespace), @project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f|
  .panel.panel-default
    .panel-heading
      %h3.panel-title
        Protect a branch
    .panel-body
      .form-horizontal
        = form_errors(@protected_branch)
        .form-group
          = f.label :name, class: 'col-md-2 text-right' do
            Branch:
          .col-md-10
            = render partial: "projects/protected_branches/shared/dropdown", locals: { f: f }
            .help-block
              = link_to 'Wildcards', help_page_path('user/project/protected_branches', anchor: 'wildcard-protected-branches')
              such as
              %code *-stable
              or
              %code production/*
              are supported
        .form-group
          %label.col-md-2.text-right{ for: 'merge_access_levels_attributes' }
            Allowed to merge:
          .col-md-10
            = yield :merge_access_levels
        .form-group
          %label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
            Allowed to push:
          .col-md-10
            = yield :push_access_levels

    .panel-footer
      = f.submit 'Protect', class: 'btn-create btn', disabled: true