<link href="__PUBLIC__/plugins/bootstrap-switch/css/bootstrap3/bootstrap-switch.css" rel="stylesheet">
<script src="__PUBLIC__/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<script>
$(".switch").bootstrapSwitch({
onSwitchChange:function(ev, state){
var name = $(ev.currentTarget).attr('name');
$.post("",{field:name, status:state}, function(d){
console.log(d);
});
}
});
</script>
<input type="checkbox" name="read" class="switch" {$config['read'] ? 'checked':''} />