Skip to content
Snippets Groups Projects
Commit 4ad852c1 authored by Alice Heaton's avatar Alice Heaton :speech_balloon:
Browse files

Add extra markup for the checkbox so it can be themed

parent dd7a16f9
No related merge requests found
......@@ -12,7 +12,7 @@
(function($) {
$(document).ready(function() {
var selectors = {
td_input : 'form td.select_action > input',
td_input : 'form td.select_action input[type="checkbox"]',
th_select : 'form th.select_action'
};
......
......@@ -15,7 +15,10 @@ class ItemTable(tables.Table):
template = 'hid/table.html'
order_by = ('-created',)
select_action = NamedCheckBoxColumn(accessor='id', verbose_name='Select')
select_action = tables.TemplateColumn(
template_name='hid/custom_checkbox.html',
verbose_name='Select'
)
created = tables.columns.DateTimeColumn(
verbose_name='Imported',
format=settings.SHORT_DATETIME_FORMAT,
......
<div class='custom-checkbox'>
<input
type='checkbox'
id='custom-checkbox-{{ record.id }}'
value='{{ record.id }}'
name='delete'
/>
<label for='custom-checkbox-{{ record.id }}'></label>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment