multiselect.rb 626 B

123456789101112131415161718192021
  1. module Import
  2. module OTRS
  3. class DynamicField
  4. class Multiselect < Import::OTRS::DynamicField
  5. def init_callback(dynamic_field)
  6. @attribute_config.merge!(
  7. data_type: 'select',
  8. data_option: {
  9. default: '',
  10. multiple: true,
  11. options: dynamic_field['Config']['PossibleValues'],
  12. nulloption: dynamic_field['Config']['PossibleNone'] == '1',
  13. null: true,
  14. translate: dynamic_field['Config']['TranslatableValues'] == '1',
  15. }
  16. )
  17. end
  18. end
  19. end
  20. end
  21. end