mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Using actual date format settings in DateField/TimeField->validate() messages (from r107786)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112694 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
40bc9ced5d
commit
171fdd6050
@ -330,7 +330,7 @@ JS;
|
|||||||
if(!$valid) {
|
if(!$valid) {
|
||||||
$validator->validationError(
|
$validator->validationError(
|
||||||
$this->name,
|
$this->name,
|
||||||
_t('DateField.VALIDDATEFORMAT', "Please enter a valid date format (DD/MM/YYYY)."),
|
_t('DateField.VALIDDATEFORMAT2', sprintf("Please enter a valid date format (%s).", $this->getConfig('dateformat'))),
|
||||||
"validation",
|
"validation",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
@ -146,7 +146,7 @@ class TimeField extends TextField {
|
|||||||
if(!Zend_Date::isDate($this->value, $this->getConfig('timeformat'), $this->locale)) {
|
if(!Zend_Date::isDate($this->value, $this->getConfig('timeformat'), $this->locale)) {
|
||||||
$validator->validationError(
|
$validator->validationError(
|
||||||
$this->name,
|
$this->name,
|
||||||
_t('DateField.VALIDDATEFORMAT', "Please enter a valid time format."),
|
_t('TimeField.VALIDDATEFORMAT', sprintf("Please enter a valid time format (%s)", $this->getConfig('timeformat'))),
|
||||||
"validation",
|
"validation",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
@ -152,6 +152,7 @@ $lang['en_US']['DateField']['NOTSET'] = 'not set';
|
|||||||
$lang['en_US']['DateField']['TODAY'] = 'today';
|
$lang['en_US']['DateField']['TODAY'] = 'today';
|
||||||
$lang['en_US']['DateField']['VALIDATIONJS'] = 'Please enter a valid date format (DD/MM/YYYY).';
|
$lang['en_US']['DateField']['VALIDATIONJS'] = 'Please enter a valid date format (DD/MM/YYYY).';
|
||||||
$lang['en_US']['DateField']['VALIDDATEFORMAT'] = 'Please enter a valid time format.';
|
$lang['en_US']['DateField']['VALIDDATEFORMAT'] = 'Please enter a valid time format.';
|
||||||
|
$lang['en_US']['DateField']['VALIDDATEFORMAT2'] = 'Please enter a valid time format (%s)';
|
||||||
$lang['en_US']['DateField']['VALIDDATEMAXDATE'] = 'Your date has to be older or matching the maximum allowed date (%s)';
|
$lang['en_US']['DateField']['VALIDDATEMAXDATE'] = 'Your date has to be older or matching the maximum allowed date (%s)';
|
||||||
$lang['en_US']['DateField']['VALIDDATEMINDATE'] = 'Your date has to be newer or matching the minimum allowed date (%s)';
|
$lang['en_US']['DateField']['VALIDDATEMINDATE'] = 'Your date has to be newer or matching the minimum allowed date (%s)';
|
||||||
$lang['en_US']['DropdownField']['CHOOSE'] = array(
|
$lang['en_US']['DropdownField']['CHOOSE'] = array(
|
||||||
@ -810,6 +811,7 @@ $lang['en_US']['TableListField_PageControls.ss']['VIEWFIRST'] = 'View first';
|
|||||||
$lang['en_US']['TableListField_PageControls.ss']['VIEWLAST'] = 'View last';
|
$lang['en_US']['TableListField_PageControls.ss']['VIEWLAST'] = 'View last';
|
||||||
$lang['en_US']['TableListField_PageControls.ss']['VIEWNEXT'] = 'View next';
|
$lang['en_US']['TableListField_PageControls.ss']['VIEWNEXT'] = 'View next';
|
||||||
$lang['en_US']['TableListField_PageControls.ss']['VIEWPREVIOUS'] = 'View previous';
|
$lang['en_US']['TableListField_PageControls.ss']['VIEWPREVIOUS'] = 'View previous';
|
||||||
|
$lang['en_US']['TimeField']['VALIDATEFORMAT'] = 'Please enter a valid time format (%s)';
|
||||||
$lang['en_US']['ToggleCompositeField.ss']['HIDE'] = 'Hide';
|
$lang['en_US']['ToggleCompositeField.ss']['HIDE'] = 'Hide';
|
||||||
$lang['en_US']['ToggleCompositeField.ss']['SHOW'] = 'Show';
|
$lang['en_US']['ToggleCompositeField.ss']['SHOW'] = 'Show';
|
||||||
$lang['en_US']['ToggleField']['LESS'] = 'less';
|
$lang['en_US']['ToggleField']['LESS'] = 'less';
|
||||||
|
Loading…
Reference in New Issue
Block a user