diff --git a/Site/App_GlobalResources/Pages.Public.designer.cs b/Site/App_GlobalResources/Pages.Public.designer.cs index 3cdbe455..0a484f61 100644 --- a/Site/App_GlobalResources/Pages.Public.designer.cs +++ b/Site/App_GlobalResources/Pages.Public.designer.cs @@ -19,7 +19,7 @@ namespace Resources.Pages { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option or rebuild the Visual Studio project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Public { @@ -132,6 +132,24 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to You are submitting an Application for a {0} with {1}. There are no fees related to submitting the Application as such.. + /// + internal static string Signup_ApplicationApproval { + get { + return ResourceManager.GetString("Signup_ApplicationApproval", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Applying for a {0} in {1}. + /// + internal static string Signup_ApplyingFor { + get { + return ResourceManager.GetString("Signup_ApplyingFor", resourceCulture); + } + } + /// /// Looks up a localized string similar to Welcome! This is the <em>Dashboard,</em> where you can access internal functionality of {0}. You will get more information in mail shortly.<br/><br/> /// @@ -143,6 +161,33 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to This is the organization's custom welcome text. It has not yet been written; it is set in Admin / Org Settings.. + /// + internal static string Signup_DefaultFirstPageText { + get { + return ResourceManager.GetString("Signup_DefaultFirstPageText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is the organization-specific text shown for Signup Finalization. It is set in Admin / Org Settings. When the new person presses Finish, they will be entered into the organization, logged on, and sent to the Dashboard as a Beginner user. + /// + internal static string Signup_DefaultLastPageText { + get { + return ResourceManager.GetString("Signup_DefaultLastPageText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is the organization's short sidebar info. It is set in Administration / Org Settings.. + /// + internal static string Signup_DefaultSidebarText { + get { + return ResourceManager.GetString("Signup_DefaultSidebarText", resourceCulture); + } + } + /// /// Looks up a localized string similar to You have already signed up to this Swarmops server. Please use the Reset Password function from the login screen instead of creating a new account.. /// @@ -404,6 +449,15 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to Swarmops has not yet implemeted support for this fee structure.. + /// + internal static string Signup_Unsupported { + get { + return ResourceManager.GetString("Signup_Unsupported", resourceCulture); + } + } + /// /// Looks up a localized string similar to What position are you interested in?. /// diff --git a/Site/App_GlobalResources/Pages.Public.resx b/Site/App_GlobalResources/Pages.Public.resx index dcd8ba09..997be057 100644 --- a/Site/App_GlobalResources/Pages.Public.resx +++ b/Site/App_GlobalResources/Pages.Public.resx @@ -145,11 +145,26 @@ Officer Volunteer + + You are submitting an Application for a {0} with {1}. There are no fees related to submitting the Application as such. + + + Applying for a {0} in {1} + Welcome! This is the <em>Dashboard,</em> where you can access internal functionality of {0}. You will get more information in mail shortly.<br/><br/> If you volunteered for taking formal responsibility, somebody (probably also a volunteer, like yourself) will contact you to discuss more about the opportunities available. + + This is the organization's custom welcome text. It has not yet been written; it is set in Admin / Org Settings. + + + This is the organization-specific text shown for Signup Finalization. It is set in Admin / Org Settings. When the new person presses Finish, they will be entered into the organization, logged on, and sent to the Dashboard as a Beginner user + + + This is the organization's short sidebar info. It is set in Administration / Org Settings. + You have already signed up to this Swarmops server. Please use the Reset Password function from the login screen instead of creating a new account. @@ -242,6 +257,9 @@ If you volunteered for taking formal responsibility, somebody (probably also a v Complete signup. + + Swarmops has not yet implemeted support for this fee structure. + What position are you interested in? diff --git a/Site/Pages/v5/Public/Signup.aspx b/Site/Pages/v5/Public/Signup.aspx index c3a39e20..ef4383aa 100644 --- a/Site/Pages/v5/Public/Signup.aspx +++ b/Site/Pages/v5/Public/Signup.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Public.Signup" CodeFile="Signup.aspx.cs" %> +<%@ Page Language="C#" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Public.Signup" CodeFile="Signup.aspx.cs" CodeBehind="Signup.aspx.cs" %> @@ -114,6 +114,10 @@ font-size: 16px; } + .enableAskParticipantStreet { + display: none; + } + .entryLabelsAdmin { font-weight: 300; @@ -309,10 +313,13 @@ } isValid = ValidateTextField('#<%= TextCity.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorCity%>")) && isValid; - isValid = ValidateTextField('#<%= TextStreet1.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorStreet%>")) && isValid; - isValid = ValidateTextField('#<%= TextMail.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorMail%>")) && isValid; + isValid = ValidateTextField('#<%= TextMail.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorMail%>")) && isValid; isValid = ValidateTextField('#<%= TextName.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorName%>")) && isValid; // TODO: Actually validate geography? + if (askParticipantStreet) { + isValid = ValidateTextField('#<%= TextStreet1.ClientID %>', SwarmopsJS.unescape("<%=Localize_ErrorStreet%>")) && isValid; + } + if (isValid) { var jsonData = {}; @@ -373,6 +380,9 @@ // above code some day to a common file between this file // and Swarm / Add. (TODO.) + if (askParticipantStreet) { + $('.enableAskParticipantStreet').show(); + } $('#wizard').smartWizard({ transitionEffect: 'fade', @@ -565,6 +575,7 @@ var suppressChecks = false; var selectedPositions = {}; + var askParticipantStreet = <%=this.Organization.Parameters.AskParticipantStreet? "true": "false"%>; @@ -632,7 +643,7 @@

-

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



+



@@ -640,8 +651,8 @@
-
-
+
+
 
XX--
...
@@ -652,8 +663,8 @@


-
-
+

+
, 


@@ -703,7 +714,7 @@

-

This is the organization-specific text shown for Signup Finalization. It is set in Admin / Org Settings. When the new person presses Finish, they will be entered into the organization, logged on, and sent to the Dashboard as a Beginner user.

+

diff --git a/Site/Pages/v5/Public/Signup.aspx.cs b/Site/Pages/v5/Public/Signup.aspx.cs index a3171329..7c73b367 100644 --- a/Site/Pages/v5/Public/Signup.aspx.cs +++ b/Site/Pages/v5/Public/Signup.aspx.cs @@ -138,7 +138,6 @@ namespace Swarmops.Frontend.Pages.Public this.LabelSidebarActionsHeader.Text = Resources.Global.Sidebar_Actions; this.LabelWelcomeHeader.Text = String.Format (Resources.Pages.Public.Signup_Welcome, Organization.Name); - this.LabelHeader.Text = String.Format(Resources.Pages.Public.Signup_SigningUp, Organization.Name).ToUpperInvariant(); this.LabelYourLogon.Text = Resources.Pages.Public.Signup_YourLogon; this.LabelYourLogonText.Text = Resources.Pages.Public.Signup_YourLogonText; @@ -202,19 +201,58 @@ namespace Swarmops.Frontend.Pages.Public } this.LabelSidebarActionsHeader.Text = Resources.Pages.Public.Signup_FeeHeader; - // if (this.Organization.MembershipFee == 0 && this.Organization.MembershipRenewalFee == 0) - this.LabelSidebarActionsContent.Text = String.Format (Resources.Pages.Public.Signup_NoFeeText, - Participant.Localized (this.Organization.RegularLabel, TitleVariant.Ship), DateTime.Today.AddYears (1).ToShortDateString(), this.Organization.Name); this.LabelSidebarInfoHeader.Text = Resources.Global.Sidebar_Information; this.LabelSidebarTodoHeader.Text = Resources.Global.Sidebar_Todo; this.LabelSidebarTodo.Text = Resources.Pages.Public.Signup_Todo_Complete; - this.LabelSidebarInfoContent.Text = - @"This is the organization's Short About text. It is set in Admin / Org Settings."; + this.LabelSidebarInfoContent.Text = CustomOrDefault(this.Organization.Parameters.SidebarOrgInfo, + Resources.Pages.Public.Signup_DefaultSidebarText); + + this.LiteralFirstPageSignup.Text = CustomOrDefault(this.Organization.Parameters.SignupFirstPage, + Resources.Pages.Public.Signup_DefaultFirstPageText); + this.LiteralLastPageSignup.Text = CustomOrDefault(this.Organization.Parameters.SignupLastPage, + Resources.Pages.Public.Signup_DefaultLastPageText); + + switch (this.Organization.Parameters.ParticipationEntry) + { + case "": // default + case "Application": + + // if (this.Organization.MembershipFee == 0 && this.Organization.MembershipRenewalFee == 0) + this.LabelSidebarActionsContent.Text = String.Format(Resources.Pages.Public.Signup_NoFeeText, + Participant.Localized(this.Organization.RegularLabel, TitleVariant.Ship), DateTime.Today.AddYears(1).ToShortDateString(), this.Organization.Name); + this.LabelHeader.Text = String.Format(Resources.Pages.Public.Signup_SigningUp, Organization.Name).ToUpperInvariant(); + break; + + case "ApplicationApproval": + // Each application must be approved + this.LabelSidebarActionsContent.Text = String.Format(Resources.Pages.Public.Signup_ApplicationApproval, + Participant.Localized(this.Organization.RegularLabel, TitleVariant.Ship), this.Organization.Name); + this.LabelHeader.Text = String.Format(Resources.Pages.Public.Signup_ApplyingFor, Participant.Localized(this.Organization.RegularLabel, TitleVariant.Ship), Organization.Name).ToUpperInvariant(); + + break; + + default: + this.LabelSidebarActionsContent.Text = Resources.Pages.Public.Signup_Unsupported; + this.LabelHeader.Text = String.Format(Resources.Pages.Public.Signup_SigningUp, Organization.Name).ToUpperInvariant(); + break; + + + } } + private string CustomOrDefault(string customData, string defaultData) + { + if (!string.IsNullOrEmpty(customData)) + { + return customData; + } + + return defaultData; + } + protected Organization Organization; [WebMethod] @@ -241,6 +279,8 @@ namespace Swarmops.Frontend.Pages.Public city, countryCode, parsedDateOfBirth, gender); Participation participation = newPerson.AddParticipation (organization, DateTime.UtcNow.AddYears (1)); // TODO: set duration from organization settings of Participantship + // TODO: CREATE APPLICATION INSTEAD DEPENDING ON POLICY + // TODO: SEND NOTIFICATIONS // Log the signup @@ -316,8 +356,6 @@ namespace Swarmops.Frontend.Pages.Public NGeoIP.RawData rawData = (NGeoIP.RawData) GuidCache.Get(ipAddress); - Persistence.Key["DebugData"] = HttpContext.Current.Request.ToRaw(); - if (rawData == null) { NGeoIP.Request request = new Request() diff --git a/Site/Pages/v5/Public/Signup.aspx.designer.cs b/Site/Pages/v5/Public/Signup.aspx.designer.cs index 2b883203..6fa6f51b 100644 --- a/Site/Pages/v5/Public/Signup.aspx.designer.cs +++ b/Site/Pages/v5/Public/Signup.aspx.designer.cs @@ -48,114 +48,6 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.ScriptManager ScriptManagerBlahblah; - /// - /// LiteralErrorDate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorDate; - - /// - /// LiteralErrorCity control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorCity; - - /// - /// LiteralErrorStreet control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorStreet; - - /// - /// LiteralErrorMail control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorMail; - - /// - /// LiteralErrorName control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorName; - - /// - /// LiteralErrorMailExists control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorMailExists; - - /// - /// LiteralWizardNextButton control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralWizardNextButton; - - /// - /// LiteralWizardFinishButton control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralWizardFinishButton; - - /// - /// LiteralErrorNeedPassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorNeedPassword; - - /// - /// LiteralErrorPasswordMismatch control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorPasswordMismatch; - - /// - /// LiteralErrorSelectActivationLevel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorSelectActivationLevel; - - /// - /// LiteralErrorSelectVolunteerPosition control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorSelectVolunteerPosition; - /// /// LabelHeader control. /// @@ -272,7 +164,7 @@ namespace Swarmops.Frontend.Pages.Public { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelStep5Text; - + /// /// LabelStep6Header control. /// @@ -281,7 +173,7 @@ namespace Swarmops.Frontend.Pages.Public { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelStep6Header; - + /// /// LabelStep6Text control. /// @@ -290,25 +182,7 @@ namespace Swarmops.Frontend.Pages.Public { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelStep6Text; - - /// - /// LabelStep6Header control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label LabelStep7Header; - - /// - /// LabelStep6Text control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label LabelStep7Text; - + /// /// LabelWelcomeHeader control. /// @@ -318,6 +192,105 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.WebControls.Label LabelWelcomeHeader; + /// + /// LiteralFirstPageSignup control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal LiteralFirstPageSignup; + + /// + /// TextName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextName; + + /// + /// DropCountries control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList DropCountries; + + /// + /// TextMail control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextMail; + + /// + /// TextPhone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextPhone; + + /// + /// TextStreet1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextStreet1; + + /// + /// TextStreet2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextStreet2; + + /// + /// TextPostal control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextPostal; + + /// + /// TextCity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextCity; + + /// + /// TextDateOfBirth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextDateOfBirth; + + /// + /// DropGenders control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList DropGenders; + /// /// LabelName control. /// @@ -426,96 +399,6 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.WebControls.Label LabelLegalGender; - /// - /// TextName control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextName; - - /// - /// DropCountries control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList DropCountries; - - /// - /// TextMail control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextMail; - - /// - /// TextPhone control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextPhone; - - /// - /// TextStreet1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextStreet1; - - /// - /// TextStreet2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextStreet2; - - /// - /// TextPostal control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextPostal; - - /// - /// TextCity control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextCity; - - /// - /// TextDateOfBirth control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextDateOfBirth; - - /// - /// DropGenders control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList DropGenders; - /// /// LabelYourLogon control. /// @@ -534,6 +417,24 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.WebControls.Label LabelYourLogonText; + /// + /// TextPassword1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextPassword1; + + /// + /// TextPassword2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextPassword2; + /// /// LabelLoginKey control. /// @@ -561,24 +462,6 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.WebControls.Label LabelPassword2; - /// - /// TextPassword1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextPassword1; - - /// - /// TextPassword2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextPassword2; - /// /// LabelActivationLevelHeader control. /// @@ -705,6 +588,24 @@ namespace Swarmops.Frontend.Pages.Public { /// protected global::System.Web.UI.WebControls.Label LabelFinalizeSignupHeader; + /// + /// LiteralLastPageSignup control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal LiteralLastPageSignup; + + /// + /// ImageLogo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image ImageLogo; + /// /// LabelSidebarInfoHeader control. /// @@ -758,15 +659,5 @@ namespace Swarmops.Frontend.Pages.Public { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelSidebarTodo; - - - /// - /// Manually added control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image ImageLogo; } }