form field updates

This commit is contained in:
Andy Miller
2018-01-09 12:53:00 -07:00
parent d4020fed47
commit a37377da47
5 changed files with 25 additions and 7 deletions

View File

@@ -1,11 +1,14 @@
# v1.7.0-rc.1
## mm/dd/2017
1. [](#new)
* Added support for markdown in all form fields for `label`, `help`, and `description` when `markdown: true` is set on field
1. [](#improved)
* Sort languages by key [#1303](https://github.com/getgrav/grav-plugin-admin/issues/1303)
1. [](#bugfix)
* Fixed a z-index issue with fullscreen editor [#1302](https://github.com/getgrav/grav-plugin-admin/issues/1302)
* Fixed missing background on register [#1307](https://github.com/getgrav/grav-plugin-admin/issues/1307)
* Fixed some style issues with field descriptions
# v1.7.0-beta.1
## mm/dd/2017

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -22,8 +22,9 @@ form {
}
.form-description {
font-weight: bold;
font-size: small;
p {
padding: 0;
}
}
.form-field {

View File

@@ -27,9 +27,17 @@
<label{{ (field.toggleable ? ' class="toggleable" for="toggleable_' ~ field.name ~ '"')|raw }}>
{% block label %}
{% if field.help %}
<span class="hint--bottom" data-hint="{{ field.help|tu|e('html') }}">{{ field.label|tu|raw }}</span>
{% if field.markdown %}
<span class="hint--bottom" data-hint="{{ field.help|tu|markdown|e('html') }}">{{ field.label|tu|markdown|raw }}</span>
{% else %}
<span class="hint--bottom" data-hint="{{ field.help|tu|e('html') }}">{{ field.label|tu|raw }}</span>
{% endif %}
{% else %}
{{ field.label|tu|raw }}
{% if field.markdown %}
{{ field.label|tu|raw }}
{% else %}
{{ field.label|tu|markdown|raw }}
{% endif %}
{% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
{% endblock %}
@@ -81,7 +89,13 @@
{% endblock %}
{% if field.description %}
<div class="form-extra-wrapper {{ field.size }} {{ field.wrapper_classes }}">
<span class="form-description">{{ field.description|tu|raw }}</span>
<span class="form-description">
{% if field.markdown %}
{{ field.description|tu|markdown|raw }}
{% else %}
{{ field.description|tu|raw }}
{% endif %}
</span>
</div>
{% endif %}
</div>