In der Klasse ccm-cms/src/com/arsdigita/cms/ui/type/AddDateElement.java die FormProcessException in den Zeilen 145, 149, 154, 159 und 164 umgebaut.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3184 8810af33-2d31-482b-a856-94f89814c4df
master
tosmers 2015-02-15 15:53:14 +00:00
parent 14f3a6e3fa
commit 2665dc757c
1 changed files with 10 additions and 15 deletions

View File

@ -142,33 +142,28 @@ public class AddDateElement extends ElementAddForm {
Integer toYear = (Integer) m_toYear.getValue(state);
if (!(fromYear != null && toYear != null)) {
throw new FormProcessException
((String) GlobalizationUtil.globalize
("cms.ui.type.year_range_not_balanced").localize());
throw new FormProcessException(GlobalizationUtil.globalize(
"cms.ui.type.year_range_not_balanced"));
} else {
if ((fromYear.intValue() < 0) || (toYear.intValue() < 0)) {
throw new FormProcessException
((String) GlobalizationUtil.globalize
("cms.ui.type.year_is_negative").localize());
throw new FormProcessException(GlobalizationUtil.globalize(
"cms.ui.type.year_is_negative"));
}
if (fromYear.intValue() > toYear.intValue()) {
throw new FormProcessException
((String) GlobalizationUtil.globalize
("cms.ui.type.year_range_wrong_order").localize());
throw new FormProcessException(GlobalizationUtil.globalize(
"cms.ui.type.year_range_wrong_order"));
}
if ((toYear.intValue() - fromYear.intValue()) > 200) {
throw new FormProcessException
((String) GlobalizationUtil.globalize
("cms.ui.type.year_range_too_great").localize());
throw new FormProcessException(GlobalizationUtil.globalize(
"cms.ui.type.year_range_too_great"));
}
if ((fromYear.intValue() < 1900 || fromYear.intValue() > 2100) &&
(toYear.intValue() < 1900 || toYear.intValue() > 2100)) {
throw new FormProcessException
((String) GlobalizationUtil.globalize
("cms.ui.type.year_too_anachronistic").localize());
throw new FormProcessException(GlobalizationUtil.globalize(
"cms.ui.type.year_too_anachronistic"));
}
}
}