diff --git a/combo/apps/wcs/models.py b/combo/apps/wcs/models.py index 9afa7cc3..c43e6b77 100644 --- a/combo/apps/wcs/models.py +++ b/combo/apps/wcs/models.py @@ -25,6 +25,7 @@ from django.contrib.postgres.fields import JSONField from django.db import models from django.forms import Select from django.forms import models as model_forms +from django.utils.safestring import mark_safe from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from requests.exceptions import RequestException @@ -128,6 +129,7 @@ class WcsFormCell(CellBase): context['title'] = self.cached_title context['url'] = self.cached_url + 'tryauth' if self.cached_json: + context['description'] = mark_safe(self.cached_json.get('description', '')) context['css_classes'] = get_formdef_css_classes(self.cached_json) for attribute in self.cached_json: if not attribute in context: diff --git a/combo/apps/wcs/templates/combo/wcs/form.html b/combo/apps/wcs/templates/combo/wcs/form.html index 97be36b0..a70c5f22 100644 --- a/combo/apps/wcs/templates/combo/wcs/form.html +++ b/combo/apps/wcs/templates/combo/wcs/form.html @@ -1,8 +1,8 @@ {% block cell-content %}
{{ title }} -{% if cell.cached_json.description %} +{% if description %}
-{{ cell.cached_json.description|safe }} +{{ description }}
{% endif %}
diff --git a/combo/data/models.py b/combo/data/models.py index c6a1faf9..868a84e8 100644 --- a/combo/data/models.py +++ b/combo/data/models.py @@ -1399,6 +1399,7 @@ class LinkCell(CellBase): extra_context = super(LinkCell, self).get_cell_extra_context(context) if self.link_page: extra_context['title'] = self.title or self.link_page.title + extra_context['description'] = self.link_page.description else: extra_context['title'] = self.title or self.url url = self.get_url(context)