aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-16 12:36:44 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-16 12:36:44 +0100
commit1e03df132dc263baf3434aa6daf47b373e564377 (patch)
tree42dae785a782418fd2b71b11ff4fb59acdfce8a2 /pyblackbird_cc/resources/forms.py
parented4f9bc53f52aaf3957d30658626a6ff794adcac (diff)
wip: markdown implemented for description field but working on help_text
Diffstat (limited to 'pyblackbird_cc/resources/forms.py')
-rw-r--r--pyblackbird_cc/resources/forms.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py
index da27fd4..05d8a75 100644
--- a/pyblackbird_cc/resources/forms.py
+++ b/pyblackbird_cc/resources/forms.py
@@ -36,7 +36,8 @@ class ResourceCreateForm(forms.Form):
description = forms.CharField(
max_length=1000,
widget=forms.Textarea,
- help_text="This is your opportunity to clearly explain what your resource "
+ help_text=" You can (and should) use <strong>Markdown</strong> here. "
+ "This is your opportunity to clearly explain what your resource "
"is all "
"about! It’s worth remembering that you are using the space to "
"communicate to two "
@@ -132,6 +133,14 @@ class ResourceCreateForm(forms.Form):
class ResourceUpdateMetadataForm(forms.ModelForm):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.helper = FormHelper(self)
+ self.helper.add_input(Submit("submit", "Submit"))
+
+ error_css_class = "error"
+ required_css_class = "required"
+
class Meta:
model = Resource
fields = [