margin: 0.5em 0;
}
+.form-check div.describedcheckbox {
+ margin-left: 3rem;
+ font-style: italic;
+}
+
.form-check-input[type=radio] {
margin-top: .4rem;
}
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) {
migrations.AddField(
model_name='newsarticle',
name='tags',
- field=models.ManyToManyField(help_text='Hover mouse over tags to view full description', to='news.NewsTag'),
+ field=models.ManyToManyField(help_text='Select the tags appropriate for this post', to='news.NewsTag'),
),
]
title = models.CharField(max_length=200, null=False, blank=False)
content = models.TextField(null=False, blank=False)
tweeted = models.BooleanField(null=False, blank=False, default=False)
- tags = models.ManyToManyField(NewsTag, blank=False, help_text="Hover mouse over tags to view full description")
+ tags = models.ManyToManyField(NewsTag, blank=False, help_text="Select the tags appropriate for this post")
send_notification = True
send_m2m_notification = True
</div>
</div>
{% else %}{# field|ischeckbox #}
- <div class="form-group"{%if field|ismultiplecheckboxes%} data-cbtitles="{{described_checkboxes|dictlookup:field.name|json}}"{%endif%}>
+ <div class="form-group">
<div class="col-lg-12 {%if field|isrequired_error%} alert alert-danger{%endif%}">
{% if not field|ismultiplecheckboxes %}
<div class="form-check">
{%endif%}
</div>
{% else %}
- {{ field.label_tag }} {{field.help_text|safe}}
+ {{ field.label_tag }}
+ {%if field.help_text%}<small class="form-text">{{field.help_text|safe}}</small>{%endif%}
{% for cb in field %}
<div class="form-check">
{{ cb.tag }}
<label for="{{ cb.id_for_label }}" class="form-check-label">{{ cb.choice_label }}</label>
+{%if described_checkboxes|dictlookup:field.name%}
+
+ <div class="describedcheckbox">{{described_checkboxes|dictlookup:field.name|dictlookup:cb.data.value}}</div>
+{%endif%}
</div>
{% endfor %}
{% endif %}