add a date field

This commit is contained in:
2018-03-27 16:35:56 +02:00
parent bcf0e8d89d
commit d1fd359366
5 changed files with 249 additions and 1 deletions

View File

@@ -87,6 +87,14 @@ services:
- "@chill.main.helper.translatable_string"
tags:
- { name: 'chill.custom_field', type: 'title' }
chill.custom_field.date:
class: Chill\CustomFieldsBundle\CustomFields\CustomFieldDate
arguments:
- "@templating"
- "@chill.main.helper.translatable_string"
tags:
- { name: 'chill.custom_field', type: 'date' }
chill.custom_field.helper:
class: Chill\CustomFieldsBundle\Service\CustomFieldsHelper

View File

@@ -57,6 +57,7 @@ choice: choix
Title: Titre
text: texte
Text field: Champ texte
Date field: Champ date
#custom field choice
Multiplicity: Multiplicité
@@ -94,3 +95,7 @@ Number field: Champ nombre
Options key: Clé des options
Choose a value: Choisissez une valeur
Long choice field: Champ à choix pré-enregistrés
#Custom field date
Greater or equal than (expression like 1 day ago, 2 years ago, +1 month, today, tomorrow, or date with format YYYY-mm-dd): Date après (indiquer une expression PHP comme '1 day ago', '2 years ago', '+1 month', 'today', 'tomorrow', ...)
Lesser or equal than (expression like 1 day ago, 2 years ago, +1 month, today, tomorrow, or date with format YYYY-mm-dd): Date avant (indiquer une expression PHP comme '1 day ago', '2 years ago', '+1 month', 'today', 'tomorrow', ...)

View File

@@ -1 +1,3 @@
Characters not allowed. Only lowercase letters, numbers and "-" are allowed.: Caractères non autorisés. Seules les lettres minuscules, les nombres et le tiret ("-") sont autorisés.
Characters not allowed. Only lowercase letters, numbers and "-" are allowed.: Caractères non autorisés. Seules les lettres minuscules, les nombres et le tiret ("-") sont autorisés.
'This date must be after or equal to %date%': Cette date doit être égale ou postérieure au %date%
'This date must be before or equal to %date%': Cette date doit être antérieure ou égale au %date%

View File

@@ -0,0 +1 @@
{% if value is not empty %}{{ value|localizeddate(format, 'none')}}{% endif %}