Skip to content

Commit

Permalink
Merge branch 'release/2.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 19, 2016
2 parents b4b778d + c546e06 commit 6723ddd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v2.0.6
## 10/19/2016

1. [](#bugfix)
* Fixed translations for `display` field
* Fixed [#95](https://github.com/getgrav/grav-plugin-form/issues/95) multilanguage forms submission
* Fixed duplicate textarea class tag [#98](https://github.com/getgrav/grav-plugin-form/issues/98)

# v2.0.5
## 09/15/2016

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Form
version: 2.0.5
version: 2.0.6
description: Enables the forms handling
icon: check-square
author:
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/default/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% endif %}
{% endfor %}

{% set action = form.action ? base_url ~ form.action : uri.url() %}
{% set action = form.action ? base_url ~ form.action : base_url ~ page.route %}

{% if (action == base_url_relative) %}
{% set action = base_url_relative ~ '/' ~ page.slug %}
Expand Down
12 changes: 10 additions & 2 deletions templates/forms/fields/display/display.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
{% block input %}
<div class="form-display-wrapper {{ field.size }}">
{% if field.markdown %}
{{ field.content|t|markdown|raw }}
{% if grav.twig.twig.filters['tu'] is defined %}
{{ field.content|tu|markdown|raw }}
{% else %}
{{ field.content|t|markdown|raw }}
{% endif %}
{% else %}
{{ field.content|t|raw }}
{% if grav.twig.twig.filters['tu'] is defined %}
{{ field.content|tu|raw }}
{% else %}
{{ field.content|t|raw }}
{% endif %}
{% endif %}
</div>
{% endblock %}
4 changes: 1 addition & 3 deletions templates/forms/fields/textarea/textarea.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
{% block input %}
<div class="form-textarea-wrapper {{ field.size }}">
<textarea
class="{{ field.classes|default('input') }}"

{# required attribute structures #}
name="{{ (scope ~ field.name)|fieldName }}"
{# input attribute structures #}
{% block input_attributes %}
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
{% if field.classes is defined %}class="{{ field.classes }}" {% else %}class="{{ field.classes|default('input') }}" {% endif %}
{% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
{% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
Expand Down

0 comments on commit 6723ddd

Please sign in to comment.