Another shrimp-sandwich issue

This commit is contained in:
Rick Falkvinge
2015-03-19 21:23:23 +01:00
parent c270a09bff
commit e2baa0f01e
2 changed files with 7 additions and 6 deletions
+5 -2
View File
@@ -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",
+2 -4
View File
@@ -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;
}