Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix displaying tag from DialogFieldTagControl #1316

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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});