Hide select2 field

This commit is contained in:
Alexandr Antonov 2023-12-14 12:12:40 +03:00
parent 4de79d8506
commit b960c35162

View File

@ -3,7 +3,7 @@
- if author_options.present?
p#change_author
= form.label_for_field :author_id
= link_to_function tag.span(l(:button_edit), class: 'icon icon-edit'), '$(this).hide(); $("#issue_author_id").show()'
= link_to_function tag.span(l(:button_edit), class: 'icon icon-edit'), '$(this).hide(); $("#issue_author_id").show(); $("#issue_author_id").next(".select2-container").show()'
= form.select :author_id, author_options, { required: true, no_label: true }, style: 'display: none;'
javascript:
$('#change_author').insertBefore($('#issue_tracker_id').parent());