aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/includes
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/includes
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/includes')
-rw-r--r--pydis_site/templates/wiki/includes/formfield.html27
1 files changed, 5 insertions, 22 deletions
diff --git a/pydis_site/templates/wiki/includes/formfield.html b/pydis_site/templates/wiki/includes/formfield.html
index 9ca88d4a..0176f9d4 100644
--- a/pydis_site/templates/wiki/includes/formfield.html
+++ b/pydis_site/templates/wiki/includes/formfield.html
@@ -1,3 +1,5 @@
+{% load wiki_extra %}
+
{% if field.is_hidden %}
{{ field }}
{% else %}
@@ -8,16 +10,18 @@
{{ field.label | safe }} {% if field.field.required %}<span class="asterisk">*</span>{% endif %}
</label>
{% endif %}
+
{% if field.help_text %}
<p id="hint_{{ field.auto_id }}" class="help">
{{ field.help_text|safe }}
</p>
{% endif %}
</div>
+
<div class="field-body">
<div class="field">
<div class="control">
- {{ field }}
+ {% render_field field %}
</div>
</div>
@@ -30,25 +34,4 @@
{% endif %}
</div>
</div>
-
-{#<div id="div_{{ field.auto_id }}" class="form-group{% if field.errors %} has-error{% endif %}">#}
-{# <div class="wiki-label col-xs-3 col-lg-2">#}
-{# {% if field.label %}#}
-{# <label for="{{ field.id_for_label }}" class="control-label {% if field.field.required %}requiredField{% endif %}">#}
-{# {{ field.label|safe }}#}
-{# </label>#}
-{# {% endif %}#}
-{# </div>#}
-{# <div class="wiki-control col-xs-9 col-lg-10">#}
-{# {{ field }} {% if field.field.required %}<span class="asteriskField">*</span>{% endif %}#}
-{# {% if field.errors %}#}
-{# {% for error in field.errors %}#}
-{# <div id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="help-block"><strong>{{ error }}</strong></div>#}
-{# {% endfor %}#}
-{# {% endif %}#}
-{# {% if field.help_text %}#}
-{# <p id="hint_{{ field.auto_id }}" class="help-block">{{ field.help_text|safe }}</p>#}
-{# {% endif %}#}
-{# </div>#}
-{#</div>#}
{% endif %}