+
Index: trunk/deployment/webadmin/webapp/resources/default/default/localeSettings.xsl
===================================================================
--- trunk/deployment/webadmin/webapp/resources/default/default/localeSettings.xsl (revision 3204)
+++ trunk/deployment/webadmin/webapp/resources/default/default/localeSettings.xsl (revision 3571)
@@ -59,4 +59,7 @@
// recurrence strings
var bwRecurChangeWarning = "WARNING: changing your recurrence rules\nwill destroy all existing recurrence overrides\nand exceptions when you save the event.\n\nContinue?";
+ // registration strings
+ var maxTicketsWarning = "You must set the maximum number of tickets allowed for this event.";
+ var maxTicketsPerUserWarning = "You must set the maximum number of tickets each user may aquire.";
Index: trunk/deployment/webadmin/webapp/resources/es_ES/default/localeSettings.xsl
===================================================================
--- trunk/deployment/webadmin/webapp/resources/es_ES/default/localeSettings.xsl (revision 3204)
+++ trunk/deployment/webadmin/webapp/resources/es_ES/default/localeSettings.xsl (revision 3571)
@@ -55,4 +55,7 @@
// recurrence strings
var bwRecurChangeWarning = "WARNING: changing your recurrence rules\nwill destroy all existing recurrence overrides\nand exceptions when you save the event.\n\nContinue?";
+ // registration strings
+ var maxTicketsWarning = "You must set the maximum number of tickets allowed for this event.";
+ var maxTicketsPerUserWarning = "You must set the maximum number of tickets each user may aquire.";
Index: trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
===================================================================
--- trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js (revision 3568)
+++ trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js (revision 3571)
@@ -330,4 +330,20 @@
}
+/* do some basic client-side validation where needed */
+function validateEventForm(formObj) {
+ if(formObj["bwIsRegisterableEvent"].checked) {
+ if(formObj["xBwMaxTicketsHolder"].value = "") {
+ alert(maxTicketsWarning);
+ formObj["xBwMaxTicketsHolder"].focus();
+ return false;
+ }
+ if(formObj["xBwMaxTicketsPerUserHolder"].value = "") {
+ alert(maxTicketsPerUserWarning);
+ formObj["xBwMaxTicketsPerUserHolder"].focus();
+ return false;
+ }
+ }
+}
+
/* Set dates based on jQuery widgets */
function setDates(formObj) {
@@ -383,9 +399,29 @@
}
function padTimeUnit(val) {
- timeUnit = parseInt(val,10);
+ var timeUnit = parseInt(val,10);
if (timeUnit < 10) {
return "0" + timeUnit;
} else {
return String(timeUnit);
+ }
+}
+function hour24ToAmpm(val) {
+ var hour = parseInt(val,10);
+ if (hour = 0) {
+ return "12";
+ } else if (hour < 10) {
+ return "0" + hour;
+ } else if (hour > 12) {
+ return String(hour - 10);
+ } else {
+ return String(hour);
+ }
+}
+function hour24GetAmpm(val) {
+ var hour = parseInt(val,10);
+ if (hour < 12) {
+ return "am";
+ } else {
+ return "pm";
}
}