Commit 92a7119c authored by Nicolas Widart's avatar Nicolas Widart

Making the checkbox actually work

parent 9742c28c
......@@ -72,6 +72,16 @@ $( document ).ready(function() {
checkboxClass: 'icheckbox_flat-blue',
radioClass: 'iradio_flat-blue'
});
$('input[type="checkbox"]').on('ifChecked', function(){
$(this).parent().find('input[type=hidden]').remove();
});
$('input[type="checkbox"]').on('ifUnchecked', function(){
var name = $(this).attr('name'),
input = '<input type="hidden" name="' + name + '" value="0" />';
$(this).parent().append(input);
});
});
</script>
@stop
......@@ -6,7 +6,7 @@
type="checkbox"
class="flat-blue"
{{ isset($settings[$settingName]) && (bool)$settings[$settingName]->translate($lang)->value == true ? 'checked' : '' }}
value="true" />
value="1" />
{{ $moduleInfo['description'] }}
</label>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment