23 lines
546 B
Ruby
23 lines
546 B
Ruby
|
module Import
|
||
|
module OTRS
|
||
|
class DynamicField
|
||
|
class Checkbox < Import::OTRS::DynamicField
|
||
|
def init_callback(dynamic_field)
|
||
|
@attribute_config.merge!(
|
||
|
data_type: 'boolean',
|
||
|
data_option: {
|
||
|
default: dynamic_field['Config']['DefaultValue'] == '1',
|
||
|
options: {
|
||
|
true => 'Yes',
|
||
|
false => 'No',
|
||
|
},
|
||
|
null: false,
|
||
|
translate: true,
|
||
|
}
|
||
|
)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|