diff --git a/Basic/Enums/OrganizationFinancialAccountType.cs b/Basic/Enums/OrganizationFinancialAccountType.cs index e63eefd2..260edce1 100644 --- a/Basic/Enums/OrganizationFinancialAccountType.cs +++ b/Basic/Enums/OrganizationFinancialAccountType.cs @@ -33,7 +33,7 @@ /// /// Value Added Tax (inbound) that hasn't been declared yet and put on overall tax balance /// - AssetsVat, + AssetsVatInbound, /// /// If virtual banking is enabled, this is where the virtual assets go /// @@ -61,7 +61,7 @@ /// /// Undeclared Value Added Tax (outbound) before putting it on tax balance /// - DebtsVat, + DebtsVatOutbound, /// /// If virtual banking is enabled, this is the central debt to local assets /// diff --git a/Console/Console.cs b/Console/Console.cs index 5f674350..de83cce8 100644 --- a/Console/Console.cs +++ b/Console/Console.cs @@ -534,7 +534,7 @@ namespace Swarmops //PirateWeb.Utility.Special.Sweden.SupportDatabase.CloseDelayWarnings(); - NewsletterChecker.Run(); + // NewsletterChecker.Run(); } @@ -1155,7 +1155,7 @@ namespace Swarmops private static void RunForumCheck() { - SwedishForumMemberCheck.Run(); + // SwedishForumMemberCheck.Run(); } private static void RunRepaidTest() diff --git a/Console/Console.csproj b/Console/Console.csproj index 7d25bf6b..b65b9fd6 100644 --- a/Console/Console.csproj +++ b/Console/Console.csproj @@ -17,7 +17,7 @@ 3.5 - v4.0 + v4.5 @@ -59,7 +59,6 @@ - diff --git a/Console/app.config b/Console/app.config index cb2586be..b7a7ef16 100644 --- a/Console/app.config +++ b/Console/app.config @@ -1,3 +1,3 @@ - + diff --git a/External Dependencies/rebuild-all.cmd b/External Dependencies/rebuild-all.cmd index 8b63bb3e..88f007a8 100644 --- a/External Dependencies/rebuild-all.cmd +++ b/External Dependencies/rebuild-all.cmd @@ -5,7 +5,7 @@ git submodule update git submodule foreach git checkout master git submodule foreach git pull -msbuild /p:Configuration=Release;TargetFrameworkVersion=v4.5 /t:Clean;Build NBitcoin\NBitcoin\NBitcoin.csproj +C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;TargetFrameworkVersion=v4.5 /t:Clean;Build NBitcoin\NBitcoin\NBitcoin.csproj if exist bin erase /s /q bin > nul if not exist bin mkdir bin diff --git a/Logic/Financial/Currency.cs b/Logic/Financial/Currency.cs index 1d4a771b..6141f778 100644 --- a/Logic/Financial/Currency.cs +++ b/Logic/Financial/Currency.cs @@ -1,3 +1,4 @@ +using System; using Swarmops.Basic.Types; using Swarmops.Database; @@ -37,5 +38,18 @@ namespace Swarmops.Logic.Financial return FromIdentityAggressive( SwarmDb.GetDatabaseForWriting().CreateCurrency(code, name, sign)); } + + public string DisplayCode + { + get + { + if (base.Code == "BTC") + { + return "µBTC"; + } + + return base.Code; + } + } } } diff --git a/Logic/Financial/FinancialAccount.cs b/Logic/Financial/FinancialAccount.cs index 152a38d1..a77ab66c 100644 --- a/Logic/Financial/FinancialAccount.cs +++ b/Logic/Financial/FinancialAccount.cs @@ -103,7 +103,13 @@ namespace Swarmops.Logic.Financial SwarmDb.GetDatabaseForWriting().SetFinancialAccountBudgetMonthly(this.Identity, year, month, amountCents); } - public static FinancialAccount Create (int organizationId, string name, FinancialAccountType accountType, int parentFinancialAccountId) + public static FinancialAccount Create(Organization organization, string newAccountName, + FinancialAccountType accountType, FinancialAccount parentAccount) + { + return Create(organization.Identity, newAccountName, accountType, parentAccount == null? 0: parentAccount.Identity); + } + + protected static FinancialAccount Create (int organizationId, string name, FinancialAccountType accountType, int parentFinancialAccountId) { int accountId = SwarmDb.GetDatabaseForWriting().CreateFinancialAccount(organizationId, name, accountType, parentFinancialAccountId); return FromIdentityAggressive(accountId); diff --git a/Logic/Financial/OrganizationFinancialAccounts.cs b/Logic/Financial/OrganizationFinancialAccounts.cs index 121d4974..971e623c 100644 --- a/Logic/Financial/OrganizationFinancialAccounts.cs +++ b/Logic/Financial/OrganizationFinancialAccounts.cs @@ -97,6 +97,18 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.AssetsBankAccountMain]; } } + public FinancialAccount AssetsBitcoinCold + { + get { return this[OrganizationFinancialAccountType.AssetsBitcoinCold]; } + set { this[OrganizationFinancialAccountType.AssetsBitcoinCold] = value; } + } + + public FinancialAccount AssetsBitcoinHot + { + get { return this[OrganizationFinancialAccountType.AssetsBitcoinHot]; } + set { this[OrganizationFinancialAccountType.AssetsBitcoinHot] = value; } + } + public FinancialAccount AssetsOutboundInvoices { get { return this[OrganizationFinancialAccountType.AssetsOutboundInvoices]; } @@ -110,11 +122,13 @@ namespace Swarmops.Logic.Financial public FinancialAccount AssetsPaypal { get { return this[OrganizationFinancialAccountType.AssetsPaypal]; } + set { this[OrganizationFinancialAccountType.AssetsPaypal] = value; } } - public FinancialAccount AssetsVat + public FinancialAccount AssetsVatInbound { - get { return this[OrganizationFinancialAccountType.AssetsVat]; } + get { return this[OrganizationFinancialAccountType.AssetsVatInbound]; } + set { this[OrganizationFinancialAccountType.AssetsVatInbound] = value; } } public FinancialAccount CostsBankFees @@ -127,6 +141,12 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.CostsAllocatedFunds]; } } + public FinancialAccount CostsCurrencyFluctuations + { + get { return this[OrganizationFinancialAccountType.CostsCurrencyFluctuations]; } + set { this[OrganizationFinancialAccountType.CostsCurrencyFluctuations] = value; } + } + public FinancialAccount CostsInfrastructure { get { return this[OrganizationFinancialAccountType.CostsInfrastructure]; } @@ -167,9 +187,10 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.DebtsTax]; } } - public FinancialAccount DebtsVat + public FinancialAccount DebtsVatOutbound { - get { return this[OrganizationFinancialAccountType.DebtsVat]; } + get { return this[OrganizationFinancialAccountType.DebtsVatOutbound]; } + set { this[OrganizationFinancialAccountType.DebtsVatOutbound] = value; } } public FinancialAccount DebtsEarmarkedVirtualBanking @@ -187,6 +208,12 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.DebtsSalary]; } } + public FinancialAccount IncomeCurrencyFluctuations + { + get { return this[OrganizationFinancialAccountType.IncomeCurrencyFluctuations]; } + set { this[OrganizationFinancialAccountType.IncomeCurrencyFluctuations] = value; } + } + public FinancialAccount IncomeDonations { get { return this[OrganizationFinancialAccountType.IncomeDonations]; } @@ -197,7 +224,7 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.IncomeSales]; } } - public FinancialAccount ConstsMiscalculations + public FinancialAccount CostsMiscalculations { get { return this[OrganizationFinancialAccountType.CostsMiscalculations]; } } diff --git a/Logic/Structure/Organization.cs b/Logic/Structure/Organization.cs index 1e888e36..1d0c225e 100644 --- a/Logic/Structure/Organization.cs +++ b/Logic/Structure/Organization.cs @@ -214,60 +214,60 @@ namespace Swarmops.Logic.Structure // TODO: Set names according to org default culture FinancialAccounts[OrganizationFinancialAccountType.AssetsBankAccountMain] = - FinancialAccount.Create(this.Identity, "Bank Account", FinancialAccountType.Asset, 0); + FinancialAccount.Create(this, "Bank Account", FinancialAccountType.Asset, null); FinancialAccounts[OrganizationFinancialAccountType.AssetsOutboundInvoices] = - FinancialAccount.Create(this.Identity, "Outbound Invoices", FinancialAccountType.Asset, 0); + FinancialAccount.Create(this, "Outbound Invoices", FinancialAccountType.Asset, null); FinancialAccounts[OrganizationFinancialAccountType.AssetsOutstandingCashAdvances] = - FinancialAccount.Create(this.Identity, "Cash Advances", FinancialAccountType.Asset, 0); + FinancialAccount.Create(this, "Cash Advances", FinancialAccountType.Asset, null); //FinancialAccounts[OrganizationFinancialAccountType.AssetsPaypal] = - // FinancialAccount.Create(this.Identity, "Paypal Account", FinancialAccountType.Asset, 0); + // FinancialAccount.Create(this, "Paypal Account", FinancialAccountType.Asset, null); //FinancialAccounts[OrganizationFinancialAccountType.AssetsBitcoinHot] = - // FinancialAccount.Create(this.Identity, "Bitcoin Holdings (Hot)", FinancialAccountType.Asset, 0); + // FinancialAccount.Create(this, "Bitcoin Holdings (Hot)", FinancialAccountType.Asset, null); //FinancialAccounts[OrganizationFinancialAccountType.AssetsBitcoinCold] = - // FinancialAccount.Create(this.Identity, "Bitcoin Cold Storage", FinancialAccountType.Asset, 0); - FinancialAccounts[OrganizationFinancialAccountType.AssetsVat] = - FinancialAccount.Create(this.Identity, "Inbound Value Added Tax", FinancialAccountType.Asset, 0); + // FinancialAccount.Create(this, "Bitcoin Cold Storage", FinancialAccountType.Asset, null); + //FinancialAccounts[OrganizationFinancialAccountType.AssetsVatInbound] = + // FinancialAccount.Create(this, "Inbound Value Added Tax", FinancialAccountType.Asset, null); FinancialAccounts[OrganizationFinancialAccountType.CostsAllocatedFunds] = - FinancialAccount.Create(this.Identity, "Allocated funds", FinancialAccountType.Cost, 0); + FinancialAccount.Create(this, "Allocated funds", FinancialAccountType.Cost, null); FinancialAccounts[OrganizationFinancialAccountType.CostsBankFees] = - FinancialAccount.Create(this.Identity, "Bank Fees", FinancialAccountType.Cost, 0); + FinancialAccount.Create(this, "Bank Fees", FinancialAccountType.Cost, null); FinancialAccounts[OrganizationFinancialAccountType.CostsInfrastructure] = - FinancialAccount.Create(this.Identity, "ICT and Infrastructure", FinancialAccountType.Cost, 0); + FinancialAccount.Create(this, "ICT and Infrastructure", FinancialAccountType.Cost, null); FinancialAccounts[OrganizationFinancialAccountType.CostsYearlyResult] = - FinancialAccount.Create(this.Identity, "Yearly result", FinancialAccountType.Cost, 0); + FinancialAccount.Create(this, "Yearly result", FinancialAccountType.Cost, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsEquity] = - FinancialAccount.Create(this.Identity, "Equity", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "Equity", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsExpenseClaims] = - FinancialAccount.Create(this.Identity, "Expense Claims", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "Expense Claims", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsInboundInvoices] = - FinancialAccount.Create(this.Identity, "Inbound Invoices", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "Inbound Invoices", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsOther] = - FinancialAccount.Create(this.Identity, "General Debt", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "General Debt", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsSalary] = - FinancialAccount.Create(this.Identity, "Salaries Due", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "Salaries Due", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.DebtsTax] = - FinancialAccount.Create(this.Identity, "Taxes Due", FinancialAccountType.Debt, 0); - FinancialAccounts[OrganizationFinancialAccountType.DebtsVat] = - FinancialAccount.Create(this.Identity, "Outbound Value Added Tax", FinancialAccountType.Debt, 0); + FinancialAccount.Create(this, "Taxes Due", FinancialAccountType.Debt, null); + //FinancialAccounts[OrganizationFinancialAccountType.DebtsVatOutbound] = + // FinancialAccount.Create(this, "Outbound Value Added Tax", FinancialAccountType.Debt, null); FinancialAccounts[OrganizationFinancialAccountType.IncomeDonations] = - FinancialAccount.Create(this.Identity, "Donations", FinancialAccountType.Income, 0); + FinancialAccount.Create(this, "Donations", FinancialAccountType.Income, null); FinancialAccounts[OrganizationFinancialAccountType.IncomeSales] = - FinancialAccount.Create(this.Identity, "Sales", FinancialAccountType.Income, 0); + FinancialAccount.Create(this, "Sales", FinancialAccountType.Income, null); // Then, create various cost accounts that are probably needed, or that could be used as a starting point - FinancialAccount.Create(this.Identity, "Offices", FinancialAccountType.Cost, 0); - FinancialAccount.Create(this.Identity, "Unforeseen", FinancialAccountType.Cost, 0); - FinancialAccount.Create(this.Identity, "Staff", FinancialAccountType.Cost, 0); - FinancialAccount.Create(this.Identity, "Marketing and Campaigns", FinancialAccountType.Cost, 0); - FinancialAccount.Create(this.Identity, "Research and Development", FinancialAccountType.Cost, 0); + FinancialAccount.Create(this, "Offices", FinancialAccountType.Cost, null); + FinancialAccount.Create(this, "Unforeseen", FinancialAccountType.Cost, null); + FinancialAccount.Create(this, "Staff", FinancialAccountType.Cost, null); + FinancialAccount.Create(this, "Marketing and Campaigns", FinancialAccountType.Cost, null); + FinancialAccount.Create(this, "Research and Development", FinancialAccountType.Cost, null); // Finally, create the first conference parent - FinancialAccount conferenceBase = FinancialAccount.Create(this.Identity, "Conferences", - FinancialAccountType.Cost, 0); + FinancialAccount conferenceBase = FinancialAccount.Create(this, "Conferences", + FinancialAccountType.Cost, null); conferenceBase.IsConferenceParent = true; // Set the currency diff --git a/Logic/Swarm/Parley.cs b/Logic/Swarm/Parley.cs index a17c6c4c..78ba09e8 100644 --- a/Logic/Swarm/Parley.cs +++ b/Logic/Swarm/Parley.cs @@ -139,10 +139,10 @@ namespace Swarmops.Logic.Swarm if (base.BudgetId < 0) // no account created yet { - ourBudget = FinancialAccount.Create(this.Budget.OrganizationId, + ourBudget = FinancialAccount.Create(this.Budget.Organization, "Conf: " + this.Name, FinancialAccountType.Cost, - this.BudgetId); + this.Budget); parentBudget = this.Budget; diff --git a/Site5/App_Code/CommonV5.cs b/Site5/App_Code/CommonV5.cs new file mode 100644 index 00000000..2c4e8854 --- /dev/null +++ b/Site5/App_Code/CommonV5.cs @@ -0,0 +1,377 @@ +using System; +using System.Drawing; +using System.Globalization; +using System.Threading; +using System.Web; +using Swarmops.Logic.Structure; +using Swarmops.Logic.Support; +using Swarmops.Logic.Swarm; + +/// +/// Summary description for CommonV5 +/// +public class CommonV5 +{ + public CommonV5() + { + // + // TODO: Add constructor logic here + // + } + + public static void CulturePreInit(HttpRequest request) + { + // Localization + // Set default culture (English, United States) + + string preferredCulture = "en-US"; + + // ----------- SET CULTURE ------------ + + // Does the user have a culture preference? + + if (request.Cookies["PreferredCulture"] != null) + { + // Yes, set it + preferredCulture = request.Cookies["PreferredCulture"].Value; + } + else + { + // No, determine from browser + string browserPreference = "en-US"; + if (request.UserLanguages != null && request.UserLanguages.Length > 0) + { + browserPreference = request.UserLanguages[0]; + preferredCulture = browserPreference; + } + + /* + string[] languages = (string[])Application["Cultures"]; + for (int index = 0; index < languages.Length; index++) + { + if (languages[index].StartsWith(browserPreference)) + { + preferredCulture = languages[index]; + } + }*/ + } + + try + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(preferredCulture); + } + catch (Exception) // if we can't set the culture, what do we do? ("We send the Marines.") + { + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + // throw new Exception("Could not set culture \"" + preferredCulture + "\"", exception); + // Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + } + + Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; + } + + public static AuthenticationData GetAuthenticationDataAndCulture(HttpContext suppliedContext) + { + // This function is called from static page methods in AJAX calls to get + // the current set of authentication data. Static page methods cannot access + // the instance data of PageV5Base. + + AuthenticationData result = new AuthenticationData(); + + // Find various credentials + + string identity = suppliedContext.User.Identity.Name; + + // TODO: If identity is null or empty, set null user + org + + string[] identityTokens = identity.Split(','); + + string userIdentityString = identityTokens[0]; + string organizationIdentityString = identityTokens[1]; + + int currentUserId = Convert.ToInt32(userIdentityString); + int currentOrganizationId = Convert.ToInt32(organizationIdentityString); + + result.CurrentUser = Person.FromIdentity(currentUserId); + try + { + result.CurrentOrganization = Organization.FromIdentity(currentOrganizationId); + } + catch (ArgumentException) + { + if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox)) + { + // It's possible this organization was deleted. Log on to Sandbox instead. + result.CurrentOrganization = Organization.Sandbox; + } + } + + CommonV5.CulturePreInit(HttpContext.Current.Request); + // OnPreInit() isn't called in the static methods calling this fn + + /* + string userCultureString = result.CurrentUser.PreferredCulture; + + if (!string.IsNullOrEmpty(userCultureString)) + { + CultureInfo userCulture = new CultureInfo(userCultureString); // may throw on invalid database data + Thread.CurrentThread.CurrentCulture = userCulture; + Thread.CurrentThread.CurrentUICulture = userCulture; + }*/ + + return result; + } + + + + +/* COLOR SCHEME + + #A2BEFF #476EC7 #1C397E #C8D9FF #E4ECFF -- blue (hue 240) + #FFBC37 #C78B15 #7F5500 #FFD580 #FFEDC8 -- orange (hue 60) + + base dark xdark light xlight + + S36L100 S64-L78 S78-L49 S22B100 S11L100 -- blue (hue 222) + S78L100 S89-L78 S100L50 S50L100 S22L100 -- orange (hue 40) + */ + + + + + public static string GetColor(ColorType type, ColorVariant variant, ColorShift shift = ColorShift.None) + { + int hue = (type == ColorType.Base ? 222 : 40); + int saturation = 0; + int luminosity = 0; + + switch (variant) + { + case ColorVariant.Base: + saturation = 100; + luminosity = 80; + break; + case ColorVariant.Dark: + saturation = 50; + luminosity = 50; + break; + case ColorVariant.XDark: + saturation = 65; + luminosity = 30; + break; + case ColorVariant.Light: + saturation = 100; + luminosity = 90; + break; + case ColorVariant.XLight: + saturation = 100; + luminosity = 95; + break; + default: + throw new NotImplementedException(); + + } + + if (type == ColorType.Accent) + { + saturation *= 2; + if (saturation > 100) + { + saturation = 100; + } + } + + switch (shift) + { + case ColorShift.SlightlyDarker: + luminosity -= 2; + break; + case ColorShift.SlightlyLighter: + luminosity += 2; + break; + default: + // do nothing + break; + } + + Color color = ColorFromAhsb(100, hue, saturation / 100.0, luminosity / 100.0); + return String.Format("#{0:x2}{1:x2}{2:x2}", color.R, color.G, color.B); + } + + + public static Color ColorFromAhsb(int a, double h, double s, double b) + { + if (s < 0.001) + { + return Color.FromArgb(a, Convert.ToInt32(b * 255), + Convert.ToInt32(b * 255), Convert.ToInt32(b * 255)); + } + + double fMax, fMid, fMin; + int iSextant, iMax, iMid, iMin; + + if (0.5 < b) + { + fMax = b - (b * s) + s; + fMin = b + (b * s) - s; + } + else + { + fMax = b + (b * s); + fMin = b - (b * s); + } + + iSextant = (int)Math.Floor(h / 60f); + if (300f <= h) + { + h -= 360f; + } + h /= 60f; + h -= 2f * (float)Math.Floor(((iSextant + 1f) % 6f) / 2f); + if (0 == iSextant % 2) + { + fMid = h * (fMax - fMin) + fMin; + } + else + { + fMid = fMin - h * (fMax - fMin); + } + + iMax = Convert.ToInt32(fMax * 255); + iMid = Convert.ToInt32(fMid * 255); + iMin = Convert.ToInt32(fMin * 255); + + switch (iSextant) + { + case 1: + return Color.FromArgb(a, iMid, iMax, iMin); + case 2: + return Color.FromArgb(a, iMin, iMax, iMid); + case 3: + return Color.FromArgb(a, iMin, iMid, iMax); + case 4: + return Color.FromArgb(a, iMid, iMin, iMax); + case 5: + return Color.FromArgb(a, iMax, iMin, iMid); + default: + return Color.FromArgb(a, iMax, iMid, iMin); + } + } + + + + + + protected static string HslToWebColor(int hue, int saturation, int luminosity) // 0-359, 0-100, 0-100 + { + // This code is adapted from Wikipedia. Believed to be in the public domain or at the very least + // completely unencumbered. + + double h = hue/360.0; + double s = saturation/100.0; + double l = luminosity/100.0; + + double r, g, b; + + if (s < 0.0001) // zero + { + r = g = b = l; // achromatic + } + else + { + double q = l < 0.5 ? l*(1 + s) : l + s - l*s; + double p = 2*l - q; + r = Hue2Rgb(p, q, h + 1/3); + g = Hue2Rgb(p, q, h); + b = Hue2Rgb(p, q, h - 1/3); + } + + return String.Format("#{0:x2}{1:x2}{2:x2}", (int) (r*255), (int) (g*255), (int) (b*255)); + + } + + + private static double Hue2Rgb(double p, double q, double t) + { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1/6) return p + (q - p)*6*t; + if (t < 1/2) return q; + if (t < 2/3) return p + (q - p)*(2/3 - t)*6; + return p; + } +} + + + +public enum ColorType + { + Unkown = 0, + Base, + Accent + } + + public enum ColorVariant + { + Unknown = 0, + Base, + Light, + XLight, + Dark, + XDark + } + + public enum ColorShift + { + Unknown = 0, + None, + SlightlyLighter, + SlightlyDarker + } + + + +[Flags] +// ReSharper disable once InconsistentNaming +public enum EasyUIControl +{ + Unknown = 0, + Accordion = 0x0000001, + Calendar = 0x0000002, + Combo = 0x0000004, + ComboBox = 0x0000008, + DataGrid = 0x0000010, + DateBox = 0x0000020, + Dialog = 0x0000040, + FileBox = 0x0000080, + Layout = 0x0000100, + LinkButton = 0x0000200, + Menu = 0x0000400, + MenuButton = 0x0000800, + Messager = 0x0001000, + NumberBox = 0x0002000, + Pagination = 0x0004000, + Panel = 0x0008000, + ProgressBar = 0x0010000, + PropertyGrid = 0x0020000, + SearchBox = 0x0040000, + Slider = 0x0080000, + Spinner = 0x0100000, + SplitButton = 0x0200000, + Tabs = 0x0400000, + TextBox = 0x0800000, + ToolTip = 0x1000000, + Tree = 0x2000000, + ValidateBox = 0x4000000, + Window = 0x8000000 +}; + + +[Flags] +public enum IncludedControl +{ + Unknown = 0, + FileUpload = 0x00000001, + SwitchButton = 0x00000002, + JsonParameters = 0x00000004 +}; \ No newline at end of file diff --git a/Site5/App_Code/CommonV5Base.cs b/Site5/App_Code/CommonV5Base.cs deleted file mode 100644 index d5d1d05a..00000000 --- a/Site5/App_Code/CommonV5Base.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Globalization; -using System.Threading; -using System.Web; -using Swarmops.Logic.Structure; -using Swarmops.Logic.Swarm; - -/// -/// Summary description for CommonV5Base -/// -public class CommonV5Base -{ - public CommonV5Base() - { - // - // TODO: Add constructor logic here - // - } - - static public void CulturePreInit (HttpRequest request) - { - // Localization - // Set default culture (English, United States) - - string preferredCulture = "en-US"; - - // ----------- SET CULTURE ------------ - - // Does the user have a culture preference? - - if (request.Cookies["PreferredCulture"] != null) - { - // Yes, set it - preferredCulture = request.Cookies["PreferredCulture"].Value; - } - else - { - // No, determine from browser - string browserPreference = "en-US"; - if (request.UserLanguages != null && request.UserLanguages.Length > 0) - { - browserPreference = request.UserLanguages[0]; - preferredCulture = browserPreference; - } - - /* - string[] languages = (string[])Application["Cultures"]; - for (int index = 0; index < languages.Length; index++) - { - if (languages[index].StartsWith(browserPreference)) - { - preferredCulture = languages[index]; - } - }*/ - } - - try - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(preferredCulture); - } - catch (Exception) // if we can't set the culture, what do we do? ("We send the Marines.") - { - Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - // throw new Exception("Could not set culture \"" + preferredCulture + "\"", exception); - // Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - } - - Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; - } - - public static AuthenticationData GetAuthenticationDataAndCulture(HttpContext suppliedContext) - { - // This function is called from static page methods in AJAX calls to get - // the current set of authentication data. Static page methods cannot access - // the instance data of PageV5Base. - - AuthenticationData result = new AuthenticationData(); - - // Find various credentials - - string identity = suppliedContext.User.Identity.Name; - - // TODO: If identity is null or empty, set null user + org - - string[] identityTokens = identity.Split(','); - - string userIdentityString = identityTokens[0]; - string organizationIdentityString = identityTokens[1]; - - int currentUserId = Convert.ToInt32(userIdentityString); - int currentOrganizationId = Convert.ToInt32(organizationIdentityString); - - result.CurrentUser = Person.FromIdentity(currentUserId); - result.CurrentOrganization = Organization.FromIdentity(currentOrganizationId); - - CommonV5Base.CulturePreInit(HttpContext.Current.Request); // OnPreInit() isn't called in the static methods calling this fn - - /* - string userCultureString = result.CurrentUser.PreferredCulture; - - if (!string.IsNullOrEmpty(userCultureString)) - { - CultureInfo userCulture = new CultureInfo(userCultureString); // may throw on invalid database data - Thread.CurrentThread.CurrentCulture = userCulture; - Thread.CurrentThread.CurrentUICulture = userCulture; - }*/ - - return result; - } - -} - -[Flags] -// ReSharper disable once InconsistentNaming -public enum EasyUIControl -{ - Unknown = 0, - Accordion = 0x0000001, - Calendar = 0x0000002, - Combo = 0x0000004, - ComboBox = 0x0000008, - DataGrid = 0x0000010, - DateBox = 0x0000020, - Dialog = 0x0000040, - FileBox = 0x0000080, - Layout = 0x0000100, - LinkButton = 0x0000200, - Menu = 0x0000400, - MenuButton = 0x0000800, - Messager = 0x0001000, - NumberBox = 0x0002000, - Pagination = 0x0004000, - Panel = 0x0008000, - ProgressBar = 0x0010000, - PropertyGrid = 0x0020000, - SearchBox = 0x0040000, - Slider = 0x0080000, - Spinner = 0x0100000, - SplitButton = 0x0200000, - Tabs = 0x0400000, - TextBox = 0x0800000, - ToolTip = 0x1000000, - Tree = 0x2000000, - ValidateBox = 0x4000000, - Window = 0x8000000 -}; diff --git a/Site5/App_Code/ControlV5Base.cs b/Site5/App_Code/ControlV5Base.cs index 852de2c8..7986fde2 100644 --- a/Site5/App_Code/ControlV5Base.cs +++ b/Site5/App_Code/ControlV5Base.cs @@ -4,6 +4,7 @@ using System.Web; using Swarmops.Logic.Cache; using Swarmops.Logic.Security; using Swarmops.Logic.Structure; +using Swarmops.Logic.Support; using Swarmops.Logic.Swarm; /// @@ -33,8 +34,19 @@ public class ControlV5Base : System.Web.UI.UserControl currentUserId = Convert.ToInt32(userIdentityString); currentOrganizationId = Convert.ToInt32(organizationIdentityString); _currentUser = Person.FromIdentity(currentUserId); - _currentOrganization = Organization.FromIdentity(currentOrganizationId); _authority = _currentUser.GetAuthority(); + try + { + _currentOrganization = Organization.FromIdentity(currentOrganizationId); + } + catch (ArgumentException) + { + if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox)) + { + // It's possible this organization was deleted. Log on to Sandbox instead. + _currentOrganization = Organization.Sandbox; + } + } base.OnLoad(e); } diff --git a/Site5/App_Code/DataV5Base.cs b/Site5/App_Code/DataV5Base.cs index ffa58787..b27d4f58 100644 --- a/Site5/App_Code/DataV5Base.cs +++ b/Site5/App_Code/DataV5Base.cs @@ -4,6 +4,7 @@ using System.Web; using Swarmops.Basic.Enums; using Swarmops.Logic.Security; using Swarmops.Logic.Structure; +using Swarmops.Logic.Support; using Swarmops.Logic.Swarm; /// @@ -31,7 +32,18 @@ public class DataV5Base : System.Web.UI.Page string organizationIdentityString = identityTokens[1]; this.CurrentUser = Person.FromIdentity(Int32.Parse(userIdentityString)); - this.CurrentOrganization = Organization.FromIdentity(Int32.Parse(organizationIdentityString)); + try + { + this.CurrentOrganization = Organization.FromIdentity(Int32.Parse(organizationIdentityString)); + } + catch (ArgumentException) + { + if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox)) + { + // It's possible this organization was deleted. Log on to Sandbox instead. + this.CurrentOrganization = Organization.Sandbox; + } + } } else { @@ -46,7 +58,7 @@ public class DataV5Base : System.Web.UI.Page protected override void OnPreInit(EventArgs e) { - CommonV5Base.CulturePreInit(Request); + CommonV5.CulturePreInit(Request); base.OnPreInit(e); } @@ -139,7 +151,7 @@ public class DataV5Base : System.Web.UI.Page protected static AuthenticationData GetAuthenticationDataAndCulture() { - return CommonV5Base.GetAuthenticationDataAndCulture(HttpContext.Current); + return CommonV5.GetAuthenticationDataAndCulture(HttpContext.Current); } protected static string JsonSanitize (string input) diff --git a/Site5/App_Code/MasterV5Base.cs b/Site5/App_Code/MasterV5Base.cs index 72bebfa2..114650a2 100644 --- a/Site5/App_Code/MasterV5Base.cs +++ b/Site5/App_Code/MasterV5Base.cs @@ -24,6 +24,7 @@ public class MasterV5Base : System.Web.UI.MasterPage protected Organization _currentOrganization = null; public EasyUIControl EasyUIControlsUsed { get; set; } // these are set by each page, and called by Master to render in ExternalScripts control + public IncludedControl IncludedControlsUsed { get; set; } // as above with IncludedScripts control // ReSharper restore InconsistentNaming public DateTime PermissionCacheTimestamp diff --git a/Site5/App_Code/PageV5Base.cs b/Site5/App_Code/PageV5Base.cs index 0742849a..c3de9537 100644 --- a/Site5/App_Code/PageV5Base.cs +++ b/Site5/App_Code/PageV5Base.cs @@ -51,6 +51,12 @@ public class PageV5Base : System.Web.UI.Page set { this.Master.EasyUIControlsUsed = value; } } + public IncludedControl IncludedControlsUsed + { + get { return this.Master.IncludedControlsUsed; } + set { this.Master.IncludedControlsUsed = value; } + } + protected Person CurrentUser { get { return this.Master.CurrentUser; } @@ -68,7 +74,7 @@ public class PageV5Base : System.Web.UI.Page protected override void OnPreInit(EventArgs e) { - CommonV5Base.CulturePreInit(Request); + CommonV5.CulturePreInit(Request); base.OnPreInit(e); } @@ -130,7 +136,7 @@ public class PageV5Base : System.Web.UI.Page // the current set of authentication data. Static page methods cannot access // the instance data of PageV5Base. - return CommonV5Base.GetAuthenticationDataAndCulture(HttpContext.Current); + return CommonV5.GetAuthenticationDataAndCulture(HttpContext.Current); } /// diff --git a/Site5/App_GlobalResources/Menu5.resx b/Site5/App_GlobalResources/Menu5.resx index b0d087bd..33e9f738 100644 --- a/Site5/App_GlobalResources/Menu5.resx +++ b/Site5/App_GlobalResources/Menu5.resx @@ -124,7 +124,10 @@ Access Control Lists - Create Organization + Create New Organization + + + Edit Organization Geography Tree diff --git a/Site5/App_GlobalResources/Pages.Admin.resx b/Site5/App_GlobalResources/Pages.Admin.resx index 846d2b8b..39a40c96 100644 --- a/Site5/App_GlobalResources/Pages.Admin.resx +++ b/Site5/App_GlobalResources/Pages.Admin.resx @@ -131,7 +131,7 @@ Create new organization as... - You can create a new organization either as a new standalone organization, or as a child organization of the current one. (In a child organization, everybody with responsibility in the parent organization automatically has corresponding rights and privileges.) + You can create a new organization either as a new standalone organization, or as a child organization of the current one. (Everybody with responsibilities in a parent organization automatically has corresponding rights and privileges in all its children.) Operating currency @@ -156,4 +156,38 @@ Edit Organization + + People become {0} of + The {0} is member, ambassador, etc. in the gender neutral plural. + + + People become {0} when + The {0} is member, ambassador, etc. in the gender neutral plural. + + + {0} ends when + The {0} is membership, ambassadorship, etc. + + + Initial {0} cost (in {1}) + The {0} is membership, etc. The {1} is the operating currency. + + + One {0} lasts + The {0} is membership, ambassadorship, etc. + + + Renewed period counts from + + + Remind to renew + + + Renewals affect + (options: all organizations, one org at a time) + + + Renewal cost (in {0}) + The {0} is the operating currency (USD etc). + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.Ledgers.resx b/Site5/App_GlobalResources/Pages.Ledgers.resx index 13f4f9d1..8d1f09e1 100644 --- a/Site5/App_GlobalResources/Pages.Ledgers.resx +++ b/Site5/App_GlobalResources/Pages.Ledgers.resx @@ -550,4 +550,12 @@ <br/><p>The payments file was <strong>successfully imported.</strong> {1:N0} payment(s) in {0:N0} group(s), totalling {3} {2:N2}, were imported.</p><p>(There were also {5:N0} duplicate payment(s) in {4:N0} group(s).)</p> Arguments 0-5 in order: 0 PaymentGroupCount, 1 PaymentCount, 2 PaymentAmountTotal, 3 Currency, 4 DuplicatePaymentGroupCount, 5 DuplicatePaymentCount + + add account + Displayed as link in parens after account group name + + + New Account + the name of newly-created accounts, before rename + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.Security.resx b/Site5/App_GlobalResources/Pages.Security.resx index 7728be01..53375a9b 100644 --- a/Site5/App_GlobalResources/Pages.Security.resx +++ b/Site5/App_GlobalResources/Pages.Security.resx @@ -139,7 +139,7 @@ New organization - You're not part of any other organizations on this Swarmops installation, so you can't switch to something else. Therefore, we're going back to Dashboard instead. + You're not participating in any other organization on this Swarmops installation, so you can't switch to something else. Therefore, we're going back to Dashboard instead. Change Organizations diff --git a/Site5/Automation/UploadFileHandler.ashx b/Site5/Automation/UploadFileHandler.ashx index e480dd09..79537e2b 100644 --- a/Site5/Automation/UploadFileHandler.ashx +++ b/Site5/Automation/UploadFileHandler.ashx @@ -157,7 +157,7 @@ namespace Swarmops.Frontend.Automation HttpPostedFile file = context.Request.Files[i]; string fullName = Path.GetFileName (file.FileName); - AuthenticationData authData = CommonV5Base.GetAuthenticationDataAndCulture (context); + AuthenticationData authData = CommonV5.GetAuthenticationDataAndCulture (context); Person uploadingPerson = authData.CurrentUser; Organization currentOrg = authData.CurrentOrganization; diff --git a/Site5/Controls/v5/Base/DropDown.ascx b/Site5/Controls/v5/Base/DropDown.ascx new file mode 100644 index 00000000..9315ae6d --- /dev/null +++ b/Site5/Controls/v5/Base/DropDown.ascx @@ -0,0 +1,34 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DropDown.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.Base.DropDown" %> + + + + + diff --git a/Site5/Controls/v5/Base/DropDown.ascx.cs b/Site5/Controls/v5/Base/DropDown.ascx.cs new file mode 100644 index 00000000..72d33d86 --- /dev/null +++ b/Site5/Controls/v5/Base/DropDown.ascx.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace Swarmops.Frontend.Controls.v5.Base +{ + public partial class DropDown : ControlV5Base + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public ListItemCollection Items + { + get { return this.DropControl.Items; } + } + + public string SelectedValue + { + get { return this.DropControl.SelectedValue; } + set { this.DropControl.SelectedValue = value; } + } + } +} \ No newline at end of file diff --git a/Site5/Controls/v5/Base/FileUpload.ascx b/Site5/Controls/v5/Base/FileUpload.ascx index 8100eda1..20c09030 100644 --- a/Site5/Controls/v5/Base/FileUpload.ascx +++ b/Site5/Controls/v5/Base/FileUpload.ascx @@ -64,5 +64,5 @@ -
/>
​
+
/>
​
diff --git a/Site5/Controls/v5/Base/FileUpload.ascx.cs b/Site5/Controls/v5/Base/FileUpload.ascx.cs index 40265ea6..a2c59a1c 100644 --- a/Site5/Controls/v5/Base/FileUpload.ascx.cs +++ b/Site5/Controls/v5/Base/FileUpload.ascx.cs @@ -33,6 +33,8 @@ namespace Swarmops.Controls.Base { GuidString = this.HiddenGuid.Value; } + + ((PageV5Base) this.Page).IncludedControlsUsed |= IncludedControl.FileUpload; // causes master to include necessary script } public string GuidString; diff --git a/Site5/Controls/v5/Financial/ComboBudgets.ascx b/Site5/Controls/v5/Financial/ComboBudgets.ascx index 0d1f3aae..8ebe00ec 100644 --- a/Site5/Controls/v5/Financial/ComboBudgets.ascx +++ b/Site5/Controls/v5/Financial/ComboBudgets.ascx @@ -24,7 +24,11 @@ $('#<%=this.ClientID %>_SpanBudgets span.combo input.combo-text').keydown(function (e) { switch (e.which) { case 40: // down - $('#<%=this.ClientID %>_SpanBudgets span.combo span span.combo-arrow').click(); + var panel = $('#<%=this.ClientID %>_DropBudgets').combotree('panel'); + if (!panel.is(':visible')) { + $('#<%=this.ClientID %>_SpanBudgets span.combo span span.combo-arrow').click(); + panel.focus(); + } break; default: return; // exit this handler for other keys @@ -32,6 +36,67 @@ e.preventDefault(); // prevent the default action (scroll / move caret) }); }); + + // below code from http://doc.javake.cn/jeasyui/www.jeasyui.com/forum/index.php-topic=1972.0.htm, understood to be in public domain + + (function () { + $.extend($.fn.combotree.methods, { + nav: function (jq, dir) { + return jq.each(function () { + var opts = $(this).combotree('options'); + var t = $(this).combotree('tree'); + var nodes = t.tree('getChildren'); + if (!nodes.length) { return } + var node = t.tree('getSelected'); + if (!node) { + t.tree('select', dir > 0 ? nodes[0].target : nodes[nodes.length - 1].target); + } else { + var index = 0; + for (var i = 0; i < nodes.length; i++) { + if (nodes[i].target == node.target) { + index = i; + break; + } + } + if (dir > 0) { + while (index < nodes.length - 1) { + index++; + if ($(nodes[index].target).is(':visible')) { break } + } + } else { + while (index > 0) { + index--; + if ($(nodes[index].target).is(':visible')) { break } + } + } + t.tree('select', nodes[index].target); + } + if (opts.selectOnNavigation) { + var node = t.tree('getSelected'); + $(node.target).trigger('click'); + $(this).combotree('showPanel'); + } + }); + } + }); + $.extend($.fn.combotree.defaults.keyHandler, { + up: function () { + $(this).combotree('nav', -1); + }, + down: function () { + $(this).combotree('nav', 1); + }, + enter: function () { + var t = $(this).combotree('tree'); + var node = t.tree('getSelected'); + if (node) { + $(node.target).trigger('click'); + } + $(this).combotree('hidePanel'); + } + }); + })(jQuery); + \ No newline at end of file diff --git a/Site5/Controls/v5/UI/IncludedScripts.ascx b/Site5/Controls/v5/UI/IncludedScripts.ascx new file mode 100644 index 00000000..05ad84ff --- /dev/null +++ b/Site5/Controls/v5/UI/IncludedScripts.ascx @@ -0,0 +1,5 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="IncludedScripts.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.UI.IncludedScripts" %> + + + + diff --git a/Site5/Controls/v5/UI/IncludedScripts.ascx.cs b/Site5/Controls/v5/UI/IncludedScripts.ascx.cs new file mode 100644 index 00000000..0e3420b2 --- /dev/null +++ b/Site5/Controls/v5/UI/IncludedScripts.ascx.cs @@ -0,0 +1,45 @@ +using System; +using System.IO; +using System.Text; +using NBitcoin; +using Swarmops.Logic.Support; + +namespace Swarmops.Frontend.Controls.v5.UI +{ + public partial class IncludedScripts : ControlV5Base + { + protected void Page_Load(object sender, EventArgs e) + { + StringBuilder scriptRef = new StringBuilder(); + + string[] controlNames = Controls.Split(','); + foreach (string controlName in controlNames) + { + switch (controlName.Trim().ToLowerInvariant()) + { + case "fileupload": + scriptRef.Append( + "\r\n" + + "\r\n"); + break; + + case "switchbutton": + scriptRef.Append( + "\r\n" + + "\r\n"); + break; + case "jsonparameters": + scriptRef.Append( + ""); + break; + default: + break; + } + } + + this.LiteralReference.Text = scriptRef.ToString(); + } + + public new string Controls { get; set; } + } +} \ No newline at end of file diff --git a/Site5/Default.aspx b/Site5/Default.aspx index 7cd7d5f5..89e49366 100644 --- a/Site5/Default.aspx +++ b/Site5/Default.aspx @@ -9,6 +9,7 @@

