bug description :
> if you change the options of a custom field choice (i.e. from a
> multiple to a single, removing or adding allow_other), the data
> representation change and do not match with the expected
> representation of the form.
This commit fix this bug by switching the data representation to the
current options.
A new parameter is defined :
```
chill_custom_fields:
show_empty_values_in_views = true|false
```
A new method is added to CustomFieldInterface: `isEmptyValue`. To ease
the dev of new classes, an AbstractCustomField class is created, which
implements the most commons function (currently, only isEmptyValue).
A new Twig Filter is added: `chill_custom_field_is_empty`
The twig filter `chill_custom_fields_group_widget` has a new possibility
in array option : `show_empty`. Default to
chill_custom_fields.show_empty_values_in_view. May be forced by
true/false.
- show button to update report only to users with correct permissions;
- show new page only to users with correct permissions ;
- rename scope => circle in column, + translations
add a required field to custom fields type
ref Chill-project/Chill-CustomFields#17
Add a `required` column to the `customfield` table, add a `required` field in customfieldsGroup form.
If the customfield is required, the field is marked as required in the customfield type (when the form is compiled). Although, for compound type (like choices) it is necessary to mark the type manually as required.
See merge request !8
The `custom field long choice` aim to provide a way to deal with choices
with a big possibilities.
The `custom field long choice` allow :
- to persist different options in the database ;
- each option has a key, a text (translatable string), and eventually a
parent, and an internal_key
- every key can be activate or not. If the parent is inactivated, all
childs are inactivated
- the internal key have two purposes :
- link to an external csv file, with their own key ;
- add a special class to results, to allow custom layout.
Currently, the field exists, but some elements are missing :
- a script for CSV import
- possibility to select multiple items
- edition of options
- handle of option without parents
- tests are missing
Choice widget expanded use the .inline_choice class & choice_with_other_widget d…
…isplay the label and the input on the same line
See merge request !1
add a number field
The field has three option :
- lesser or equal than. If null, this option is ignored ;
- greather or equal than. If null, this options is ignored ;
- precision : the number of decimal after the number ;
- text after the field : a text to show after the field.
The field is rendered as an HTML integer input if precision = 0, or a
symfony number field if precision > 0.
ref chill-project/Chill-CustomFields#11
See merge request !6
The field has three option :
- lesser or equal than. If null, this option is ignored ;
- greather or equal than. If null, this options is ignored ;
- precision : the number of decimal after the number ;
- text after the field : a text to show after the field.
The field is rendered as an HTML integer input if precision = 0, or a
symfony number field if precision > 0.
ref chill-project/Chill-CustomFields#11