50 Commits

Author SHA1 Message Date
Andy Miller
5904414cc4 show_label logic missing on list field 2024-09-21 13:51:37 -06:00
pmoreno.rodriguez
d4706064fb Improved class assignment for form fields in the plugin's default template (#2399)
* Added images decoding spanish translation

* Improved class assignment for form fields in the plugin's default template

* Fixed extra field.classes added

* Added Syslog tag

---------

Co-authored-by: pmoreno.rodriguez <pmoreno.rodriguez@outlook.com>
2024-02-15 21:20:43 -07:00
pmoreno.rodriguez
795585db6a Added sublabel, label classes and icon help to list field (#2384)
* Added descriptioin option and icon help to list field

* Changed description by sublabel in the list field. Added label classes

* Changed description by sublabel in the list field. Added label classes

* Options to add description, sublabel and help to the list field.

* Added description, sublabel and icon help to field. Field classes are also added

* Removed duplicate description
2024-01-27 12:06:57 -07:00
Andy Miller
2d107362d8 typo 2022-03-25 16:59:20 -06:00
Andy Miller
eedbf857e5 more originalValue fixes 2022-03-25 13:56:42 -06:00
xaver
4c0cb4d4e6 Support random default values for list child fields (#2255)
* Support default values for list child fields

* Update CHANGELOG.md

Co-authored-by: Djamil Legato <djamil+github@djamil.it>
2022-03-18 15:59:13 -07:00
Djamil Legato
fa4122efcb List field items will now require confirmation before getting deleted 2022-02-08 20:53:51 -08:00
Matias Griese
0a815f6115 Fixed list field with key/value pairs throwing an exception due to bad value [#2199] 2022-02-07 11:10:07 +02:00
Matias Griese
e9d36b97a8 Stop using |tu filter, Grav already has the same logic in |t for admin 2021-08-18 14:12:03 +03:00
Matias Griese
43da7c909d Updated forms and nested fields to use new form logic 2021-08-12 14:13:19 +03:00
Karmalakas
643f3a76c7 Add logic to allow fieldset form field inside a list field (#2159)
* Add logic to allow fieldset form field inside a list field

* Fix code style
2021-07-18 14:05:36 -06:00
Andy Miller
ac4d1588f0 Added a min_height: option for list field 2021-04-28 14:16:58 -06:00
Karmalakas
a0b0fa0495 Add item at the top if top button is clicked in list field (#2055)
* Add item at the top if top button is clicked in list field

Pretty much title says it all. IMO it makes much more sense, that top button would add item at the top, because if list is long enough, you are not even seeing if something happens when item is added at the bottom. Created this PR because of [the question asked in forum](https://discourse.getgrav.org/t/blueprint-type-list-new-data-on-top-of-array/15254).

So the solution would be either like this PR suggests, or button actions should be configurable via Admin config somewhere.

* Change added item placement for List field

Add field `palecement` property check.

If `top` or `bottom`, both buttons add item to top or bottom.
If `position`, item is added depending on a clicked button position -
  if top button is clicked, item added to top and if bottom button - item added to bottom.

Defaults to bottom

* Revert empty line at EOF
2021-02-06 20:36:28 -08:00
Matias Griese
0381aa4643 Regression: Values inside Fieldset do not display [#1995] 2020-12-10 14:51:26 +02:00
Djamil Legato
d85a6777de Attach _list_index to fields within list items so that the index/key is available 2019-07-16 09:56:16 -07:00
Djamil Legato
8f6bcc93d3 Fixed issue with nested list fields both utilizing the custom key functionality
# Conflicts:
#	themes/grav/js/admin.min.js
2019-07-09 17:01:15 -07:00
Andy Miller
ec4504e017 fix for #2236 + add new |nested filter 2018-10-26 12:56:07 -06:00
Andy Miller
1c2b8c6277 Updated list field controls 2018-05-18 12:40:26 -06:00
Newb I the Newbd
db77a210fb Fix collapsed noncollapsible list fields (#1410)
* Fix collapsed noncollapsible list fields

The value of `field.collapsed` seems to be true even in the case of collapsible fields, making noncollapsible fields collapsed by default, with no way to expand them. According to a quick test I've done, this should fix that.

* Actually fix noncollapsible list fields
2018-04-02 10:13:44 -06:00
Frivalszky Péter
fa56b51c29 Change count filter to length (#1391)
This fixes a bug: there's not twig filter named count, just one that's called length.
2018-03-18 11:31:48 -06:00
Matias Griese
80b033268b Added simple value support for list field type and checks to automatically hide collapse buttons when there's only single value in list type 2017-12-22 13:47:17 +02:00
Newb I the Newbd
8c41f89b69 Replaced a leftover "is empty" check (#1232) 2017-09-26 07:33:17 -06:00
Newb I the Newbd
230bdcc8aa Add collapsible attribute to lists (#1231) 2017-09-25 21:35:45 -06:00
ricardo118
eb1c56e51c Added Classes support to range form field (#1120)
* Added Classes support to range form field

Simple change to add support to classes in blueprints added to range field in admin forms

* Minor bugfix for range slider

Without adding the validate here the only way to make the range slider work with a step, say 0.1 is to have `step: 0.1` both inside and outside the validate:

Example:

```
width:
    type: range
    step: 0.1
    validate:
        min: 0
        max: 1
        step: 0.1
```

* Adding classes support to list form field
2017-05-29 12:19:10 +02:00
Djamil Legato
e5b916a584 Force data-max when selectunique is used 2017-05-23 18:45:01 -07:00
Djamil Legato
9bfb9e27d5 Added logic to uniquely select values with selectunique 2017-05-23 18:30:56 -07:00
Andy Miller
4afefc455a Updates to add universal key to any field 2017-05-23 12:55:02 -06:00
Dávid Szabó
9a75de3143 Add min and max to list field (#1113)
* Add min and max to list field

* Recompiled JS

* Updated CHANGELOG
2017-05-09 16:08:45 -07:00
Djamil Legato
b6712a057d More lists fixes 2016-08-11 11:27:00 -07:00
Djamil Legato
32c1020bf2 Cherry-picked the new lists implementation 2016-08-11 11:16:33 -07:00
Flavio Copes
988f4a0389 [WIP] Notifications (#599)
Adds a new notifications feature to the Admin plugin. It will now lookup notifications which are set up on getgrav.org and will inform users, and also alert for new updates and provide awareness on various topics.

Also fixes issue with Array field in `value_only` mode, improperly displaying the key when novalue was set, and fixes issue with drag handlers in Array not showing/hiding properly (#950)

Updated FontAwesome to 4.6.3
2016-08-11 19:17:02 +02:00
Djamil Legato
352d80e9a3 Lists now features a new YAML option collapsed: [true|false] (default: false) and a new UI/UX that allows for collapsing / expanding collection items, allowing to better managing long lists of items. It is advised to always put as first field the most significant one, so that when a list is collapsed it can be still easily browsed.
Reworked List UI to better handle drag & drop sort. To sort it is now required to use the left drag handle (fixes #724)
2016-08-01 17:37:31 -07:00
Djamil Legato
d0972b0454 Lists now features two new YAML options sortby: [field] (default: disabled) and sortby_dir: [asc|desc] (default: asc) which will display a new Sorting button in the list allowing to automatically reindex the collection based on the given sort field set. 2016-08-01 16:40:04 -07:00
Djamil Legato
9182e6dbc1 Lists now features a new YAML option controls: [top|bottom|both] (default: bottom) which will display the "Add Item" button at the Top and/or Bottom position relative to the list. When the Top button is pressed, a new item will be added at the beginning of the list, when the Bottom button is pressed, a new item will be appended to the list. 2016-08-01 12:52:01 -07:00
Djamil Legato
387030c78c Reset originalValue when looping through nested fields in a list (fixes #688) 2016-07-09 00:18:04 -07:00
Andy Miller
490f869887 list field was the wrong width 2016-06-02 17:21:34 -06:00
Flavio Copes
ed6c4dd481 Fix list not applying toggleable / style: vertical (#518)
* Fix list not applying `toggleable`
* Fix #503 list not applying `style: vertical`
2016-04-25 22:11:51 +02:00
Matias Griese
de82a05194 Issue when saving tab-based plugin configuration (#452) 2016-03-16 11:09:48 +02:00
Andy Miller
cb9195b034 added no sort option 2016-03-14 14:55:26 -06:00
Matias Griese
81ecbe2f26 Blueprints: Add support for main level items and keys 2016-03-14 22:05:52 +02:00
Flavio Copes
5d04c8c6fd Fix help tooltip for list items 2016-03-13 14:19:25 +01:00
Flavio Copes
989bea815f Allow "Add Item" translation and custom label 2016-03-03 19:11:14 +01:00
Flavio Copes
25f9acfc11 Drop leftover class 2016-03-03 17:26:13 +01:00
Djamil Legato
35fa588438 Reworked Admin JS with ES6 2016-02-01 11:27:34 -08:00
Flavio Copes
1b0285836d Fix #323, regression introduced in b7caab8677
@w00fz I partially reverted b7caab8677, I
tested and it works with the markdown editor too. What was the reason
you changed it?

The problem introduced was the `data-collection-template` element was
changed from <script> to <ul> and then the template item is picked up
as a list item in the list, with '*' as key, instead of being ignored.
2015-12-04 20:01:49 +01:00
Djamil Legato
b7caab8677 Added support for markdown editor within lists (fixes #239) 2015-11-24 16:45:20 -08:00
Djamil Legato
f7da16241a Loading sortables from base 2015-08-19 21:00:17 -07:00
Andy Miller
b27bf51e79 more translation in fields 2015-08-18 18:51:44 -06:00
Flavio Copes
f458d34c9b Allow translating admin form fields 2015-08-18 14:36:17 +02:00
Gert
7a5110b75c list form field type 2015-05-20 17:17:41 +02:00