fix checkbox styles

This commit is contained in:
checktheroads 2021-04-22 18:57:43 -07:00
parent d2b915f6c2
commit 2c9aa86bf0
2 changed files with 6 additions and 3 deletions

View File

@ -104,7 +104,7 @@
</div> </div>
{% if bulk_nullable %} {% if bulk_nullable %}
<div class="form-check"> <div class="form-check">
<input type="form-check-input" name="_nullify" value="{{ field.name }}" /> <input type="checkbox" class="form-check-input" name="_nullify" value="{{ field.name }}" />
<label class="form-check-label">Set Null</label> <label class="form-check-label">Set Null</label>
</div> </div>
{% if field.help_text %} {% if field.help_text %}

View File

@ -137,14 +137,17 @@ class ToggleColumn(tables.CheckBoxColumn):
if 'attrs' not in kwargs: if 'attrs' not in kwargs:
kwargs['attrs'] = { kwargs['attrs'] = {
'td': { 'td': {
'class': 'min-width' 'class': 'min-width',
},
'input': {
'class': 'form-check-input'
} }
} }
super().__init__(*args, default=default, visible=visible, **kwargs) super().__init__(*args, default=default, visible=visible, **kwargs)
@property @property
def header(self): def header(self):
return mark_safe('<input type="checkbox" class="toggle" title="Toggle all" />') return mark_safe('<input type="checkbox" class="toggle form-check-input" title="Toggle All" />')
class BooleanColumn(tables.Column): class BooleanColumn(tables.Column):