Skip to content

Commit 31dd2d0

Browse files
committed
Merge branch 'release/2.0.2'
2 parents 2d441e8 + 9203fb3 commit 31dd2d0

File tree

6 files changed

+48
-12
lines changed

6 files changed

+48
-12
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# v2.0.2
2+
## 09/08/2016
3+
4+
1. [](#improved)
5+
* Added support for Grav's autoescape twig setting
6+
* Allow to add additional markup fields in form and field twig overrides
7+
* Updated the french language translation
8+
19
# v2.0.1
210
## 09/07/2016
311

@@ -33,7 +41,7 @@
3341
* Added support for multiple emails in `email` field (add `multiple: true` to enable)
3442
1. [](#bugfix)
3543
* Fixed backward incompatibility with forms submission and data retrieval [getgrav/grav#933](https://github.com/getgrav/grav/issues/933)
36-
44+
3745
# v1.3.0
3846
## 07/14/2016
3947

blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Form
2-
version: 2.0.1
2+
version: 2.0.2
33
description: Enables the forms handling
44
icon: check-square
55
author:

languages.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ fr:
8484
RECAPTCHA_SITE_KEY_HELP: "Pour plus d'informations veuillez vous rendre sur https://developers.google.com/recaptcha"
8585
RECAPTCHA_SECRET_KEY: "Clé secrète"
8686
RECAPTCHA_SECRET_KEY_HELP: "Pour plus d'informations veuillez vous rendre sur https://developers.google.com/recaptcha"
87+
GENERAL: "Général"
88+
USE_BUILT_IN_CSS: "Utiliser les CSS natifs"
89+
FILEUPLOAD_PREVENT_SELF: "Impossible d'utiliser '%s' en dehors des pages."
90+
FILEUPLOAD_UNABLE_TO_UPLOAD: "Impossible de charger le fichier %s: %s"
91+
FILEUPLOAD_UNABLE_TO_MOVE: 'Impossible de déplacer le fichier %s vers "%s"'
92+
DROPZONE_CANCEL_UPLOAD: "Annuler le chargement"
93+
DROPZONE_CANCEL_UPLOAD_CONFIRMATION: "Êtes-vous certain de vouloir annuler ce téléchargement ?"
94+
DROPZONE_DEFAULT_MESSAGE: "Glissez vos fichiers ici ou <strong>cliquez dans cette zone</strong>"
95+
DROPZONE_FALLBACK_MESSAGE: "Votre navigateur ne prend pas en charge les téléchargements par glissé-déposé."
96+
DROPZONE_FALLBACK_TEXT: "Veuillez utiliser le formulaire de secours ci-dessous pour transférer vos fichiers."
97+
DROPZONE_FILE_TOO_BIG: "Le fichier est trop volumineux ({{filesize}}MiB). Taille maximale de fichier : {{maxFilesize}}MiB."
98+
DROPZONE_INVALID_FILE_TYPE: "Vous ne pouvez pas charger des fichiers de ce type."
99+
DROPZONE_MAX_FILES_EXCEEDED: "Vous ne pouvez plus télécharger de fichiers."
100+
DROPZONE_REMOVE_FILE: "Supprimer le fichier"
101+
DROPZONE_REMOVE_FILE_CONFIRMATION: "Êtes-vous sûr de vouloir supprimer ce fichier ?"
102+
DROPZONE_RESPONSE_ERROR: "Le serveur a répondu avec le code {{statusCode}}."
87103

88104
hr:
89105
PLUGIN_FORM:

templates/formdata.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
{% if form %}
1111
{% if form.message %}
12-
<div class="alert notices {{ form.message_color ?: 'green' }}"><p>{{ form.message }}</p></div>
12+
<div class="alert notices {{ form.message_color ?: 'green' }}"><p>{{ form.message|raw }}</p></div>
1313
{% endif %}
1414
<p>{{ 'PLUGIN_FORM.DATA_SUMMARY'|t }}</p>
1515

templates/forms/default/field.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% set errors = attribute(form.messages, field.name) %}
66

77
{% block field %}
8-
<div class="form-field {% if field.outerclasses is defined %} {{ field.outerclasses }}{% endif %}{% if errors %} has-errors{% endif %}">
8+
<div class="form-field {% if field.outerclasses is defined %} {{ field.outerclasses }}{% endif %}{% if errors %} has-errors{% endif %} {% block outer_field_classes %}{% endblock %}">
99
{% block contents %}
1010
<div class="form-label">
1111
<label class="inline" {% if field.id is defined %}for="{{ field.id|e }}" {% endif %} >

templates/forms/default/form.html.twig

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,38 @@
3030
{% endblock %}
3131
>
3232

33-
{% for field in form.fields %}
33+
{% block inner_markup_fields_start %}{% endblock %}
34+
35+
{% for field in form.fields %}
3436
{% if field.type == 'file' %}
3537
{% do assets.addJs('plugin://form/assets/form.min.js') %}
3638
{% endif %}
3739
{% set value = form.value(field.name) %}
3840
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" ignore missing %}
39-
{% endfor %}
40-
{% include "forms/fields/formname/formname.html.twig" %}
41-
<div class="buttons">
42-
{% for button in form.buttons %}
43-
<button
41+
{% endfor %}
42+
43+
{% include "forms/fields/formname/formname.html.twig" %}
44+
45+
{% block inner_markup_fields_end %}{% endblock %}
46+
47+
{% block inner_markup_buttons_start %}
48+
<div class="buttons">
49+
{% endblock %}
50+
51+
{% for button in form.buttons %}
52+
<button
4453
{% block button_classes %}
4554
class="{{ button.classes|default('button') }}"
4655
{% endblock %}
4756
type="{{ button.type|default('submit') }}"
4857
>
4958
{{ button.value|t|default('Submit') }}
5059
</button>
51-
{% endfor %}
52-
</div>
60+
{% endfor %}
61+
62+
{% block inner_markup_buttons_end %}
63+
</div>
64+
{% endblock %}
5365

5466
{{ nonce_field('form', 'form-nonce')|raw }}
5567
</form>

0 commit comments

Comments
 (0)