Skip to content

Commit

Permalink
Form 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 14, 2021
1 parent cc2f0d9 commit 65430da
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<a name="1.11.0"></a>
# [1.11.0](https://github.com/flextype-plugins/form/compare/v1.10.1...v1.11.0) (2021-01-14)

### Features

* **core** update code base for new Flextype 0.9.16

### Bug Fixes

* **fields** fix select_media field
* **fields** fix select_template field

<a name="1.10.1"></a>
# [1.10.1](https://github.com/flextype-plugins/form/compare/v1.10.0...v1.10.1) (2021-01-07)

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Form Plugin for <a href="https://flextype.org/">Flextype</a></h1>

<p align="center">
<a href="https://github.com/flextype-plugins/form/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/form.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/form"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/form"><img src="https://img.shields.io/github/downloads/flextype-plugins/form/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.15-green.svg?color=black" alt="Flextype"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/form?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/form.svg?branch=dev" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
<a href="https://github.com/flextype-plugins/form/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/form.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/form"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/form"><img src="https://img.shields.io/github/downloads/flextype-plugins/form/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.16-green.svg?color=black" alt="Flextype"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/form?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/form.svg?branch=dev" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
</p>

Form Plugin to render user forms for Flextype.
Expand All @@ -12,7 +12,7 @@ The following dependencies need to be installed for Form Plugin.

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.15 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.16 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=2.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [jquery](https://github.com/flextype-plugins/jquery) | >=1.0.0 | [download](https://github.com/flextype-plugins/jquery/releases) |

Expand Down Expand Up @@ -428,7 +428,9 @@ form:
```yaml
title: Default
default_field: title
icon: 'far fa-file-alt'
icon:
name: "file-alt"
set: "fontawesome|solid"
size: 12
form:
name: default
Expand Down
6 changes: 3 additions & 3 deletions fieldsets/fields/select_media/field.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% set media_files = filesystem().find().in(PATH_PROJECT ~ '/media/entries/' ~ query.id ~ '/').files() %}
{% set media_files = filesystem().find().depth(0).in(PATH_PROJECT ~ '/media/entries/' ~ query.id ~ '/').files() %}
<div class="form-group {% if properties.size %}{{ sizes[properties.size] }}{% else %}{{ sizes[12] }}{% endif %}">
<label for="{{ field_id }}" class="form-control-title">{{ tr(properties.title) }}</label>
<select class="form-control {{ properties.class }} js-select-media" name="{{ field_name }}">
{% for media_file in media_files %}
{% if media_file.extension in flextype.registry.get('plugins.admin.settings.entries.media.accept_file_types') %}
<option value="{{ media_file.filename }}" {% if media_file.basename == field_value %} selected="selected" {% endif %}>{{ media_file.filename }}</option>
{% if media_file.getExtension() in flextype.registry.get('plugins.admin.settings.entries.media.accept_file_types') %}
<option value="{{ media_file.getFilename() }}" {% if media_file.getFilename() == field_value %} selected="selected" {% endif %}>{{ query.id ~ '/' ~ media_file.getFilename() }}</option>
{% endif %}
{% endfor %}
</select>
Expand Down
6 changes: 3 additions & 3 deletions fieldsets/fields/select_template/field.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% set templates = filesystem().find().in(PATH_PROJECT ~ '/themes/' ~ flextype.registry.get('plugins.site.settings.theme') ~ '/templates/').files() %}
{% set templates = filesystem().find().depth(0).in(PATH_PROJECT ~ '/themes/' ~ flextype.registry.get('plugins.site.settings.theme') ~ '/templates/').files() %}
<div class="form-group {% if properties.size %}{{ sizes[properties.size] }}{% else %}{{ sizes[12] }}{% endif %}">
<label for="{{ field_id }}" class="form-control-title">{{ tr(properties.title) }}</label>
<select class="form-control {{ properties.class }} js-select-template" name="{{ field_name }}">
{% for template in templates %}
{% if template.extension == 'html'%}
<option value="{{ template.basename }}" {% if template.basename == field_value %} selected="selected" {% endif %}>{{ template.basename }}</option>
{% if template.getExtension() == 'html'%}
<option value="{{ template.getBasename('.html') }}" {% if template.getBasename('.html') == field_value %} selected="selected" {% endif %}>{{ template.getBasename('.html') }}</option>
{% endif %}
{% endfor %}
</select>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Form",
"version": "1.10.1",
"version": "1.11.0",
"description": "Form Plugin to render user forms for Flextype.",
"homepage": "https://flextype.org",
"author": "Sergey Romanenko",
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Form
version: 1.10.1
version: 1.11.0
description: Form Plugin to render user forms for Flextype.
icon:
name: check-circle
Expand All @@ -16,6 +16,6 @@ keywords: form, fieldsets
license: MIT

dependencies:
flextype: 0.9.15
flextype: 0.9.16
twig: '>=2.0.0'
jquery: '>=1.0.0'

0 comments on commit 65430da

Please sign in to comment.