Commit ee957d3a authored by Sean McGivern's avatar Sean McGivern

Move merge params to their own partial

parent f40e8837
......@@ -45,6 +45,8 @@
= render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form
= render 'shared/issuable/form/merge_params', issuable: issuable
- if @merge_request_for_resolving_discussions
.form-group
.col-sm-10.col-sm-offset-2
......
......@@ -19,19 +19,3 @@
- if issuable.new_record?
 
= link_to 'Change branches', mr_change_branches_path(issuable)
.form-group
.col-sm-10.col-sm-offset-2
- if issuable.can_remove_source_branch?(current_user)
.checkbox
= label_tag 'merge_request[force_remove_source_branch]' do
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
= check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?
Remove source branch when merge request is accepted.
- if issuable.new_record?
.checkbox
= label_tag 'merge_request[squash]' do
= check_box_tag 'merge_request[squash]', nil
Squash commits when merge request is accepted.
= link_to 'Learn more', help_page_path('user/project/merge_requests/squash_before_merge')
- issuable = local_assigns.fetch(:issuable)
- return unless issuable.is_a?(MergeRequest)
- return if issuable.closed_without_fork?
.form-group
.col-sm-10.col-sm-offset-2
- if issuable.can_remove_source_branch?(current_user)
.checkbox
= label_tag 'merge_request[force_remove_source_branch]' do
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
= check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?
Remove source branch when merge request is accepted.
.checkbox
= label_tag 'merge_request[squash]' do
= hidden_field_tag 'merge_request[squash]', '0', id: nil
= check_box_tag 'merge_request[squash]', '1', issuable.squash
Squash commits when merge request is accepted.
= link_to 'Learn more', help_page_path('user/project/merge_requests/squash_before_merge')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment