mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 05:23:49 +00:00
add a date field
This commit is contained in:
@@ -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
|
||||
|
@@ -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', ...)
|
@@ -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%
|
1
Resources/views/CustomFieldsRendering/date.html.twig
Normal file
1
Resources/views/CustomFieldsRendering/date.html.twig
Normal file
@@ -0,0 +1 @@
|
||||
{% if value is not empty %}{{ value|localizeddate(format, 'none')}}{% endif %}
|
Reference in New Issue
Block a user