Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix displaying tag from DialogFieldTagControl
Browse files Browse the repository at this point in the history
We are able to keep only one value of selected
tag in DialogFieldTagControl.
lpichler committed May 9, 2017
1 parent 83e21a2 commit 27ca826
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/shared/dialogs/_dialog_field.html.haml
Original file line number Diff line number Diff line change
@@ -47,17 +47,17 @@
= button_tag(_("Save"), :class => edit ? 'btn btn-primary' : 'btn btn-primary disabled')

- when 'DialogFieldTagControl'
- if edit
- if edit
= select_tag(field.name,
options_for_select(dialog_dropdown_select_values(field), wf.value(field.name)),
drop_down_options(field, url))
:javascript
dialogFieldRefresh.initializeDialogSelectPicker('#{field.name}', undefined, '#{url}', JSON.parse('#{j(auto_refresh_options.to_json)}'));

- else
- value = wf.value(field.name) || ''
- classification_ids = value.split(',')
= h(Classification.where(:id => classification_ids).collect(&:description).join(', '))
- value = wf.value(field.name) || '' # it returns in format for example Clasification::id
- _ ,classification_id = value.split('::')
= h(Classification.find(classification_id).description)

:javascript
dialogFieldRefresh.setVisible($('#field_#{field.id}_tr'), #{field.visible});

0 comments on commit 27ca826

Please sign in to comment.