Commit b1c4fdec authored by Clement Ho's avatar Clement Ho

[skip ci] Fix form for new issuable

parent 67cedaa9
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
and make sure your changes will not unintentionally remove theirs and make sure your changes will not unintentionally remove theirs
.form-group.row .form-group.row
= form.label :title, class: 'col-form-label' = form.label :title, class: 'col-form-label col-sm-2'
= render 'shared/issuable/form/template_selector', issuable: issuable = render 'shared/issuable/form/template_selector', issuable: issuable
= render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:work_in_progress?) = render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:work_in_progress?)
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
%hr %hr
- if issuable.new_record? - if issuable.new_record?
.form-group .form-group.row
= form.label :source_branch, class: 'col-form-label' = form.label :source_branch, class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.issuable-form-select-holder .issuable-form-select-holder
= form.select(:source_branch, [issuable.source_branch], {}, { class: 'source_branch select2 ref-name', disabled: true }) = form.select(:source_branch, [issuable.source_branch], {}, { class: 'source_branch select2 ref-name', disabled: true })
.form-group .form-group.row
= form.label :target_branch, class: 'col-form-label' = form.label :target_branch, class: 'col-form-label col-sm-2'
.col-sm-10.target-branch-select-dropdown-container .col-sm-10.target-branch-select-dropdown-container
.issuable-form-select-holder .issuable-form-select-holder
= form.hidden_field(:target_branch, = form.hidden_field(:target_branch,
......
...@@ -9,27 +9,27 @@ ...@@ -9,27 +9,27 @@
%hr %hr
.row .row
%div{ class: (has_due_date ? "col-lg-6" : "col-sm-12") } %div{ class: (has_due_date ? "col-lg-6" : "col-sm-12") }
.form-group.issue-assignee .form-group.row.issue-assignee
- if issuable.is_a?(Issue) - if issuable.is_a?(Issue)
= render "shared/issuable/form/metadata_issue_assignee", issuable: issuable, form: form, has_due_date: has_due_date = render "shared/issuable/form/metadata_issue_assignee", issuable: issuable, form: form, has_due_date: has_due_date
- else - else
= render "shared/issuable/form/metadata_merge_request_assignee", issuable: issuable, form: form, has_due_date: has_due_date = render "shared/issuable/form/metadata_merge_request_assignee", issuable: issuable, form: form, has_due_date: has_due_date
.form-group.issue-milestone .form-group.row.issue-milestone
= form.label :milestone_id, "Milestone", class: "col-form-label #{"col-lg-4" if has_due_date}" = form.label :milestone_id, "Milestone", class: "col-form-label #{has_due_date ? "col-lg-4" : "col-sm-2"}"
.col-sm-10{ class: ("col-lg-8" if has_due_date) } .col-sm-10{ class: ("col-lg-8" if has_due_date) }
.issuable-form-select-holder .issuable-form-select-holder
= render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]", show_any: false, show_upcoming: false, show_started: false, extra_class: "js-issuable-form-dropdown js-dropdown-keep-input", dropdown_title: "Select milestone" = render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]", show_any: false, show_upcoming: false, show_started: false, extra_class: "js-issuable-form-dropdown js-dropdown-keep-input", dropdown_title: "Select milestone"
.form-group .form-group.row
- has_labels = @labels && @labels.any? - has_labels = @labels && @labels.any?
= form.label :label_ids, "Labels", class: "col-form-label #{"col-lg-4" if has_due_date}" = form.label :label_ids, "Labels", class: "col-form-label #{has_due_date ? "col-lg-4" : "col-sm-2"}"
= form.hidden_field :label_ids, multiple: true, value: '' = form.hidden_field :label_ids, multiple: true, value: ''
.col-sm-10{ class: "#{"col-lg-8" if has_due_date} #{'issuable-form-padding-top' if !has_labels}" } .col-sm-10{ class: "#{"col-lg-8" if has_due_date} #{'issuable-form-padding-top' if !has_labels}" }
.issuable-form-select-holder .issuable-form-select-holder
= render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false}, dropdown_title: "Select label" = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false}, dropdown_title: "Select label"
- if has_due_date - if has_due_date
.col-lg-6 .col-lg-6
.form-group .form-group.row
= form.label :due_date, "Due date", class: "col-form-label" = form.label :due_date, "Due date", class: "col-form-label col-sm-2"
.col-sm-10 .col-sm-10
.issuable-form-select-holder .issuable-form-select-holder
= form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: "Select due date" = form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: "Select due date"
= form.label :assignee_id, "Assignee", class: "col-form-label #{"col-lg-4" if has_due_date}" = form.label :assignee_id, "Assignee", class: "col-form-label #{has_due_date ? "col-lg-4" : "col-sm-2"}"
.col-sm-10{ class: ("col-lg-8" if has_due_date) } .col-sm-10{ class: ("col-lg-8" if has_due_date) }
.issuable-form-select-holder .issuable-form-select-holder
= form.hidden_field :assignee_id = form.hidden_field :assignee_id
......
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