Commit 1150bad2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix selectbox when submit MR from fork to origin

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 51f06bad
...@@ -152,6 +152,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -152,6 +152,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@target_project = selected_target_project @target_project = selected_target_project
@target_branches = @target_project.repository.branch_names @target_branches = @target_project.repository.branch_names
@target_branches @target_branches
respond_to do |format|
format.js
end
end end
def ci_status def ci_status
......
:plain :plain
$(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}"); $(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}");
$(".target_branch").trigger("select2:updated");
$('select.target_branch').select2({
width: 'resolve',
dropdownAutoWidth: true
});
$(".mr_target_commit").html(""); $(".mr_target_commit").html("");
$(".target_branch").trigger("change");
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