Added redirect to Edit Org after Create Org

This commit is contained in:
Rick Falkvinge
2014-11-13 04:46:59 +01:00
parent d11939051b
commit 88e20c5b73
5 changed files with 27 additions and 10 deletions
+1 -1
View File
@@ -147,7 +147,7 @@
<comment>This can be "members", etc.</comment>
</data>
<data name="CreateOrganization_Success" xml:space="preserve">
<value>The new organization has been created. You have been given an initial two-year {0} in the organization, so you can work with it and set it up properly. To switch to working with your new organization, use the control panel top right.</value>
<value>The new organization has been created. You have been given an initial two-year {0} in the organization, so you can work with it and set it up properly. You have also been &lt;strong&gt;logged in&lt;/strong&gt; to your new organization instead of the one you were logged in to before.&lt;br/&gt;&lt;br/&gt;This is the Edit Organization panel, where you can set more parameters for your new organization.</value>
<comment>The {0} is membership, employment, citizenship, residence, etc.</comment>
</data>
<data name="EditOrganization_Info" xml:space="preserve">
+1 -1
View File
@@ -42,6 +42,6 @@ namespace Swarmops.Frontend.Controls.v5.UI
}
public string Package { get; set; }
public string Controls { get; set; }
public new string Controls { get; set; }
}
}
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Web;
using System.Web.UI.WebControls;
using Swarmops.Logic.Financial;
@@ -130,13 +131,11 @@ namespace Swarmops.Frontend.Pages.v5.Admin
string successMessage = String.Format(Resources.Pages_Admin.CreateOrganization_Success, Resources.Global.ResourceManager.GetString("Title_" + peopleLabel + "_Ship"));
// Create org here
Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode(successMessage)));
// Redirect to dashboard
// Log in to new organization, then redirect to Edit
Response.Redirect("/", true);
Response.Redirect("/Pages/v5/Security/SetCurrentOrganization.aspx?OrganizationId=" + newOrganization.Identity.ToString(CultureInfo.InvariantCulture) + "&ReturnUrl=/Pages/v5/Admin/EditOrganization.aspx", true);
}
}
@@ -19,6 +19,7 @@ namespace Swarmops.Frontend.Pages.v5.Security
throw new UnauthorizedAccessException("No"); // may cause problems on login screen?
}
string returnUrlString = Request.QueryString["ReturnUrl"];
string organizationIdString = Request.QueryString["OrganizationId"];
int organizationId = Int32.Parse(organizationIdString);
Organization suggestedOrganization = null;
@@ -47,10 +48,19 @@ namespace Swarmops.Frontend.Pages.v5.Security
logonFlags = currentIdentityParts[3];
}
FormsAuthentication.RedirectFromLoginPage(
CurrentUser.Identity.ToString(CultureInfo.InvariantCulture) + "," +
suggestedOrganization.Identity.ToString(CultureInfo.InvariantCulture) + ",," +
logonFlags, true);
string userIdentityString = CurrentUser.Identity.ToString(CultureInfo.InvariantCulture) + "," +
suggestedOrganization.Identity.ToString(CultureInfo.InvariantCulture) + ",," +
logonFlags;
if (!string.IsNullOrEmpty(returnUrlString))
{
FormsAuthentication.SetAuthCookie(userIdentityString, true);
Response.Redirect(returnUrlString);
}
else
{
FormsAuthentication.RedirectFromLoginPage(userIdentityString, true);
}
}
}
+8
View File
@@ -1031,6 +1031,14 @@ input.ButtonSwarmopsUpload:active {
}
/* JQUERY PLUGIN OVERRIDES */
nav.alertify-buttons {
margin-top: 20px;
}
/* COLOR SCHEME
#A2BEFF #476EC7 #1C397E #C8D9FF #E4ECFF -- blue (hue 222)