Commit eb4320cb07db2b704d6e976fe9e2ac7d959b6c25
1 parent
a87f0376
Exists in
spb-stable
and in
3 other branches
Remove assignee/milestone selects from MR form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
14 additions
and
31 deletions
Show diff stats
app/views/projects/merge_requests/_form.html.haml
1 | -- if @repository.contribution_guide && !@merge_request.persisted? | |
2 | - - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name)) | |
3 | - .alert.alert-info.col-sm-10.col-sm-offset-2 | |
4 | - ="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe | |
5 | 1 | = form_for [@project, @merge_request], html: { class: "merge-request-form form-horizontal" } do |f| |
6 | - -if @merge_request.errors.any? | |
7 | - .alert.alert-danger | |
8 | - %ul | |
9 | - - @merge_request.errors.full_messages.each do |msg| | |
10 | - %li= msg | |
2 | + .row | |
3 | + .col-sm-2 | |
4 | + .col-sm-10 | |
5 | + - if @repository.contribution_guide && !@merge_request.persisted? | |
6 | + - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name)) | |
7 | + .alert.alert-info | |
8 | + Please review the | |
9 | + %strong #{link_to "guidelines for contribution", contribution_guide_url} | |
10 | + to this repository. | |
11 | + | |
12 | + -if @merge_request.errors.any? | |
13 | + .alert.alert-danger | |
14 | + - @merge_request.errors.full_messages.each do |msg| | |
15 | + %div= msg | |
11 | 16 | |
12 | 17 | .merge-request-branches |
13 | 18 | .form-group |
... | ... | @@ -47,24 +52,6 @@ |
47 | 52 | = f.text_area :description, class: "form-control js-gfm-input", rows: 14 |
48 | 53 | %p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. |
49 | 54 | |
50 | - %hr | |
51 | - .form-group | |
52 | - .merge-request-assignee | |
53 | - = f.label :assignee_id, class: 'control-label' do | |
54 | - %i.icon-user | |
55 | - Assign to | |
56 | - .col-sm-10 | |
57 | - = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id) | |
58 | - | |
59 | - = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link' | |
60 | - .form-group | |
61 | - .merge-request-milestone | |
62 | - = f.label :milestone_id, class: 'control-label' do | |
63 | - %i.icon-time | |
64 | - Milestone | |
65 | - .col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'}) | |
66 | - | |
67 | - | |
68 | 55 | .form-actions |
69 | 56 | - if @merge_request.new_record? |
70 | 57 | = f.submit 'Submit merge request', class: "btn btn-create" |
... | ... | @@ -96,7 +83,3 @@ |
96 | 83 | target_branch.on("change", function() { |
97 | 84 | $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() }); |
98 | 85 | }); |
99 | - $('.assign-to-me-link').on('click', function(e){ | |
100 | - $('#merge_request_assignee_id').val("#{current_user.id}").trigger("change"); | |
101 | - e.preventDefault(); | |
102 | - }); | ... | ... |