fix#11
The activity form allow to receive pre-configured activity durations.
Those duration can be configured through the option
chill_activity.form.time_duration :
```yaml
chill_activity:
form:
time_duration:
- { label: '12 minutes', seconds: 720 }
# - ...
```
If a pre-existing activity receives a different time, the time is added
to the list of pre-configured duration time.
Various improvements
- Introduce tests for twig functions ;
- Make the twig function `chill_custom_field_is_emtpy` consistent with other functions ;
- remove dead code from CustomFieldsHelper ;
- add validation on custom field slug
- fix bug in test
- re-introduce the units label in numeric/integer custom fields
See merge request !12
The method chill_custom_fields_is_empty take now the fields as first argument, and the customField as second argument, to be consistent with other twig methods.
Now, the CustomFieldsHelper methods and the twig function which render customFields require always a `Chill\CustomFields\Entity\CustomField`.
The possibility to add a slug and an object as argument to those method is abandoned, and was not used in other bundle (nevertheless, the method to catch a customField from his slug was buggy).
The composer root version is required to let composer decide on which branch he is, as we have mirrored dependencies (custom field requires person, which requires custom field).
The php 7 build select now php 7 image
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.