diff --git a/Site5/App_GlobalResources/Pages.Public.resx b/Site5/App_GlobalResources/Pages.Public.resx index 48af725b..b7223b1a 100644 --- a/Site5/App_GlobalResources/Pages.Public.resx +++ b/Site5/App_GlobalResources/Pages.Public.resx @@ -228,6 +228,18 @@ Complete signup. + + What position are you interested in? + + + Highest Geography + + + Position + + + Check the position you'd like to volunteer/apply for. You can check several. + Welcome to {0} The {0} is the organization name diff --git a/Site5/Controls/v5/UI/web.config b/Site5/Controls/v5/UI/web.config new file mode 100644 index 00000000..188a433d --- /dev/null +++ b/Site5/Controls/v5/UI/web.config @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx b/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx new file mode 100644 index 00000000..b6bc2ca6 --- /dev/null +++ b/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx @@ -0,0 +1 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Json-SignupVolunteerPositions.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Public.Json_SignupVolunteerPositions" %> diff --git a/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx.cs b/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx.cs new file mode 100644 index 00000000..4816c7c8 --- /dev/null +++ b/Site5/Pages/v5/Public/Json-SignupVolunteerPositions.aspx.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Swarmops.Common.Enums; +using Swarmops.Logic.Financial; +using Swarmops.Logic.Security; +using Swarmops.Logic.Structure; +using Swarmops.Logic.Swarm; + +namespace Swarmops.Frontend.Pages.v5.Public +{ + public partial class Json_SignupVolunteerPositions : DataV5Base + { + protected void Page_Load (object sender, EventArgs e) + { + // No access control on page - this is called from Signup + + _organization = Organization.FromIdentity (Convert.ToInt32 (Request["OrganizationId"])); + int geographyId = Convert.ToInt32 (Request["GeographyId"]); + if (geographyId != 0) + { + _geography = Geography.FromIdentity (geographyId); + } + + Positions positions = Positions.ForOrganization (_organization).AtLevel (PositionLevel.GeographyDefault); + + // Format as JSON and return + + CommonV5.CulturePreInit (Request); // Sets the culture + + Response.ContentType = "application/json"; + string json = FormatAsJson (positions); + Response.Output.WriteLine (json); + Response.End(); + } + + private Organization _organization; + private Geography _geography; + + private string FormatAsJson (Positions positions) + { + StringBuilder result = new StringBuilder (16384); + + result.Append ("["); + + foreach (Position position in positions) + { + if (position.Volunteerable) + { + StringBuilder extraTags = new StringBuilder(); + + result.Append ("{"); + result.AppendFormat ( + "\"positionId\":\"{0}\",\"positionTitle\":\"{1}\",\"highestGeography\":\"{2}\",\"positionDescription\":\"{3}\"", + position.Identity, JsonSanitize(position.Localized()), string.Empty /* geography */, string.Empty /* description */); + result.Append ("},"); + } + } + + if (result.Length > 0) + { + result.Remove (result.Length - 1, 1); // remove last comma + } + + result.Append ("]"); + + return result.ToString(); + } + } +} \ No newline at end of file diff --git a/Site5/Pages/v5/Public/Signup.aspx b/Site5/Pages/v5/Public/Signup.aspx index 4d9f7d90..970770c8 100644 --- a/Site5/Pages/v5/Public/Signup.aspx +++ b/Site5/Pages/v5/Public/Signup.aspx @@ -1,675 +1,679 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Signup.aspx.cs" Inherits="Swarmops.Frontend.Pages.Public.Signup" %> - - - - - - - - - - - - - - - - - - - - - - <%=Organization.Name %> - Signup - - - - - - - - - - - - - - - - - - - - - -> -
- - - - - -
-
- -
- -
- - -
-
- -
- -
-

-

This is the organization's custom welcome text. It has not yet been written; it is set in Admin / Org Settings.



-
-
- -
- ​
- ​
- ​
- ​
- ​
- ​
-
 
XX–
- ... 
- ​
- ​
-
-
-
-

-

- -
- ...​
- ​
- ​
-
-
-
-

-

- -

- -

- -

-
-
-

-

- - - - - - - - -
-

-
-
-
-
- -
-
- -
- - -
- - - - - - - - - - - - - - - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Signup.aspx.cs" Inherits="Swarmops.Frontend.Pages.Public.Signup" %> + + + + + + + + + + + + + + + + + + + + + + <%=Organization.Name %> - Signup + + + + + + + + + + + + + + + + + + + + + + + +> +
+ + + + + +
+
+ +
+ +
+ + +
+
+ +
+ +
+

+

This is the organization's custom welcome text. It has not yet been written; it is set in Admin / Org Settings.



+
+
+ +
+ ​
+ ​
+ ​
+ ​
+ ​
+ ​
+
 
XX–
+ ... 
+ ​
+ ​
+
+
+
+

+

+ +
+ ...​
+ ​
+ ​
+
+
+
+

+

+ +

+ +

+ +

+
+
+

+

+ + + + + + + + +
+

+
+
+
+
+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + diff --git a/Site5/Pages/v5/Public/Signup.aspx.cs b/Site5/Pages/v5/Public/Signup.aspx.cs index 792e047a..014517c9 100644 --- a/Site5/Pages/v5/Public/Signup.aspx.cs +++ b/Site5/Pages/v5/Public/Signup.aspx.cs @@ -156,6 +156,11 @@ namespace Swarmops.Frontend.Pages.Public this.RadioActivationVolunteer.Text = Resources.Pages.Public.Signup_ActivationVolunteerHeader; this.LabelActivationVolunteerText.Text = Resources.Pages.Public.Signup_ActivationVolunteer; + this.LabelVolunteerHeaderHighestGeography.Text = Resources.Pages.Public.Signup_VolunteerTableHeaderGeography; + this.LabelVolunteerHeaderPositionTitle.Text = Resources.Pages.Public.Signup_VolunteerTableHeaderPosition; + this.LabelVolunteerPositionHeader.Text = Resources.Pages.Public.Signup_VolunteerHeader; + this.LabelVolunteerPositionText.Text = Resources.Pages.Public.Signup_VolunteerText; + // Enable support for RTL languages if (Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)