diff options
author | 2019-04-15 14:40:03 +0100 | |
---|---|---|
committer | 2019-04-15 14:40:03 +0100 | |
commit | d8851f99c9f51119f0bcc9042abe87b64479cca9 (patch) | |
tree | 2b3f0c8dddc59cdbb9d48341768574642d2da275 /pydis_site/templates/wiki/forms | |
parent | Fix preview/nav visibility (diff) |
Editor fixes and sidebar accordion
Diffstat (limited to 'pydis_site/templates/wiki/forms')
-rw-r--r-- | pydis_site/templates/wiki/forms/fields/char.html | 28 | ||||
-rw-r--r-- | pydis_site/templates/wiki/forms/fields/image.html | 31 |
2 files changed, 46 insertions, 13 deletions
diff --git a/pydis_site/templates/wiki/forms/fields/char.html b/pydis_site/templates/wiki/forms/fields/char.html index 0f130751..4c48d300 100644 --- a/pydis_site/templates/wiki/forms/fields/char.html +++ b/pydis_site/templates/wiki/forms/fields/char.html @@ -1,19 +1,21 @@ <div id="div_{{ field.auto_id }}" class="field is-horizontal{% if field.errors %} is-danger{% endif %}"> - <div class="field-label"> - {% if field.label %} - <label for="{{ field.auto_id }}" class="label {% if field.errors %} is-danger{% endif %}"> - {{ field.label | safe }} {% if field.field.required %}<span class="asterisk has-text-danger">*</span>{% endif %} - </label> - {% endif %} + {% if not is_markitup %} + <div class="field-label"> + {% if field.label %} + <label for="{{ field.auto_id }}" class="label {% if field.errors %} is-danger{% endif %}"> + {{ field.label | safe }} {% if field.field.required %}<span class="asterisk has-text-danger">*</span>{% endif %} + </label> + {% endif %} - {% if field.help_text %} - <p id="hint_{{ field.auto_id }}" class="help has-text-grey"> - {{ field.help_text|safe }} - </p> - {% endif %} - </div> + {% if field.help_text %} + <p id="hint_{{ field.auto_id }}" class="help has-text-grey"> + {{ field.help_text|safe }} + </p> + {% endif %} + </div> + {% endif %} - <div class="field-body"> + <div class="field-body"{% if is_markitup %} style="display: block; width: 100%;"{% endif %}> <div class="field"> <div class="control"> {% if is_markitup %} diff --git a/pydis_site/templates/wiki/forms/fields/image.html b/pydis_site/templates/wiki/forms/fields/image.html new file mode 100644 index 00000000..47e115fe --- /dev/null +++ b/pydis_site/templates/wiki/forms/fields/image.html @@ -0,0 +1,31 @@ +<div id="div_{{ field.auto_id }}" class="field is-horizontal{% if field.errors %} is-danger{% endif %}"> + <div class="field-label"> + {% if field.label %} + <label for="{{ field.auto_id }}" class="label {% if field.errors %} is-danger{% endif %}"> + IN PLACE RENDER: {{ field.label | safe }} {% if field.field.required %}<span class="asterisk has-text-danger">*</span>{% endif %} + </label> + {% endif %} + + {% if field.help_text %} + <p id="hint_{{ field.auto_id }}" class="help has-text-grey"> + {{ field.help_text|safe }} + </p> + {% endif %} + </div> + + <div class="field-body"> + <div class="field"> + <div class="control"> + {{ field }} + </div> + + {% if field.errors %} + <p class="help is-danger"> + {% for error in field.errors %} + <span id="error_{{ forloop.counter }}_{{ field.auto_id }}">{{ error }}</span><br /> + {% endfor %} + </p> + {% endif %} + </div> + </div> +</div> |