71 Commits

Author SHA1 Message Date
e053bf999e fixing any depreciations in fixtures feature 2021-01-14 18:57:02 +01:00
a38208f5cf fix sf4 deprecated: remove choices_as_values form option 2020-07-22 17:05:24 +02:00
4182c53304 fix error when field definition has changed 2019-04-16 15:22:57 +02:00
23e68416a2 Improve isChecked 2018-06-13 16:45:21 +02:00
0371236493 allow to render choice in different columns 2018-06-12 17:58:45 +02:00
2042e43613 allow date to be rendered in list/exports 2018-06-12 17:58:28 +02:00
122e54eed6 fix errors in editing custom field group 2018-05-17 21:09:46 +02:00
51460be132 Merge branch 'master' into upgrade-sf3 2018-05-16 22:09:22 +02:00
cacf6d0f3a fix error when adding customfield choice 2018-05-16 21:52:36 +02:00
nobohan
e021cea2da fix deprecation error: use gqcn and pass option in array 2018-04-20 14:19:17 +02:00
nobohan
0d05865091 fix deprecations: use fqcn for integer and number in CustomFieldNumber 2018-04-13 17:44:54 +02:00
nobohan
00bbbd32d6 fix deprecations: use fqcn 2018-04-13 17:25:05 +02:00
nobohan
c8f53e6472 fix deprecations: use fqcn and other deprecated properties 2018-04-05 17:09:01 +02:00
nobohan
8c97ac9e26 fix deprecations: use fqcn 2018-04-05 16:33:53 +02:00
nobohan
ebd5e03d54 fix error 2018-04-05 14:10:00 +02:00
nobohan
d501fa31ae fix deprecations: use fqcn fr translatable_string 2018-04-05 13:59:14 +02:00
nobohan
a35fd76053 fix deprecations: add choices_as_values=true + flip contents of choice in ChoiceType 2018-04-04 22:01:52 +02:00
nobohan
3e9690f47e fix deprecations: use fqcn for textarea 2018-04-04 18:42:56 +02:00
nobohan
b07d876157 fix deprecations: use fqcn 2018-04-04 18:17:51 +02:00
nobohan
23dd4ec48b fix deprecations: use choices_as_values=true and flip content of the choice options 2018-04-04 17:50:23 +02:00
nobohan
b84ee91652 fix deprecations: use fqcn instead of 'choices' 2018-04-04 15:55:45 +02:00
nobohan
65e7354437 fix deprecatrions: use fqcn for chill classes 2018-04-04 12:19:46 +02:00
01fbf172e3 remove dump 2018-03-27 17:47:04 +02:00
d1fd359366 add a date field 2018-03-27 16:35:56 +02:00
affeae238c adding empty data on CFChoice
And fixing a bug occuring because type of empty data are wrong.

fix #23
2016-08-11 23:26:32 +02:00
b97a550e2b remove unused locale and request stack
The locale resolving is delegated to TranslatableStringHelper
2016-03-21 00:00:58 +01:00
f288f67bb9 fix error with empty values with multiple and non-existant data
if a value was array(null) or array(_other => null, _choices => null),
the isEmptyValue function failed.
2016-01-01 22:25:05 +01:00
573697d8c7 improve function isEmptyValue + tests 2015-12-18 00:22:09 +01:00
24f9db6ae7 fix bug in changing custom field option
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.
2015-12-17 23:50:24 +01:00
60dc11caed translation in choices name 2015-12-17 22:12:50 +01:00
cbc66dc0f0 allow choosing empty value in CFLongChoice 2015-12-17 22:07:28 +01:00
0a1898e9a7 take into account the different type of choices in empty value 2015-12-16 20:25:40 +01:00
fe73a64e9d Add possibility to hide empty value in customfield group view rendering
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.
2015-12-15 11:11:36 +01:00
4f13ec6959 add a custom field long choice basic
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
2015-12-11 11:43:39 +01:00
3230659a4b add a required field to custom fields type
ref Chill-project/Chill-CustomFields#17
2015-12-10 17:16:59 +01:00
b88bb50b56 Merge branch 'marcu/Chill-CustomFields-master'
Merge request Chill-project/Chill-CustomFields!5

Conflicts:
	Resources/views/Form/fields.html.twig
2015-12-10 15:44:20 +01:00
4f2b605efc 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
2015-12-08 19:45:04 +01:00
Marc Ducobu
373edab629 CustomFields/CustomFieldInterface.php : Improving the doc 2015-12-08 11:42:38 +01:00
Marc Ducobu
ebfb24a3eb Refactoring CustomFields/CustomFieldChoice.php : removing useless linereturn 2015-12-08 11:42:05 +01:00
bf99b68a2a Improve rendering of options and fields 2015-11-27 13:37:07 +01:00
b96076022f [wip] layout of custom field edition
[ci skip]
2015-11-25 08:45:17 +01:00
Marc Ducobu
23438926b1 Refactoring CustomFields/CustomFieldChoice.php : indentation 2015-10-22 15:02:49 +02:00
Marc Ducobu
e7ce8934ab Refactoring CustomFields/CustomFieldChoice.php : good indentation 2015-09-28 13:55:32 +02:00
Marc Ducobu
b40a1595c1 export raw string (no html conversion) and replace " by "" - refs #401 2015-02-18 12:41:57 +01:00
Marc Ducobu
47a9a29236 allowing csv rendering for custom fields 2015-02-17 15:01:12 +01:00
77247de990 fix method name 2015-02-05 17:52:03 +01:00
a2b3ff6d63 remove %locale% from cf choice
refs #332
2015-02-05 17:40:32 +01:00
3707b08aee remove entities for testing purpose - clean code
fix #259
2015-01-22 09:50:53 +01:00
a925533fc8 fix bug : CFChoice was not rendered correctly with _other option 2014-11-27 13:54:58 +01:00
Marc Ducobu
b5bf383005 Allow to customize the 'other value' statement in CFChoice - close #361 2014-11-26 18:49:24 +01:00