From: helge Date: Tue, 19 Jul 2005 08:04:54 +0000 (+0000) Subject: added some field validation X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=408d9fe5d2608af14260b55e55563472dec5cedd;p=scalable-opengroupware.org added some field validation git-svn-id: http://svn.opengroupware.org/SOGo/trunk@815 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/English.lproj/Localizable.strings b/SOGo/UI/Scheduler/English.lproj/Localizable.strings index 1db9cf39..12ee0507 100644 --- a/SOGo/UI/Scheduler/English.lproj/Localizable.strings +++ b/SOGo/UI/Scheduler/English.lproj/Localizable.strings @@ -213,4 +213,6 @@ /* validation errors */ -validate_notitle = "No title is set, continue?"; +validate_notitle = "No title is set, continue?"; +validate_invalid_startdate = "Incorrect startdate field!"; +validate_invalid_enddate = "Incorrect enddate field!"; diff --git a/SOGo/UI/Templates/ChangeLog b/SOGo/UI/Templates/ChangeLog index 397ed582..3dab1b64 100644 --- a/SOGo/UI/Templates/ChangeLog +++ b/SOGo/UI/Templates/ChangeLog @@ -1,7 +1,7 @@ 2005-07-19 Helge Hess * UIxAppointmentEditor.wox: check whether title is set and raise a - confirm panel if not + confirm panel if not, check if startdate/enddate are 10 chars long 2005-07-18 Helge Hess diff --git a/SOGo/UI/Templates/UIxAppointmentEditor.wox b/SOGo/UI/Templates/UIxAppointmentEditor.wox index a3ce8bec..3a8d49ab 100644 --- a/SOGo/UI/Templates/UIxAppointmentEditor.wox +++ b/SOGo/UI/Templates/UIxAppointmentEditor.wox @@ -13,8 +13,25 @@ var e; e = document.getElementById('summary'); - if (e.value.length == 0) - return confirm(''); + if (e.value.length == 0) { + if (!confirm('')) + return false; + } + + e = document.getElementById('startTime_date'); + if (e.value.length != 10) { + alert(''); + return false; + } + + e = document.getElementById('endTime_date'); + if (e.value.length != 10) { + alert(''); + return false; + } + + // TODO: parse start/enddate and ensure that start is before end + return true; }