Make described checkboxes a lot more clear

Instead of a weirdly located "hover over the checkbox to get a
description" message, put the actual description underneath the
checkboxes. This removes the need for javascript for it, and make the
description a lot more readily available.

This applies only to news tags for now, since that's the only use of
described checkboxes, but hopefully it will make those more clear to
people submitting.

In passing, fix how help_text for multi-checkbox field is shown -- it
was previously shown almost as part of the field name itself, making it
very hard to make out. Now make it look like all other form field help
texts.
This commit is contained in:
Magnus Hagander
2020-07-04 14:53:04 +02:00
parent 8de3732690
commit fee3746ea0
5 changed files with 14 additions and 10 deletions

View File

@ -10,12 +10,6 @@ $(document).ready(function(){
update_form_toggles($(e));
});
$('div.form-group[data-cbtitles]').each(function(idx, e) {
var d = $(e).data('cbtitles');
$.each(d, function(k,v) {
$(e).find('input[type=checkbox][value=' + k + ']').parent('div').prop('title', v);
});
});
});
function update_form_toggles(e) {