diff --git a/Site5/App_GlobalResources/Global.resx b/Site5/App_GlobalResources/Global.resx index a3bb60e8..50c01373 100644 --- a/Site5/App_GlobalResources/Global.resx +++ b/Site5/App_GlobalResources/Global.resx @@ -824,4 +824,8 @@ MM/DD/YYYY Adapt format for culture, then translate to human-readability, not machine-readability. E.g. ÅÅÅÅ-MM-DD for Swedish. + + MMM d, YYYY + Convert the formatting only - this is machine interpreted. Example: "December 23, 1921". + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.People.resx b/Site5/App_GlobalResources/Pages.People.resx index ef27b3c2..7a1a65db 100644 --- a/Site5/App_GlobalResources/Pages.People.resx +++ b/Site5/App_GlobalResources/Pages.People.resx @@ -117,6 +117,22 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + A valid city is required. + + + A valid email is required. + + + A name is required. + + + A valid street or P.O. box is required. + + + This is where you enter new people into the organization. As you register them for a {0} {1}, they will receive a welcome message with a randomized login password in mail. The local officers will also be notified of the new person, for an opportunity to send them a welcome message. + {0} and {1} can be "one-year" and "Membership", for example + Add [Regular] The [Regular] is replaced in code. Singular form gender neutral. diff --git a/Site5/Pages/v5/Swarm/AddPerson.aspx b/Site5/Pages/v5/Swarm/AddPerson.aspx index fb884bd4..2d593aa7 100644 --- a/Site5/Pages/v5/Swarm/AddPerson.aspx +++ b/Site5/Pages/v5/Swarm/AddPerson.aspx @@ -59,6 +59,7 @@ setTimeout(function() { $('#<%=this.TextPostal.ClientID%>').fadeIn(200); }, 100); + $('#spanLabelPostal').animate({ width: 'toggle' }, 400); postalCodeVisible = true; } @@ -67,6 +68,7 @@ $('#<%=this.TextPostal.ClientID%>').animate({ width: 0 }, 200).fadeOut(100); $('#<%=this.TextCity.ClientID%>').animate({ width: "255px" }, 600); + $('#spanLabelPostal').animate({ width: 'toggle' }, 400); postalCodeVisible = false; } @@ -96,7 +98,7 @@ postalCodeLength = msg.d.PostalCodeLength; postalCodeLengthCheck = msg.d.PostalCodeLengthCheck; - $('#<%=TextPostal.ClientID%>').attr('maxlength', postalCodeLength); + $('#<%=TextPostal.ClientID%>').attr('maxlength', postalCodeLength).attr('placeholder', '12345678'.substring(0, postalCodeLength)); msg.d.PostalCodes.forEach(function (element, index, array) { postalCodeLookup[element.Code.toLowerCase()] = element.CityId; }); @@ -123,6 +125,30 @@ }); } + function ValidateFields() { + var isValid = true; + + isValid = validateTextField('#<%=this.TextName.ClientID %>', '') && isValid; + isValid = validateTextField('#<%=this.TextMail.ClientID %>', '') && isValid; + isValid = validateTextField('#<%=this.TextStreet1.ClientID %>', '') && isValid; + isValid = validateTextField('#<%=this.TextCity.ClientID %>', '') && isValid; + + // TODO: Actually validate geography? + + return isValid; + } + + function ValidateTextField(fieldId, message) { + if ($(fieldId).val().length == 0) { + alertify.error(message); + $(fieldId).addClass("entryError"); + $(fieldId).focus(); + return false; + } + + return true; + } + var postalCodeLookup = {}; var cityIdLookup = {}; var cityNameLookup = {}; @@ -152,6 +178,7 @@ ​
 
​
+