summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_milestone_dropdown.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-16 08:31:04 +0100
committerPhil Hughes <me@iamphill.com>2016-07-20 10:48:02 +0100
commit7f0ccbac344ccca1fba12d5a9d4dd25f3b5f7a01 (patch)
treefb0a4838fbecbbfac1fd86541eff100cd65479ed /app/views/shared/issuable/_milestone_dropdown.html.haml
parenta33a67e511cd2cad1abb3d13088c8f39fd174e95 (diff)
downloadgitlab-ce-7f0ccbac344ccca1fba12d5a9d4dd25f3b5f7a01.tar.gz
Fix issue with milestone dropdown submitting the form without selected value
Diffstat (limited to 'app/views/shared/issuable/_milestone_dropdown.html.haml')
-rw-r--r--app/views/shared/issuable/_milestone_dropdown.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml
index 914f01e4137..c19e0674246 100644
--- a/app/views/shared/issuable/_milestone_dropdown.html.haml
+++ b/app/views/shared/issuable/_milestone_dropdown.html.haml
@@ -1,7 +1,8 @@
- project = @target_project || @project
+- selected_text = project.milestones.find(selected).try(:name)
- if selected.present?
= hidden_field_tag(name, selected)
-= dropdown_tag(milestone_dropdown_label(selected), options: { title: "Filter by milestone", toggle_class: 'js-milestone-select js-filter-submit', filter: true, dropdown_class: "dropdown-menu-selectable",
+= dropdown_tag(milestone_dropdown_label(selected_text), options: { title: "Filter by milestone", toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable",
placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected, project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do
- if project
%ul.dropdown-footer-list