diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-30 16:32:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-30 16:32:39 +0300 |
commit | 52a3d4372c6e45e4ffb792a9fe7bfca84f3573a3 (patch) | |
tree | 35b80fd5034ce411af8d4c5102756cadfdda0256 /app/helpers | |
parent | 83550c02c0b3eea942ec34969d406e953d53b587 (diff) | |
parent | a7349560b2d13ea7894a462738b3a7687fdbae72 (diff) |
Merge branch '19107-404-when-creating-new-milestone-or-issue-for-project-that-has-issues-disabled' into 'master'
'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled
Closes #19107
See merge request !11754
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/selects_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/selects_helper.rb b/app/helpers/selects_helper.rb index a7d1fe4aa47..1a4f1431bdc 100644 --- a/app/helpers/selects_helper.rb +++ b/app/helpers/selects_helper.rb @@ -45,6 +45,14 @@ module SelectsHelper end end + with_feature_enabled_data_attribute = + case opts.delete(:with_feature_enabled) + when 'issues' then 'data-with-issues-enabled' + when 'merge_requests' then 'data-with-merge-requests-enabled' + end + + opts[with_feature_enabled_data_attribute] = true + hidden_field_tag(id, opts[:selected], opts) end |