5231 Commits

Author SHA1 Message Date
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
9867cca632 improve rendering of cfgroup index 2015-12-17 22:16:06 +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
d77f85dbd0 greater textarea 2015-12-17 21:53:15 +01:00
9aa686fac6 select radio button with empty value
if multiple radio button doesn't have a value, the default one is
checked.

This is done using javascript, currently.
2015-12-17 21:46:53 +01:00
9c622bc852 improve cfgroup rendering to show title only if necessary
If the value `chill_custom_fields.show_empty_values_in_views` is false,
the title is shown only if a field has been filled "below" the title.
2015-12-17 07:46:06 +01:00
0a1898e9a7 take into account the different type of choices in empty value 2015-12-16 20:25:40 +01:00
ef718fe93a adapt text language in test 2015-12-16 13:19:00 +01:00
06cc78c5cb mark test skipped as the hack is not working 2015-12-16 12:56:03 +01:00
9f9bc8ab4d adapt to symfony 2.8 2015-12-16 12:55:41 +01:00
4487fb09f2 add faker to required packages 2015-12-16 12:41:41 +01:00
b45b529dba person creation: fix bug + improve multi_center
The center is hidden in page "check if the person exists in the db"
2015-12-16 12:19:29 +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
590762889b Merge branch 'master' into '1.0'
Select2js allow clear



See merge request !3
2015-12-15 11:01:04 +01:00
Marc Ducobu
9f4286d297 Select2js allow clear 2015-12-15 10:08:37 +01:00
9ca2be78eb use localize translatable string function to render label widget 2015-12-15 10:06:05 +01:00
ec838755e1 set scope to the up of the form in report edit 2015-12-14 23:06:33 +01:00
f2cdaaa1a3 fix order in report form 2015-12-14 23:04:22 +01:00
2c89aa4812 improve ACL on report creation + various UI improvements
- 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
2015-12-14 22:55:13 +01:00
07ed6a9751 change config to switch to symfony 2.8 2015-12-14 22:21:49 +01:00
119b3c0bc1 change config to switch to symfony 2.8 2015-12-14 22:21:18 +01:00
65e7a130c5 adapt config for test to symfony 2.8
replace intention by 'csrf_token_id' in security part
2015-12-14 21:55:19 +01:00
Julien Fastré
f6a801cd47 Merge pull request #4 from jphuart/master
Review of Developper install + Installing your Posgressql server and chill database
2015-12-14 20:07:45 +01:00
Jean Pierre Huart
61052639a8 Changes done to the postgresql install 2015-12-14 14:31:19 +01:00
c1e7bc0013 Merge branch 'master' into '1.0'
CF #16 - Improve the layout



See merge request !2
2015-12-11 15:03:49 +01:00
0f022d4f95 Merge branch 'birthdate_constraint' into 'master'
Birthdate constraint

ref #4 

See merge request !3
2015-12-11 14:55:48 +01:00
Marc Ducobu
9a957a9704 CF #16 - Improve the layout 2015-12-11 13:51:46 +01:00
Marc Ducobu
ca387ef8c5 MDM #6 Supprimer bouton modifier sur la page personne 2015-12-11 13:45:11 +01:00
69da4ce4c9 Merge branch 'master' into 1.0 2015-12-11 12:04:01 +01:00
faf4583383 Merge branch 'custom_field_long_choice' 2015-12-11 11:48:14 +01:00
09439f4e77 Merge branch 'required_fields' into 'master'
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
2015-12-11 11:46:51 +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
be50a0bcd7 Merge branch 'fix_#3' into 'master'
minimal improvement

refs Chill-project/Chill-Report#3

See merge request !1
2015-12-10 15:49:55 +01:00
25626a6a45 Merge branch 'master' into 'master'
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
2015-12-10 15:49:23 +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
9f079c1769 remove debug informations 2015-12-10 15:17:47 +01:00
af3bc324c2 Merge branch 'add_number_field' into 'master'
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
2015-12-10 15:15:17 +01:00
9fe0ae1889 improve person creation to fix error handling 2015-12-10 14:55:49 +01:00
04c56f667a register birthdateValidator
in birthdate validator, improve the message
2015-12-10 14:55:12 +01:00
71eb972c4c create validator and tests 2015-12-09 21:33:57 +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
Jean Pierre Huart
2c08bf2c6c Doc to install as a developper 2015-12-08 17:07:21 +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
Marc Ducobu
57fbd54a9c Removing the choice_with_other_widget that is alreay defined in the main bundle 2015-12-08 11:41:34 +01:00
Marc Ducobu
0f632be80b Choice widget expanded use the .inline_choice class & choice_with_other_widget display the label and the input on the same line 2015-12-08 11:40:16 +01:00
Marc Ducobu
49339d78fa Amelioration UI 2015-12-04 19:39:47 +01:00
Marc Ducobu
39dfd17c5d Improving UI 2015-12-04 19:37:47 +01:00