Skip to content

Commit

Permalink
Revert "Merge pull request #9220 from GilbertCherrie/fix_request_form…
Browse files Browse the repository at this point in the history
…_fields"

This reverts commit cf20fa1, reversing
changes made to 43bb230.
  • Loading branch information
Fryguy committed Nov 4, 2024
1 parent 8bc61a8 commit 0a3bfeb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/views/miq_request/_request_dialog_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@
= h(field.values.detect { |k, _v| k == wf.value(field.name) }.try(:last) || wf.value(field.name))

- when "DialogFieldDropDownList"
- if field.value.instance_of?(Array)
= h(field.value.blank? ? _("<None>") : h(field.value.join(", ")))
- else
= h(field.value.blank? ? _("<None>") : h(field.value))
= h(field.value.blank? ? _("<None>") : field.value.to_s.gsub("\x1F", ", "))

- when 'DialogFieldTagControl'
- value = wf.value(field.name) || ''
- classifications = Classification.where(:id => value).pluck(:description)
- value = wf.value(field.name) || '' # it returns in format Clasification::id
- classifications = value.split(',').map do |c|
- classification = Classification.find_by(id: c.split('::').second)
- classification.description if classification
- if classifications.empty?
= h('')
-else
Expand Down

0 comments on commit 0a3bfeb

Please sign in to comment.