diff --git a/media/css/main.css b/media/css/main.css index 0eb6e06c..7e04d221 100644 --- a/media/css/main.css +++ b/media/css/main.css @@ -1235,6 +1235,11 @@ th.formfieldnamecontainer { margin: 0.5em 0; } +.form-check div.describedcheckbox { + margin-left: 3rem; + font-style: italic; +} + .form-check-input[type=radio] { margin-top: .4rem; } diff --git a/media/js/forms.js b/media/js/forms.js index eba6cca2..cd91c8f2 100644 --- a/media/js/forms.js +++ b/media/js/forms.js @@ -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) { diff --git a/pgweb/news/migrations/0003_news_tags.py b/pgweb/news/migrations/0003_news_tags.py index 9235725c..80e05aed 100644 --- a/pgweb/news/migrations/0003_news_tags.py +++ b/pgweb/news/migrations/0003_news_tags.py @@ -29,6 +29,6 @@ class Migration(migrations.Migration): 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'), ), ] diff --git a/pgweb/news/models.py b/pgweb/news/models.py index 4fe6f640..296a11d9 100644 --- a/pgweb/news/models.py +++ b/pgweb/news/models.py @@ -22,7 +22,7 @@ class NewsArticle(models.Model): 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 diff --git a/templates/base/form_contents.html b/templates/base/form_contents.html index 0b7904a9..07a8edb9 100644 --- a/templates/base/form_contents.html +++ b/templates/base/form_contents.html @@ -25,7 +25,7 @@ {% else %}{# field|ischeckbox #} -
+
{% if not field|ismultiplecheckboxes %}
@@ -38,11 +38,16 @@ {%endif%}
{% else %} - {{ field.label_tag }} {{field.help_text|safe}} + {{ field.label_tag }} + {%if field.help_text%}{{field.help_text|safe}}{%endif%} {% for cb in field %}
{{ cb.tag }} +{%if described_checkboxes|dictlookup:field.name%} + +
{{described_checkboxes|dictlookup:field.name|dictlookup:cb.data.value}}
+{%endif%}
{% endfor %} {% endif %}