Skip to content

Commit

Permalink
Form Admin 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 30, 2020
1 parent 8e657f0 commit ddddada
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 239 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<a name="1.6.0"></a>
# [1.6.0](https://github.com/flextype-plugins/form-admin/compare/v1.5.0...v1.6.0) (2020-12-30)

### Features

* **core** update code base for new Flextype 0.9.14
* **core** Moving to PHP 7.4
* **core** use new TWIG Plugin 1.7.0

<a name="1.5.0"></a>
# [1.5.0](https://github.com/flextype-plugins/form-admin/compare/v1.4.0...v1.5.0) (2020-12-20)

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

<p align="center">
<a href="https://github.com/flextype-plugins/form-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/form-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/form-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/form-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/form-admin/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.13-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-form-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-form-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/form-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/form-admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
<a href="https://github.com/flextype-plugins/form-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/form-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/form-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/form-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/form-admin/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.14-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-form-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-form-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/form-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/form-admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
</p>

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

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.14 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
| [admin](https://github.com/flextype-plugins/admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/admin/releases) |
Expand Down
214 changes: 0 additions & 214 deletions app/Controllers/FieldsetsController.php

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"issues": "https://github.com/flextype-plugins/form-admin/issues"
},
"require": {
"php": ">=7.3.0",
"php": ">=7.4.0",
"flextype-components/arrays" : "3.0.1",
"flextype-components/filesystem": "2.0.8"
},
"config": {
"apcu-autoloader": true,
"optimize-autoloader": true,
"platform": {
"php": "7.3.0"
"php": "7.4.0"
}
},
"autoload": {
Expand Down
8 changes: 3 additions & 5 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@

namespace Flextype\Plugin\FormAdmin;

use Flextype\Plugin\FormAdmin\Controllers\FieldsetsController;
use Flextype\Plugin\FormAdmin\Controllers\FormAdminFieldsetsController;
use Slim\Flash\Messages;
use Flextype\Component\I18n\I18n;
use function Flextype\Component\I18n\__;

// Add Admin Navigation
flextype('registry')->set('plugins.admin.settings.navigation.extends.fieldsets', ['title' => __('form_admin_fieldsets'),'icon' => 'far fa-list-alt', 'link' => flextype('router')->pathFor('admin.fieldsets.index')]);

// Add FieldsetsController
flextype()->container()['FieldsetsController'] = static function () {
return new FieldsetsController();
};
// Add FormAdminFieldsetsController
flextype()->container()['FormAdminFieldsetsController'] = fn() => new FormAdminFieldsetsController();
6 changes: 3 additions & 3 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Form Admin
version: 1.5.0
version: 1.6.0
description: Form Admin Plugin to manage user forms in Flextype Admin Panel.
icon: fas fa-check-circle
author:
name: Sergey Romanenko
email: [email protected]
url: http://flextype.org
url: https://flextype.org
homepage: https://github.com/flextype-plugins/form-admin
bugs: https://github.com/flextype-plugins/form-admin/issues
license: MIT

dependencies:
flextype: 0.9.13
flextype: 0.9.14
twig: '>=1.0.0'
admin: '>=1.0.0'
accounts-admin: '>=1.0.0'
Expand Down
18 changes: 9 additions & 9 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInRolesInMiddleware;

flextype()->group('/' . $admin_route, function () {
flextype()->get('/fieldsets', 'FieldsetsController:index')->setName('admin.fieldsets.index');
flextype()->get('/fieldsets/add', 'FieldsetsController:add')->setName('admin.fieldsets.add');
flextype()->post('/fieldsets/add', 'FieldsetsController:addProcess')->setName('admin.fieldsets.addProcess');
flextype()->get('/fieldsets/edit', 'FieldsetsController:edit')->setName('admin.fieldsets.edit');
flextype()->post('/fieldsets/edit', 'FieldsetsController:editProcess')->setName('admin.fieldsets.editProcess');
flextype()->get('/fieldsets/rename', 'FieldsetsController:rename')->setName('admin.fieldsets.rename');
flextype()->post('/fieldsets/rename', 'FieldsetsController:renameProcess')->setName('admin.fieldsets.renameProcess');
flextype()->post('/fieldsets/duplicate', 'FieldsetsController:duplicateProcess')->setName('admin.fieldsets.duplicateProcess');
flextype()->post('/fieldsets/delete', 'FieldsetsController:deleteProcess')->setName('admin.fieldsets.deleteProcess');
flextype()->get('/fieldsets', 'FormAdminFieldsetsController:index')->setName('admin.fieldsets.index');
flextype()->get('/fieldsets/add', 'FormAdminFieldsetsController:add')->setName('admin.fieldsets.add');
flextype()->post('/fieldsets/add', 'FormAdminFieldsetsController:addProcess')->setName('admin.fieldsets.addProcess');
flextype()->get('/fieldsets/edit', 'FormAdminFieldsetsController:edit')->setName('admin.fieldsets.edit');
flextype()->post('/fieldsets/edit', 'FormAdminFieldsetsController:editProcess')->setName('admin.fieldsets.editProcess');
flextype()->get('/fieldsets/rename', 'FormAdminFieldsetsController:rename')->setName('admin.fieldsets.rename');
flextype()->post('/fieldsets/rename', 'FormAdminFieldsetsController:renameProcess')->setName('admin.fieldsets.renameProcess');
flextype()->post('/fieldsets/duplicate', 'FormAdminFieldsetsController:duplicateProcess')->setName('admin.fieldsets.duplicateProcess');
flextype()->post('/fieldsets/delete', 'FormAdminFieldsetsController:deleteProcess')->setName('admin.fieldsets.deleteProcess');

})->add(new AclIsUserLoggedInMiddleware(['redirect' => 'admin.accounts.login']))
->add(new AclIsUserLoggedInRolesInMiddleware(['redirect' => (flextype()->getContainer()->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'),
Expand Down
2 changes: 1 addition & 1 deletion settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
enabled: true

# Form Admin plugin priority
priority: 50
priority: 90
4 changes: 2 additions & 2 deletions templates/extends/fieldsets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<tbody>
{% for id, title in fieldsets_list %}
{% set fieldset_path = PATH_PROJECT ~ '/fieldsets/' ~ id ~ '.yaml' %}
{% if filesystem_has(fieldset_path) %}
{% set fieldset = yaml_decode(filesystem_read(fieldset_path)) %}
{% if filesystem().file(fieldset_path).exists() %}
{% set fieldset = flextype.serializers.yaml.decode(filesystem().file(fieldset_path).get()) %}
{% endif %}
<tr>
<td class="w-1 text-center{% if fieldset.hide %} opacity-50{% endif %}">
Expand Down

0 comments on commit ddddada

Please sign in to comment.