Commit ccae561f 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 69ff7657
......@@ -152,6 +152,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@target_project = selected_target_project
@target_branches = @target_project.repository.branch_names
@target_branches
respond_to do |format|
format.js
end
end
def ci_status
......
:plain
$(".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("");
$(".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