Commit 971c6e8d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Rebase button depends on ff-only merge feature

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 88115792
...@@ -7,21 +7,18 @@ ...@@ -7,21 +7,18 @@
.checkbox .checkbox
= f.label :merge_requests_ff_only_enabled do = f.label :merge_requests_ff_only_enabled do
= f.check_box :merge_requests_ff_only_enabled = f.check_box :merge_requests_ff_only_enabled
%strong Only fast-forward merge
%br
%span.descr Accept merge request button will do only fast-forward merges %span.descr Accept merge request button will do only fast-forward merges
.form-group .form-group.rebase-feature
.col-sm-offset-2.col-sm-10 .col-sm-offset-2.col-sm-10
.checkbox .checkbox
= f.label :merge_requests_rebase_enabled do = f.label :merge_requests_rebase_enabled do
= f.check_box :merge_requests_rebase_enabled = f.check_box :merge_requests_rebase_enabled
%span.descr Allows rebasing of merge requests before merging. %strong Rebase button
%br
.form-group.rebase-default %span.descr Allows rebasing of merge requests before fast-forward merge.
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :merge_requests_rebase_default do
= f.check_box :merge_requests_rebase_default
%span.descr Rebase enabled by default
.form-group .form-group
= f.label :merge_requests_template, class: 'control-label' do = f.label :merge_requests_template, class: 'control-label' do
...@@ -72,3 +69,12 @@ ...@@ -72,3 +69,12 @@
:coffeescript :coffeescript
new UsersSelect() new UsersSelect()
mergeRequestsRebaseVisibilityCheck = ->
is_rebase_enabled = $("input#project_merge_requests_ff_only_enabled").prop("checked")
$(".rebase-feature").toggle(is_rebase_enabled)
mergeRequestsRebaseVisibilityCheck()
$("input#project_merge_requests_ff_only_enabled").change ->
mergeRequestsRebaseVisibilityCheck()
...@@ -213,16 +213,3 @@ ...@@ -213,16 +213,3 @@
= render 'shared/confirm_modal', phrase: @project.path = render 'shared/confirm_modal', phrase: @project.path
:coffeescript
$ ->
mergeRequestsRebaseVisibilityCheck = ->
is_rebase_enabled = $("input#project_merge_requests_rebase_enabled").prop("checked")
$(".rebase-default").toggle(is_rebase_enabled)
mergeRequestsRebaseVisibilityCheck()
$("input#project_merge_requests_rebase_enabled").change ->
mergeRequestsRebaseVisibilityCheck()
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