diff --git a/Site/Pages/v5/Admin/OrgSettings.aspx.cs b/Site/Pages/v5/Admin/OrgSettings.aspx.cs
index 0d88b4e4..bd17cd6a 100644
--- a/Site/Pages/v5/Admin/OrgSettings.aspx.cs
+++ b/Site/Pages/v5/Admin/OrgSettings.aspx.cs
@@ -1,4 +1,5 @@
using System;
+using System.Globalization;
using System.Runtime.Versioning;
using System.Text.RegularExpressions;
using System.Web.Services;
@@ -65,14 +66,14 @@ namespace Swarmops.Frontend.Pages.Admin
this.TextVanityDomain.Placeholder = Resources.Global.Global_DefineToEnable;
this.TextOpenLedgersDomain.Placeholder = Resources.Global.Global_DefineToEnable;
- this.DropMembersWhen.Items.Clear();
- this.DropMembersWhen.Items.Add (new ListItem ("Application submitted", "Application"));
- this.DropMembersWhen.Items.Add (new ListItem ("Application approved", "ApplicationApproval"));
- this.DropMembersWhen.Items.Add (new ListItem ("Application submitted + paid", "ApplicationPayment"));
- this.DropMembersWhen.Items.Add (new ListItem ("Application paid + approved", "ApplicationPaymentApproval"));
- this.DropMembersWhen.Items.Add (new ListItem ("Invited and accepted", "InvitationAcceptance"));
- this.DropMembersWhen.Items.Add (new ListItem ("Invited and paid", "InvitationPayment"));
- this.DropMembersWhen.Items.Add (new ListItem ("Manual add only", "Manual"));
+ this.DropParticipationEntry.Items.Clear();
+ this.DropParticipationEntry.Items.Add (new ListItem ("Application submitted", "Application"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Application approved", "ApplicationApproval"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Application submitted + paid", "ApplicationPayment"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Application paid + approved", "ApplicationPaymentApproval"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Invited and accepted", "InvitationAcceptance"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Invited and paid", "InvitationPayment"));
+ this.DropParticipationEntry.Items.Add (new ListItem ("Manual add only", "Manual"));
this.DropMembersWhere.Items.Clear();
this.DropMembersWhere.Items.Add (new ListItem ("Root organization only", "Root"));
@@ -80,13 +81,12 @@ namespace Swarmops.Frontend.Pages.Admin
this.DropMembersWhere.Items.Add (new ListItem ("Root and most local org", "RootLocal"));
this.DropMembersWhere.Items.Add (new ListItem ("All applicable organizations", "All"));
- this.DropMembershipDuration.Items.Clear();
- this.DropMembershipDuration.Items.Add (new ListItem ("One month", "OneMonth"));
- this.DropMembershipDuration.Items.Add (new ListItem ("One year", "OneYear"));
- this.DropMembershipDuration.Items.Add (new ListItem ("Two years", "TwoYears"));
- this.DropMembershipDuration.Items.Add (new ListItem ("Five years", "FiveYears"));
- this.DropMembershipDuration.Items.Add (new ListItem ("Forever", "Forever"));
- this.DropMembershipDuration.SelectedValue = "Year";
+ this.DropParticipationDuration.Items.Clear();
+ this.DropParticipationDuration.Items.Add (new ListItem ("One month", "1"));
+ this.DropParticipationDuration.Items.Add (new ListItem ("One year", "12"));
+ this.DropParticipationDuration.Items.Add (new ListItem ("Two years", "24"));
+ this.DropParticipationDuration.Items.Add (new ListItem ("Five years", "60"));
+ this.DropParticipationDuration.Items.Add (new ListItem ("Forever", "1440"));
this.DropMembersChurn.Items.Clear();
this.DropMembersChurn.Items.Add (new ListItem ("Expiry date reached", "Expiry"));
@@ -123,6 +123,9 @@ namespace Swarmops.Frontend.Pages.Admin
public static InitialOrgData GetInitialData()
{
InitialOrgData result = new InitialOrgData();
+ InitialDataSwitches switches = new InitialDataSwitches();
+ InitialMessages messages = new InitialMessages();
+ InitialParticipationData participation = new InitialParticipationData();
AuthenticationData authData = GetAuthenticationDataAndCulture();
Organization org = authData.CurrentOrganization;
@@ -131,19 +134,31 @@ namespace Swarmops.Frontend.Pages.Admin
return result; // just... don't
}
- result.AccountBitcoinCold = (org.FinancialAccounts.AssetsBitcoinCold != null &&
+ switches.AccountBitcoinCold = (org.FinancialAccounts.AssetsBitcoinCold != null &&
org.FinancialAccounts.AssetsBitcoinCold.Active);
- result.AccountBitcoinHot = (org.FinancialAccounts.AssetsBitcoinHot != null &&
+ switches.AccountBitcoinHot = (org.FinancialAccounts.AssetsBitcoinHot != null &&
org.FinancialAccounts.AssetsBitcoinHot.Active);
- result.AccountPaypal = (org.FinancialAccounts.AssetsPaypal != null &&
+ switches.AccountPaypal = (org.FinancialAccounts.AssetsPaypal != null &&
org.FinancialAccounts.AssetsPaypal.Active);
- result.AccountsForex = (org.FinancialAccounts.IncomeCurrencyFluctuations != null &&
+ switches.AccountsForex = (org.FinancialAccounts.IncomeCurrencyFluctuations != null &&
org.FinancialAccounts.IncomeCurrencyFluctuations.Active);
- result.AccountsVat = (org.FinancialAccounts.AssetsVatInbound != null &&
+ switches.AccountsVat = (org.FinancialAccounts.AssetsVatInbound != null &&
org.FinancialAccounts.AssetsVatInbound.Active);
- result.VatReportFrequency = org.VatReportFrequencyMonths;
- result.ParticipantFinancials = org.ParticipantFinancialsEnabled;
- result.PaypalAccountAddress = org.PaypalAccountMailAddress;
+ switches.VatReportFrequency = org.VatReportFrequencyMonths;
+ switches.ParticipantFinancials = org.ParticipantFinancialsEnabled;
+ switches.PaypalAccountAddress = org.PaypalAccountMailAddress;
+
+ participation.ApplicationQualifyingScore = org.Parameters.ApplicationQualifyingScore;
+ participation.AskParticipantStreet = org.Parameters.AskParticipantStreet;
+ participation.Duration = org.Parameters.ParticipationDuration;
+ participation.Entry = org.Parameters.ParticipationEntry;
+
+ messages.ApplicationCompleteMail = org.Parameters.ApplicationCompleteMail;
+ messages.ParticipationAcceptedMail = org.Parameters.ParticipationAcceptedMail;
+ messages.SidebarOrgInfo = org.Parameters.SidebarOrgInfo;
+ messages.SignupFirstPage = org.Parameters.SignupFirstPage;
+ messages.SignupLastPage = org.Parameters.SignupLastPage;
+
result.GovernmentRegistrationId = org.GovernmentRegistrationId;
result.TaxAuthority = org.TaxAuthority;
@@ -154,10 +169,15 @@ namespace Swarmops.Frontend.Pages.Admin
// TODO: Add all the other fields
+ result.Switches = switches;
+ result.Messages = messages;
+ result.Participation = participation;
+
return result;
}
+
[WebMethod]
public static AjaxInputCallResult SwitchToggled (string cookie, bool newValue)
{
@@ -349,6 +369,9 @@ namespace Swarmops.Frontend.Pages.Admin
case "ParticipantFinancials":
authData.CurrentOrganization.ParticipantFinancialsEnabled = newValue;
break;
+ case "AskPartipantStreet":
+ authData.CurrentOrganization.Parameters.AskParticipantStreet = newValue;
+ break;
default:
throw new NotImplementedException();
}
@@ -486,6 +509,48 @@ namespace Swarmops.Frontend.Pages.Admin
authenticationData.CurrentOrganization.VatReportFrequencyMonths = Int32.Parse(newValue);
break;
+ case "ParticipationEntry":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.ParticipationEntry = newValue;
+ break;
+
+ case "ParticipationDuration":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.ParticipationDuration = newValue;
+ break;
+
+ case "SidebarOrgInfo":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.SidebarOrgInfo = newValue;
+ break;
+
+ case "SignupFirstPage":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.SignupFirstPage = newValue;
+ break;
+
+ case "SignupLastPage":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.SignupLastPage = newValue;
+ break;
+
+ case "ApplicationCompleteMail":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.ApplicationCompleteMail = newValue;
+ break;
+
+ case "ParticipationAcceptedMail":
+ result.Success = true;
+ authenticationData.CurrentOrganization.Parameters.ParticipationAcceptedMail = newValue;
+ break;
+
+ case "ApplicationQualifyingScore":
+ int qualifyingScore = Int32.Parse(newValue, NumberStyles.Number);
+ authenticationData.CurrentOrganization.Parameters.ApplicationQualifyingScore = qualifyingScore;
+ result.NewValue = qualifyingScore.ToString("N2");
+ result.Success = true; // this comes last in this section, because parsing int may fail
+ break;
+
default:
throw new NotImplementedException("Unknown cookie in StoreCallback");
}
@@ -505,14 +570,11 @@ namespace Swarmops.Frontend.Pages.Admin
public class InitialOrgData
{
- public bool AccountBitcoinCold;
- public bool AccountBitcoinHot;
- public bool AccountPaypal;
- public bool AccountsForex;
- public bool AccountsVat;
- public int VatReportFrequency;
- public bool ParticipantFinancials;
- public string PaypalAccountAddress;
+ public InitialDataSwitches Switches { get; set; }
+ public InitialMessages Messages { get; set; }
+ public InitialParticipationData Participation { get; set; }
+
+ // TODO: Move these lower ones to classes of their own, too
public string GovernmentRegistrationId;
public string TaxAuthority;
@@ -521,5 +583,34 @@ namespace Swarmops.Frontend.Pages.Admin
public string OpenLedgersDomain;
public string VanityDomain;
}
+
+ public class InitialDataSwitches
+ {
+ public bool AccountBitcoinCold { get; set; }
+ public bool AccountBitcoinHot { get; set; }
+ public bool AccountPaypal { get; set; }
+ public bool AccountsForex { get; set; }
+ public bool AccountsVat { get; set; }
+ public int VatReportFrequency { get; set; }
+ public bool ParticipantFinancials { get; set; }
+ public string PaypalAccountAddress { get; set; }
+ }
+
+ public class InitialParticipationData
+ {
+ public string Entry { get; set; }
+ public string Duration { get; set; }
+ public int ApplicationQualifyingScore { get; set; }
+ public bool AskParticipantStreet { get; set; }
+ }
+
+ public class InitialMessages
+ {
+ public string SidebarOrgInfo { get; set; }
+ public string SignupFirstPage { get; set; }
+ public string SignupLastPage { get; set; }
+ public string ApplicationCompleteMail { get; set; }
+ public string ParticipationAcceptedMail { get; set; }
+ }
}
}
\ No newline at end of file
diff --git a/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs b/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs
index 0723b536..fb2e80fa 100644
--- a/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs
+++ b/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs
@@ -94,13 +94,22 @@ namespace Swarmops.Frontend.Pages.Admin {
protected global::Swarmops.Frontend.Controls.Base.AjaxToggleSlider ToggleOpenFinancials;
///
- /// DropMembersWhen control.
+ /// DropParticipationEntry control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::Swarmops.Frontend.Controls.Base.DropDown DropMembersWhen;
+ protected global::Swarmops.Frontend.Controls.Base.AjaxDropDown DropParticipationEntry;
+
+ ///
+ /// TextApplicationScoreQualify control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextApplicationScoreQualify;
///
/// DropMembersWhere control.
@@ -112,13 +121,13 @@ namespace Swarmops.Frontend.Pages.Admin {
protected global::Swarmops.Frontend.Controls.Base.DropDown DropMembersWhere;
///
- /// DropMembershipDuration control.
+ /// DropParticipationDuration control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::Swarmops.Frontend.Controls.Base.DropDown DropMembershipDuration;
+ protected global::Swarmops.Frontend.Controls.Base.AjaxDropDown DropParticipationDuration;
///
/// DropMembersChurn control.
@@ -183,6 +192,15 @@ namespace Swarmops.Frontend.Pages.Admin {
///
protected global::Swarmops.Frontend.Controls.Base.DropDown DropMemberNumber;
+ ///
+ /// ToggleAskStreet control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxToggleSlider ToggleAskStreet;
+
///
/// LabelParticipationEntry control.
///
@@ -273,6 +291,51 @@ namespace Swarmops.Frontend.Pages.Admin {
///
protected global::System.Web.UI.WebControls.Label LabelMemberNumber;
+ ///
+ /// TextShortOrgInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextShortOrgInfo;
+
+ ///
+ /// TextSignupFirstPage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextSignupFirstPage;
+
+ ///
+ /// TextSignupLastPage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextSignupLastPage;
+
+ ///
+ /// TextApplicationCompleteMail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextApplicationCompleteMail;
+
+ ///
+ /// TextParticipationAcceptedMail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Swarmops.Frontend.Controls.Base.AjaxTextBox TextParticipationAcceptedMail;
+
///
/// UploadLogoLandscape control.
///
diff --git a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs
index b1a147e1..9b7d8da2 100644
--- a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs
+++ b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs
@@ -94,7 +94,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
if (documents.Count > 0)
{
- element += String.Format(",\"dox\":\"" + hasDoxString + "\"", transaction.Identity, documents[0].Identity, CurrentOrganization.Name + " - " + report.Description + " - " + Resources.Global.Financial_TransactionIdShort + " " + transaction.OrganizationSequenceId.ToString("N0"));
+ element += String.Format(",\"dox\":\"" + hasDoxString + "\"", transaction.Identity, documents[0].Identity, CurrentOrganization.Name + " - " + report.Description + " - " + Resources.Global.Financial_TransactionIdShort + transaction.OrganizationSequenceId.ToString("N0"));
}
if (include)
diff --git a/Site/web.config b/Site/web.config
index 5a8fb320..d462cf60 100644
--- a/Site/web.config
+++ b/Site/web.config
@@ -34,6 +34,7 @@
+