Skip to content

Commit

Permalink
Fix checkboxes not ticking themselves
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
jpdevries committed Sep 5, 2015
1 parent 2f881d9 commit 7e35500
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/components/checkblock/js/inputs/checkblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@

// Do something when the input is being loaded
input.init = function() {
$(dom.find('#checkblock_' + data.generated_id)).prop('checked', data.value);
}

// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
value:$(document.getElementById('checkblock_' + data.generated_id)).is(':checked')
value:$(dom.find('#checkblock_' + data.generated_id)).is(':checked')
}
}

Expand Down

0 comments on commit 7e35500

Please sign in to comment.