From b9e763777fd41516851e5f169c33669309c534e2 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Wed, 22 Dec 2021 15:48:49 +0000 Subject: [PATCH] Fixes for using markdown in asset comments --- assets/templates/asset_form.html | 2 ++ assets/templates/partials/asset_detail_form.html | 4 ++-- assets/tests/pages.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/templates/asset_form.html b/assets/templates/asset_form.html index 57766f98..f74bbb41 100644 --- a/assets/templates/asset_form.html +++ b/assets/templates/asset_form.html @@ -5,11 +5,13 @@ {% block css %} {{ block.super }} + {% endblock %} {% block preload_js %} {{ block.super }} + {% endblock %} {% block js %} diff --git a/assets/templates/partials/asset_detail_form.html b/assets/templates/partials/asset_detail_form.html index fb185602..970bfce9 100644 --- a/assets/templates/partials/asset_detail_form.html +++ b/assets/templates/partials/asset_detail_form.html @@ -47,7 +47,7 @@
{{ object.asset_id }}
Description
-
{{ object.description }}
+
{{ object.description }}
Category
{{ object.category }}
@@ -59,7 +59,7 @@
{{ object.serial_number|default:'-' }}
Comments
-
{{ object.comments|default:'-'|markdown }}
+
{{ object.comments|default:'-'|markdown }}
{% endif %} diff --git a/assets/tests/pages.py b/assets/tests/pages.py index ff5d081c..de47ebb6 100644 --- a/assets/tests/pages.py +++ b/assets/tests/pages.py @@ -77,7 +77,7 @@ class AssetForm(FormPage): 'description': (regions.TextBox, (By.ID, 'id_description')), 'is_cable': (regions.CheckBox, (By.ID, 'id_is_cable')), 'serial_number': (regions.TextBox, (By.ID, 'id_serial_number')), - 'comments': (regions.TextBox, (By.ID, 'id_comments')), + 'comments': (regions.SimpleMDETextArea, (By.ID, 'id_comments')), 'purchase_price': (regions.TextBox, (By.ID, 'id_purchase_price')), 'salvage_value': (regions.TextBox, (By.ID, 'id_salvage_value')), 'date_acquired': (regions.DatePicker, (By.ID, 'id_date_acquired')),