//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using CommunityServer.ControlPanel.UI;
using CommunityServer.Components;
using CommunityServer.Controls;

namespace CommunityServer.ControlPanel.Membership
{
	/// <summary>
	/// Summary description for RoleEdit.
	/// </summary>
	public class RoleEdit : BaseMembershipPage
	{
		protected CommunityServer.Controls.Style ControlPanelStyle;
		protected CreateEditRole CreateEditRole1;
	
		override protected void OnInit(EventArgs e)
		{
			this.CreateEditRole1.RoleSaved +=new EventHandler(this.CreateEditRole1_RoleSaved);
			this.Load += new System.EventHandler(this.Page_Load);

			base.OnInit(e);
		}


		private void Page_Load(object sender, System.EventArgs e)
		{

			if ( !Page.IsPostBack ) 
			{
				Head.AddTitle("Edit Role", Context);
			}

		}

		private void CreateEditRole1_RoleSaved(object sender, EventArgs e)
		{
			//this.Page.RegisterStartupScript("reloadRoles", "<script language=\"javascript\">window.top.reloadRoles();</script>");
			Modal.ClosePage(this.Page,"true");
		}

	}
}
