61 Commits

Author SHA1 Message Date
9867cca632 improve rendering of cfgroup index 2015-12-17 22:16:06 +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
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
9ca2be78eb use localize translatable string function to render label widget 2015-12-15 10:06:05 +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
57fbd54a9c Removing the choice_with_other_widget that is alreay defined in the main bundle 2015-12-08 11:41:34 +01:00
c9ca7c1e1b fix creation of custom field without cfgroup id 2015-11-30 21:31:58 +01:00
cbf9cee65c clean code of usnused methods 2015-11-27 13:51:36 +01:00
fa3245b99b add a btn on edit link 2015-11-27 13:42:06 +01:00
bf99b68a2a Improve rendering of options and fields 2015-11-27 13:37:07 +01:00
f24a088a0d [wip] re-introduce 'add element' functionality 2015-11-25 21:26:30 +01:00
b96076022f [wip] layout of custom field edition
[ci skip]
2015-11-25 08:45:17 +01:00
421f54e194 remove code for custom fields default group CRUD
The CRUD of default groups is handled now by the custom fields index page. The CRUD is not necessary.
2015-11-08 18:52:28 +01:00
3e23c1f156 show options in show view 2015-11-08 18:47:16 +01:00
45d34dc312 fix customfieldsgroup edit view 2015-11-07 09:51:36 +01:00
59ce457131 add a title 2015-11-07 08:59:57 +01:00
043f5a1eaf fix show page 2015-11-05 23:49:22 +01:00
bb1e690bec fix "create" page with translation and layout 2015-11-05 22:41:54 +01:00
9d65ca5088 layout of index page for customfieldsgroup
- add a "default" column (according to chill-project/custom-fields#3 )
- translation
2015-10-31 17:55:10 +01:00
Marc Ducobu
e2c1a9bb9f Adding customfileds config in the Admin section menu 2015-10-30 10:36:27 +01:00
Marc Ducobu
f068ac288f Debug JS - close refs #626 2015-10-22 15:09:43 +02:00
Marc Ducobu
6af61f71dc Refactoring Resources/views/CustomFieldsRendering/choice.html.twig : indentation 2015-10-22 15:07:38 +02:00
Marc Ducobu
4abb994725 Resources/views/CustomFieldsGroup/render_for_test.html.twig : refactoring : good indentation 2015-09-30 14:32:57 +02:00
Marc Ducobu
101783b9f1 Only display active custom fields in form & view 2015-09-30 13:32:24 +02:00
Marc Ducobu
20ba768e43 Renaming template for custom field group 2015-09-30 13:27:59 +02:00
Marc Ducobu
be759dd640 use of 'csv_cell' twig filter refs #401 2015-02-18 13:13:00 +01: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
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
65b8499458 take into account new lines into customfiels text
[ci skip]
2014-11-27 12:45:12 +01:00
Marc Ducobu
c8cb5d3b10 Adding customFieldsGroup in admin menu + Using admin template 2014-11-21 17:43:06 +01:00
Marc Ducobu
1c45ce9ff4 Adding customFields in admin menu 2014-11-21 17:40:51 +01:00
Marc Ducobu
43c56b0f04 CustomFieldsDefaultGroup/list.html.twig with admin layout 2014-11-21 17:34:57 +01:00
b687e9e07d Add a 'none' text on rendering when the custom fields is empty
close #347
2014-11-20 17:35:16 +01:00
Marc Ducobu
f702d76e68 Adding CustomFieldsDefaultGroup Entity for specifying that a group is a default group ref #307 2014-11-17 17:59:06 +01:00
Marc Ducobu
780002bed5 Using TranslatableStringHelperTwig for displaying CustomFieldTitle 2014-11-17 12:19:32 +01:00
aa16bdcbb9 Add a label "other value" on the _other option, fix #323
[ci skip]
2014-11-14 12:14:08 +01:00
Marc Ducobu
ce314899a8 Removing echo 2014-11-13 21:29:18 +01:00
869bed4ac8 layout of rendering - refs # 302 2014-11-13 18:35:44 +01:00
Marc Ducobu
8fa75e2dd6 Render for title 2014-11-12 12:28:57 +01:00
Marc Ducobu
d819ff0ba1 Removing DefaultController 2014-11-11 14:34:33 +01:00
Marc Ducobu
6bf9558058 Merge branch 'master' of git://github.com/Chill-project/CustomFields 2014-11-11 12:54:55 +01:00
Marc Ducobu
cac299368a Formating CF Form 2014-11-11 12:53:14 +01:00
Marc Ducobu
ecd919adea Merge branch 'master' of git://github.com/Chill-project/CustomFields 2014-11-11 11:55:25 +01:00
Marc Ducobu
a1e450e0b9 Adding license 2014-11-11 11:55:09 +01:00