aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/forms
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-11 20:34:18 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-11 20:34:18 +0100
commited8311057579de883fc010f9dd5e1bb331970418 (patch)
treee5b6d1ad7b2f9aa1758c8946b8b08356a2075453 /pydis_site/templates/wiki/forms
parentSome work towards initial pages and forms (diff)
Lots of extra form input handling.
But now the root article creator form renders nicely!
Diffstat (limited to 'pydis_site/templates/wiki/forms')
-rw-r--r--pydis_site/templates/wiki/forms/fields/char.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/pydis_site/templates/wiki/forms/fields/char.html b/pydis_site/templates/wiki/forms/fields/char.html
new file mode 100644
index 00000000..c94f5771
--- /dev/null
+++ b/pydis_site/templates/wiki/forms/fields/char.html
@@ -0,0 +1,21 @@
+{% if is_markitup %}
+ <textarea class="textarea is-family-monospace{% if field.errors %} is-danger{% endif %}"
+ id="{{ field.auto_id }}"
+ rows = 10
+
+ {% if field.required %}required{% endif %}
+ {% if field.max_length %}maxlength="{{ field.maxlength }}"{% endif %}
+ {% if field.min_length %}minlength="{{ field.minelength }}"{% endif %}
+ {% if field.empty_value %}placeholder="{{ field.empty_value }}"{% endif %}
+ ></textarea>
+{% else %}
+ <input class="input{% if field.errors %} is-danger{% endif %}"
+ type="text"
+ id="{{ field.auto_id }}"
+
+ {% if field.required %}required{% endif %}
+ {% if field.max_length %}maxlength="{{ field.maxlength }}"{% endif %}
+ {% if field.min_length %}minlength="{{ field.minelength }}"{% endif %}
+ {% if field.empty_value %}placeholder="{{ field.empty_value }}"{% endif %}
+ />
+{% endif %}