Skip to content

Commit b3c2169

Browse files
committed
Merge branch 'release/1.3.1'
2 parents 53e2177 + 651155d commit b3c2169

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# v1.3.1
2+
## 07/27/2016
3+
4+
1. [](#improved)
5+
* Added support for multiple emails in `email` field (add `multiple: true` to enable)
6+
1. [](#bugfix)
7+
* Fixed backward incompatibility with forms submission and data retrieval [getgrav/grav#933](https://github.com/getgrav/grav/issues/933)
8+
19
# v1.3.0
210
## 07/14/2016
311

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: 1.3.0
2+
version: 1.3.1
33
description: Enables the forms handling
44
icon: check-square
55
author:

classes/form.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ public function post()
233233
$data = $this->values->get('data');
234234
$files = (array)$_FILES;
235235

236+
// Add post data to form dataset
237+
if (!$data) {
238+
$data = $this->values->toArray();
239+
}
240+
236241
if (method_exists('Grav\Common\Utils', 'getNonce')) {
237242
if (!$this->values->get('form-nonce') || !Utils::verifyNonce($this->values->get('form-nonce'), 'form')) {
238243
$event = new Event(['form' => $this,
@@ -259,11 +264,6 @@ public function post()
259264
$i++;
260265
}
261266

262-
// Add post data to form dataset
263-
if (!$data) {
264-
$data = $this->values->toArray();
265-
}
266-
267267
$this->data->merge($data);
268268
$this->data->merge($files);
269269
}

templates/forms/fields/email/email.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
{% block input_attributes %}
44
type="email"
5+
{% if field.multiple in ['on', 'true', 1] %}multiple="multiple"{% endif %}
56
{{ parent() }}
67
{% endblock %}

0 commit comments

Comments
 (0)