diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx b/Site5/Pages/v5/Ledgers/AccountPlan.aspx index 46a22af5..cbb03dd7 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx @@ -90,11 +90,15 @@ return; } + var jsonData = {}; + jsonData.accountId = accountId; + jsonData.name = newAccountName; + $('#TextAccountName').css('background-color', '#FFFFE0'); $.ajax({ type: "POST", url: "/Pages/v5/Ledgers/AccountPlan.aspx/SetAccountName", - data: "{'accountId': '" + escape(accountId) + "', 'name':'" + escape(newAccountName) + "'}", + data: $.toJSON(jsonData), contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { // TODO: This needs three return values - changed, broken and changed, or not changed @@ -447,7 +451,6 @@ } function onOwnerChange(personId) { - alert('onOwnerChange'); $('span#<%= DropOwner.ClientID %>_SpanPeople span input.textbox-text').css('background-color', '#FFFFE0'); $.ajax({ type: "POST", diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs index bdf90893..fea7fddf 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs @@ -208,9 +208,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers AuthenticationData authData = GetAuthenticationDataAndCulture(); FinancialAccount account = FinancialAccount.FromIdentity (accountId); - string newName = HttpContext.Current.Server.UrlDecode (name); - - if (account.Name == newName) + if (account.Name == name) { // no change return true; @@ -221,7 +219,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers return false; } - account.Name = newName; + account.Name = name; return true; }