gitlab-org--gitlab-foss/app/views/projects/protected_branches/_dropdown.html.haml
Eric Eastwood 550adacb3e Fix custom protected branch pattern jumping scroll position to top
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/30149

Use more semantic `<button>` element and prevent the form from
submitting.
2017-03-27 21:27:25 -05:00

15 lines
773 B
Text

= f.hidden_field(:name)
= dropdown_tag('Select branch or create wildcard',
options: { toggle_class: 'js-protected-branch-select js-filter-submit wide',
filter: true, dropdown_class: "dropdown-menu-selectable", placeholder: "Search protected branches",
footer_content: true,
data: { show_no: true, show_any: true, show_upcoming: true,
selected: params[:protected_branch_name],
project_id: @project.try(:id) } }) do
%ul.dropdown-footer-list
%li
%button{ class: "create-new-protected-branch-button js-create-new-protected-branch", title: "New Protected Branch" }
Create wildcard
%code