Menu ▾ ▴

#121 5dev37 bug: date format in error invalid

open
nobody
Interface (34)
5
2005-02-11
2005-02-11
No

When filling in a new group info, the error messages
regarding DATES is hardwired for a date format that is
NOT necessarily the same as the one it's ACTUALLY
expecting! This will drive new users crazy, I promise.

Modified to show the desired format in
$_SESSION['prefs']['date_format']
(make changes in modules/groups/actions/new.php)
-------------------------------------------------------------
if (!empty($_POST['StartDate'])) {
if
(!$_ENV['api']['validate']->is_date($_POST['StartDate'])) {
//fmg: show DESIRED date format (from preferences)
$_ENV['api']['sys']->push_error(t("Invalid start
date").
" (".$_SESSION['prefs']['date_format'].")");
}
}
if (!empty($_POST['EndDate'])) {
if
(!$_ENV['api']['validate']->is_date($_POST['EndDate'])) {
//fmg: show DESIRED date format (from preferences)
$_ENV['api']['sys']->push_error(t("Invalid end
date").
" (".$_SESSION['prefs']['date_format'].")");
}
}
-------------------------------------------------------------

This need considerations in the locale, because now
there can be thee "different" strings for one item. The
code may need adjusted if you want translators to do
the whole thing - right now it splits off the "Invalid
end date" from the actual code expected.

Cheers,
Fil

Discussion


Log in to post a comment.