What you see here is the new interface being rewritten on top of the already-running engine. It runs on Debian/Ubuntu servers for frontend and backend.

This notice will be replaced with a proper Dashboard when all the basic functions are in place. You can see functions appear as they are implemented in the menu.

A rough roadmap says that basic financials are implemented first, then member registry functions, then communications, then responsibilities, then governance. For more on the specific roadmap, go to the SCRUM planning for Swarmops.

+

Look at the Swarmops code on Github (and feel free to contribute)! Current line count: 156,454.

diff --git a/Site5/Images/Icons/iconshock-add-16px.png b/Site5/Images/Icons/iconshock-add-16px.png new file mode 100644 index 00000000..acc9d92f Binary files /dev/null and b/Site5/Images/Icons/iconshock-add-16px.png differ diff --git a/Site5/Images/Icons/iconshock-add-96px.png b/Site5/Images/Icons/iconshock-add-96px.png new file mode 100644 index 00000000..9c4f0b4b Binary files /dev/null and b/Site5/Images/Icons/iconshock-add-96px.png differ diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index 3e4d5698..1062c2c4 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -1,5 +1,6 @@ <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Master-v5.master.cs" Inherits="Swarmops.MasterV5" %> <%@ Register TagPrefix="Swarmops5" TagName="ExternalScripts" Src="~/Controls/v5/UI/ExternalScripts.ascx" %> +<%@ Register TagPrefix="Swarmops5" TagName="IncludedScripts" Src="~/Controls/v5/UI/IncludedScripts.ascx" %> <%@ Register TagPrefix="Swarmops5" TagName="MainMenu" Src="~/Controls/v5/Base/MainMenu.ascx" %> @@ -39,6 +40,8 @@ + + diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index 58b4a1da..7808df2d 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -9,6 +9,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using Swarmops.Logic.Security; using Swarmops.Logic.Structure; +using Swarmops.Logic.Support; using Swarmops.Logic.Swarm; using Membership = Swarmops.Logic.Swarm.Membership; @@ -32,7 +33,18 @@ namespace Swarmops _currentUser = Person.FromIdentity(currentUserId); _authority = _currentUser.GetAuthority(); - _currentOrganization = Organization.FromIdentity(currentOrganizationId); + try + { + _currentOrganization = Organization.FromIdentity(currentOrganizationId); + } + catch (ArgumentException) + { + if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox)) + { + // It's possible this organization was deleted. Log on to Sandbox instead. + _currentOrganization = Organization.Sandbox; + } + } } protected void Page_Load(object sender, EventArgs e) @@ -48,6 +60,7 @@ namespace Swarmops this.Page.Title = "Swarmops - " + this.CurrentPageTitle; this.ExternalScriptEasyUI.Controls = EasyUIControlsUsed.ToString(); + this.IncludedScripts.Controls = IncludedControlsUsed.ToString(); this.LiteralSidebarInfo.Text = this.CurrentPageInfoBoxLiteral; diff --git a/Site5/Pages/v5/Admin/CreateOrganization.aspx b/Site5/Pages/v5/Admin/CreateOrganization.aspx index 8441df21..644fdd99 100644 --- a/Site5/Pages/v5/Admin/CreateOrganization.aspx +++ b/Site5/Pages/v5/Admin/CreateOrganization.aspx @@ -1,35 +1,11 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="CreateOrganization.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Admin.CreateOrganization" %> -<%@ Register TagPrefix="Swarmops5" TagName="ExternalScripts" Src="~/Controls/v5/UI/ExternalScripts.ascx" %> +<%@ Register TagPrefix="Swarmops5" TagName="DropDown" Src="~/Controls/v5/Base/DropDown.ascx" %> - + -