Started work on Create Org - checkpoint commit
This commit is contained in:
@@ -53,6 +53,11 @@ public class ControlV5Base : System.Web.UI.UserControl
|
||||
{
|
||||
buildIdentity = "Build " + reader.ReadLine();
|
||||
}
|
||||
|
||||
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/SprintName.txt")))
|
||||
{
|
||||
buildIdentity += " (" + reader.ReadLine() + ")";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -411,4 +411,64 @@
|
||||
<value>On</value>
|
||||
<comment>On (as opposed to Off)</comment>
|
||||
</data>
|
||||
<data name="Global_Activists_Generic_Commercial" xml:space="preserve">
|
||||
<value>Customers</value>
|
||||
<comment>Gender neutral plural</comment>
|
||||
</data>
|
||||
<data name="Global_Activists_Generic_Governmental" xml:space="preserve">
|
||||
<value>Citizens</value>
|
||||
<comment>Gender neutral plural</comment>
|
||||
</data>
|
||||
<data name="Global_Activists_Generic_Nonprofit" xml:space="preserve">
|
||||
<value>Activists</value>
|
||||
<comment>Gender neutral plural</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Female_Commercial" xml:space="preserve">
|
||||
<value>Customer</value>
|
||||
<comment>Female singular</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Female_Governmental" xml:space="preserve">
|
||||
<value>Citizen</value>
|
||||
<comment>Female singular</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Female_Nonprofit" xml:space="preserve">
|
||||
<value>Activist</value>
|
||||
<comment>Female singular</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Generic_Commercial" xml:space="preserve">
|
||||
<value>Customer</value>
|
||||
<comment>Gender neutral</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Generic_Governmental" xml:space="preserve">
|
||||
<value>Citizen</value>
|
||||
<comment>Gender neutral</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Generic_Nonprofit" xml:space="preserve">
|
||||
<value>Activist</value>
|
||||
<comment>Gender neutral</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Male_Commercial" xml:space="preserve">
|
||||
<value>Customer</value>
|
||||
<comment>Male singular</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Male_Governmental" xml:space="preserve">
|
||||
<value>Citizen</value>
|
||||
<comment>Male singular</comment>
|
||||
</data>
|
||||
<data name="Global_Activist_Male_Nonprofit" xml:space="preserve">
|
||||
<value>Activist</value>
|
||||
<comment>Male singular</comment>
|
||||
</data>
|
||||
<data name="Global_Organization_Commercial" xml:space="preserve">
|
||||
<value>Commercial</value>
|
||||
<comment>A commercial organization (for-profit enterprise)</comment>
|
||||
</data>
|
||||
<data name="Global_Organization_Governmental" xml:space="preserve">
|
||||
<value>Governmental</value>
|
||||
<comment>Organization that's part of government somehow</comment>
|
||||
</data>
|
||||
<data name="Global_Organization_Nonprofit" xml:space="preserve">
|
||||
<value>Non-profit</value>
|
||||
<comment>Non-profit (activist, political parties)</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -112,10 +112,10 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Menu5_Administration" xml:space="preserve">
|
||||
<value>Admin</value>
|
||||
@@ -123,6 +123,9 @@
|
||||
<data name="Menu5_Administration_AccessControlLists" xml:space="preserve">
|
||||
<value>Access Control Lists</value>
|
||||
</data>
|
||||
<data name="Menu5_Administration_CreateOrganization" xml:space="preserve">
|
||||
<value>Create Organization</value>
|
||||
</data>
|
||||
<data name="Menu5_Administration_GeographyTree" xml:space="preserve">
|
||||
<value>Geography Tree</value>
|
||||
</data>
|
||||
|
||||
@@ -473,9 +473,6 @@
|
||||
<value>Initial Value</value>
|
||||
<comment>For asset and liability accounts - the value going into Swarmops first ledger year</comment>
|
||||
</data>
|
||||
<data name="AccountPlan_Edit_Owner" xml:space="preserve">
|
||||
<value>Owner</value>
|
||||
</data>
|
||||
<data name="AccountPlan_Edit_Parent" xml:space="preserve">
|
||||
<value>Parent account or group</value>
|
||||
</data>
|
||||
@@ -498,7 +495,4 @@
|
||||
<data name="AccountPlan_Header_Flags" xml:space="preserve">
|
||||
<value>Flags</value>
|
||||
</data>
|
||||
<data name="AccountPlan_Header_Owner" xml:space="preserve">
|
||||
<value>Owner</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
+19
-3
@@ -225,7 +225,7 @@
|
||||
</Children>
|
||||
</MainMenuItem>
|
||||
|
||||
<!-- TEMP PLACEHOLDER -->
|
||||
<!-- ADMIN MENU -->
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Administration</ResourceKey>
|
||||
@@ -235,11 +235,27 @@
|
||||
<Type>Submenu</Type>
|
||||
<Children>
|
||||
|
||||
<MainMenuItem>
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Administration_CreateOrganization</ResourceKey>
|
||||
<UserLevel>4</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl>iconshock-cabinet</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Admin/CreateOrganization.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<UserLevel>1</UserLevel>
|
||||
<Type>Separator</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey />
|
||||
<UserLevel>4</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl />
|
||||
<ImageUrl>swarmops-builder</ImageUrl>
|
||||
<NavigateUrl />
|
||||
<Type>BuildNumber</Type>
|
||||
<Children />
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="CreateOrganization.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Admin.CreateOrganization" %>
|
||||
<%@ Register src="~/Controls/v5/Base/FileUpload.ascx" tagname="FileUpload" tagprefix="Swarmops5" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ExternalScripts" Src="~/Controls/v5/UI/ExternalScripts.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
<Swarmops5:ExternalScripts ID="ExternalScripts1" Package="easyui" Control="tree" runat="server" />
|
||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
||||
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
|
||||
<!-- The basic File Upload plugin -->
|
||||
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
<asp:Repeater ID="RepeaterTagDropScript" runat="server"><ItemTemplate>
|
||||
$('#DropTags<%# Eval("TagSetId") %>').combotree({
|
||||
animate: true,
|
||||
height: 30
|
||||
});
|
||||
|
||||
|
||||
$('#SpanDropTags<%# Eval("TagSetId") %> span.combo input.combo-text').click(function () {
|
||||
$('#SpanDropTags<%# Eval("TagSetId") %> span.combo span span.combo-arrow').click();
|
||||
});
|
||||
</ItemTemplate></asp:Repeater>
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function validateFields() {
|
||||
var isValid = true;
|
||||
|
||||
isValid = validateTextField('#<%=this.TextAccount.ClientID %>', "<asp:Literal runat="server" ID="LiteralErrorBankAccount" />") && isValid;
|
||||
isValid = validateTextField('#<%=this.TextClearing.ClientID %>', "<asp:Literal runat="server" ID="LiteralErrorBankClearing" />") && isValid;
|
||||
isValid = validateTextField('#<%=this.TextBank.ClientID %>', "<asp:Literal runat="server" ID="LiteralErrorBankName" />") && isValid;
|
||||
|
||||
if ($('#<%=this.ComboBudgets.ClientID %>_DropBudgets').combotree('tree').tree('getSelected') == null) {
|
||||
isValid = false;
|
||||
$('#<%=this.ComboBudgets.ClientID %>_SpanBudgets').addClass("entryError");
|
||||
alertify.error("<asp:Literal runat="server" ID="LiteralErrorBudget" />");
|
||||
}
|
||||
|
||||
<asp:Repeater ID="RepeaterErrorCheckTags" runat="server"><ItemTemplate>
|
||||
if ($('#DropTags<%# Eval("TagSetId") %>').combotree('tree').tree('getSelected') == null) {
|
||||
isValid = false;
|
||||
$('#SpanDropTags<%# Eval("TagSetId") %>').addClass("entryError");
|
||||
alertify.error('<%=Resources.Pages.Financial.FileExpenseClaim_ValidationError_MissingTag.Replace("'", "''") %>');
|
||||
}
|
||||
</ItemTemplate></asp:Repeater>
|
||||
|
||||
isValid = validateTextField('#<%=this.TextPurpose.ClientID %>', "<asp:Literal runat="server" ID="LiteralErrorPurpose" />") && isValid;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Automation/FieldValidation.asmx/IsAmountValid",
|
||||
data: "{'amount': '" + escape($('#<%=this.TextAmount.ClientID %>').val()) + "'}",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
async: false, // blocks until function returns - race conditions otherwise
|
||||
success: function (msg) {
|
||||
if (msg.d != true) {
|
||||
isValid = false;
|
||||
$('#TextAmount').addClass("entryError");
|
||||
alertify.error("<asp:Literal runat="server" ID="LiteralErrorAmount" />");
|
||||
$('#<%=this.TextAmount.ClientID %>').focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Automation/FieldValidation.asmx/AreDocumentsUploaded",
|
||||
data: "{'guidString': '<%=this.FileUpload.GuidString %>'}",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
async: false, // blocks until function returns - race conditions otherwise
|
||||
success: function (msg) {
|
||||
if (msg.d != true) {
|
||||
isValid = false;
|
||||
$('#TextAmount').addClass("entryError");
|
||||
alertify.error("<asp:Literal runat="server" ID="LiteralErrorDocuments" />");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
function validateTextField (fieldId, message) {
|
||||
if ($(fieldId).val().length == 0) {
|
||||
alertify.error(message);
|
||||
$(fieldId).addClass("entryError");
|
||||
$(fieldId).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
|
||||
<asp:HiddenField ID="HiddenTagSetIdentifiers" runat="server"/>
|
||||
<div class="entryFields">
|
||||
<asp:TextBox runat="server" ID="TextAmount" CssClass="alignRight" />​<br/>
|
||||
<asp:TextBox runat="server" ID="TextPurpose" />​<br/>
|
||||
<Swarmops5:ComboBudgets ID="ComboBudgets" runat="server" /> <br/>
|
||||
<asp:Repeater ID="RepeaterTagDrop" runat="server"><ItemTemplate><span id="SpanDropTags<%# Eval("TagSetId") %>"><select class="easyui-combotree" url="/Automation/Json-TransactionTagsTree.aspx?TagSetId=<%# Eval("TagSetId") %>" name="DropTags<%# Eval("TagSetId") %>" id="DropTags<%# Eval("TagSetId") %>" animate="true" style="width:300px"></select></span> <br/></ItemTemplate></asp:Repeater>
|
||||
|
||||
<br/><!-- placeholder for label-side H2 -->
|
||||
|
||||
<!-- file upload begins here -->
|
||||
|
||||
<Swarmops5:FileUpload ID="FileUpload" runat="server" Filter="ImagesOnly" />
|
||||
|
||||
<!-- file upload ends -->
|
||||
|
||||
<br/><!-- placeholder for label-side H2 -->
|
||||
<asp:TextBox runat="server" ID="TextBank" />​<br/>
|
||||
<asp:TextBox runat="server" ID="TextClearing" />​<br/>
|
||||
<asp:TextBox runat="server" ID="TextAccount" /> <br/>
|
||||
<asp:Button ID="ButtonRequest" runat="server" CssClass="buttonAccentColor NoInputFocus" OnClientClick="return validateFields();" OnClick="ButtonRequest_Click" Text="Request"/>
|
||||
</div>
|
||||
<div class="entryLabels">
|
||||
<asp:Label runat="server" ID="LabelAmount" /><br/>
|
||||
<asp:Label runat="server" ID="LabelPurpose" /><br/>
|
||||
<asp:Label runat="server" ID="LabelBudget" /><br/>
|
||||
<asp:Repeater ID="RepeaterTagLabels" runat="server"><ItemTemplate><%# Eval("TagSetLocalizedName") %><br/></ItemTemplate></asp:Repeater>
|
||||
<h2><asp:Label runat="server" ID="LabelHeaderImageFiles" /></h2>
|
||||
<asp:Label runat="server" ID="LabelImageFiles" /><br/>
|
||||
<h2><asp:Label runat="server" ID="LabelHeaderBankDetails" /></h2>
|
||||
<asp:Label runat="server" ID="LabelBankName" /><br/>
|
||||
<asp:Label runat="server" ID="LabelBankClearing" /><br/>
|
||||
<asp:Label runat="server" ID="LabelBankAccount" />
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
{
|
||||
public partial class CreateOrganization : PageV5Base
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.PageTitle = Resources.Pages.Financial.FileExpenseClaim_PageTitle;
|
||||
this.PageIcon = "iconshock-moneyback";
|
||||
this.InfoBoxLiteral = Resources.Pages.Financial.FileExpenseClaim_Info;
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
Localize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Localize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void ButtonRequest_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Create org here
|
||||
|
||||
Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode(successMessage)));
|
||||
|
||||
// Redirect to dashboard
|
||||
|
||||
Response.Redirect("/", true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -377,6 +377,11 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page
|
||||
|
||||
Swarmops.Logic.Support.DatabaseMaintenance.FirstInitialization();
|
||||
|
||||
_initProgress = 6;
|
||||
_initMessage = "Applying all post-baseline database schema upgrades...";
|
||||
Swarmops.Logic.Support.DatabaseMaintenance.UpgradeSchemata();
|
||||
Thread.Sleep(100);
|
||||
|
||||
_initProgress = 5;
|
||||
_initMessage = "Getting list of countries from Swarmops servers...";
|
||||
Thread.Sleep(100);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
this.LiteralHeaderEdit.Text = Resources.Pages.Ledgers.AccountPlan_Header_Edit;
|
||||
this.LiteralHeaderEditingAccount.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Header;
|
||||
this.LiteralHeaderFlags.Text = Resources.Pages.Ledgers.AccountPlan_Header_Flags;
|
||||
this.LiteralHeaderOwner.Text = Resources.Pages.Ledgers.AccountPlan_Header_Owner;
|
||||
this.LiteralHeaderOwner.Text = Resources.Global.Global_Owner;
|
||||
this.LiteralLabelAccountName.Text = Resources.Pages.Ledgers.AccountPlan_Edit_AccountName;
|
||||
this.LiteralLabelActiveLong.Text = Resources.Pages.Ledgers.AccountPlan_Edit_ActiveLong;
|
||||
this.LiteralLabelActiveShort.Text = Resources.Pages.Ledgers.AccountPlan_Edit_ActiveShort;
|
||||
@@ -52,7 +52,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
this.LiteralLabelHeaderConfiguration.Text = Resources.Pages.Ledgers.AccountPlan_Edit_HeaderConfiguration;
|
||||
this.LiteralLabelHeaderDailyOperations.Text =
|
||||
Resources.Pages.Ledgers.AccountPlan_Edit_HeaderDailyOperations;
|
||||
this.LiteralLabelOwner.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Owner;
|
||||
this.LiteralLabelOwner.Text = Resources.Global.Global_Owner;
|
||||
this.LiteralLabelParent.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Parent;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Black 2
|
||||
Reference in New Issue
Block a user