Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertical style for order field #1253

Merged
merged 1 commit into from
Oct 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions themes/grav/templates/forms/fields/order/order.html.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{% set value = (value is null ? field.default : value) %}
{% set siblings = data.parent.children %}
{% set canOrder = data.order %}
{% set vertical = field.style == 'vertical' %}

<div class="form-field grid pure-g">
<div class="form-label block size-1-3 pure-u-1-3">
<div class="form-field grid pure-g{% if vertical %} vertical{% endif %}">
<div class="form-label{% if not vertical %} block size-1-3 pure-u-1-3{% endif %}">
<label>
{% if field.help %}
<span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e|tu }}">{{ field.label|tu }}</span>
Expand All @@ -13,7 +14,7 @@
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</label>
</div>
<div class="form-data block size-2-3 pure-u-2-3">
<div class="form-data{% if not vertical %} block size-2-3 pure-u-2-3{% endif %}">
<div class="form-order-wrapper {{ field.size }}">

<input
Expand Down