/**
 * SwitchButtons UI Elements
 */
IGDATAPOOLFE.plugins.add('switchButton', {
    form: null,
    initFields: function(form) {
	this.init(form);
    },
    init: function(form) {
	let $form = $(form);
	this.form = $form;
		$('.dp-switchbutton', $form).each(function() {
			var $input = $('input[type=checkbox]', this);
			$input.switchButton({
				on_label : $(this).data('onlabel'),
				off_label : $(this).data('offlabel')
			});
		});
    }
});