mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-26 07:46:31 +01:00
Added sublabel, label classes and icon help to list field (#2384)
* Added descriptioin option and icon help to list field * Changed description by sublabel in the list field. Added label classes * Changed description by sublabel in the list field. Added label classes * Options to add description, sublabel and help to the list field. * Added description, sublabel and icon help to field. Field classes are also added * Removed duplicate description
This commit is contained in:
committed by
GitHub
parent
8b089b54f5
commit
795585db6a
@@ -42,7 +42,7 @@
|
||||
<label for="toggleable_{{ field.name }}"></label>
|
||||
</span>
|
||||
{% endif %}
|
||||
<label{{ (toggleable ? ' class="toggleable" for="toggleable_' ~ field.name ~ '"')|raw }}>
|
||||
<label{{ (field.toggleable ? ' class="toggleable ' ~ field.classes ~ '" for="toggleable_' ~ field.name ~ '"' : ' class="' ~ field.classes ~ '"')|raw }}>
|
||||
{% block label %}
|
||||
{% if field.help %}
|
||||
{% if field.markdown %}
|
||||
|
||||
@@ -19,14 +19,32 @@
|
||||
<label for="toggleable_{{ field.name }}"></label>
|
||||
</span>
|
||||
{% endif %}
|
||||
<label{{ (field.toggleable ? ' class="toggleable" for="toggleable_' ~ field.name ~ '"')|raw }}>
|
||||
<label{{ (field.toggleable ? ' class="toggleable ' ~ field.classes ~ '" for="toggleable_' ~ field.name ~ '"' : ' class="' ~ field.classes ~ '"')|raw }}>
|
||||
{% if field.help %}
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t }}</span>
|
||||
{% if field.markdown %}
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t|markdown(false) }}">{{ field.label|t|markdown(false)|raw }} <i class="hint-icon fa fa-question-circle" aria-hidden="true"></i></span>
|
||||
{% else %}
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t|raw }} <i class="hint-icon fa fa-question-circle" aria-hidden="true"></i></span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ field.label|t }}
|
||||
{% endif %}
|
||||
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
|
||||
</label>
|
||||
{% if field.description %}
|
||||
<div class="form-extra-wrapper">
|
||||
<span class="form-description">{{ field.description|t|markdown(false)|raw }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.sublabel %}
|
||||
<div class="form-sublabel">
|
||||
{% if field.markdown %}
|
||||
{{ field.sublabel|t|markdown(false)|raw }}
|
||||
{% else %}
|
||||
{{ field.sublabel|t|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-data{% if not vertical %} block size-2-3 pure-u-2-3{% endif %}"
|
||||
{% block global_attributes %}
|
||||
@@ -185,4 +203,3 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user