Skip to content

Commit

Permalink
Merge branch 'release/5.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Feb 7, 2022
2 parents b6b8371 + 1f894ee commit 06bd4fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v5.1.6
## 02/07/2022

1. [](#bugfix)
* Fixed Select field when using OptGroups, not allowing key/values [#541](https://github.com/getgrav/grav-plugin-form/issues/541)
* Support for translatable OptGroup labels in Select field [#540](https://github.com/getgrav/grav-plugin-form/issues/540)

# v5.1.5
## 01/24/2022

Expand Down
8 changes: 4 additions & 4 deletions app/fields/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ export default class PageMedia extends FilesField {
$('.dz-preview').prop('draggable', 'true');
}

onDropzoneRemovedFile(file, ...extra) {
super.onDropzoneRemovedFile(file, ...extra);
this.sortable.options.onSort();
}
// onDropzoneRemovedFile(file, ...extra) {
// super.onDropzoneRemovedFile(file, ...extra);
// this.sortable.options.onSort();
// }
}

export let Instance = new PageMedia();
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Form
slug: form
type: plugin
version: 5.1.5
version: 5.1.6
description: Enables the forms handling
icon: check-square
author:
Expand Down
4 changes: 2 additions & 2 deletions templates/forms/fields/select/select.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
</option>
{% elseif item_value is iterable %}
{% set optgroup_label = item_value|keys|first %}
<optgroup label="{{ optgroup_label }}">
<optgroup label="{{ optgroup_label|t|e('html_attr') }}">
{% for subkey, suboption in field.options[key][optgroup_label] %}
{% set subkey = subkey|string %}
{% set item_value = (field.selectize and field.multiple ? suboption : subkey)|string %}
{% set selected = (field.selectize ? suboption : subkey)|string %}
<option {% if subkey is same as (value) or (field.multiple and selected in value) %}selected="selected"{% endif %} value="{{ suboption }}">
<option {% if subkey is same as (value) or (field.multiple and selected in value) %}selected="selected"{% endif %} value="{{ subkey }}">
{{ suboption|t|raw }}
</option>
{% endfor %}
Expand Down

0 comments on commit 06bd4fe

Please sign in to comment.