Work on 20880

[TFS Changeset #65768]
This commit is contained in:
hartvig
2010-04-26 10:02:59 +00:00
parent 7945cb3270
commit c97992f509
3 changed files with 22 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content runat="server" ContentPlaceHolderID="body">
<input type="hidden" id="memberGroupName" runat="server" />
<cc1:UmbracoPanel ID="Panel1" runat="server" hasMenu="true">
<cc1:Pane ID="Pane7" Style="padding-right: 10px; padding-left: 10px; padding-bottom: 10px;
padding-top: 10px; text-align: left" runat="server" Height="44px" Width="528px">

View File

@@ -22,25 +22,27 @@ namespace umbraco.presentation.members
{
private MemberGroup _memberGroup = null;
protected ImageButton save = null;
string _memberGroupId = String.Empty;
protected void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
_memberGroupId = !String.IsNullOrEmpty(memberGroupName.Value) ? memberGroupName.Value : Request.QueryString["id"];
if (!IsPostBack)
{
ClientTools
ClientTools
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadMemberGroups>().Tree.Alias)
.SyncTree(Request.QueryString["id"], false);
.SyncTree(_memberGroupId, false);
}
if (!Member.IsUsingUmbracoRoles())
{
NameTxt.Enabled = false;
save.Enabled = false;
NameTxt.Text = Request.QueryString["id"] + " (not editable from umbraco)";
NameTxt.Text = _memberGroupId + " (not editable from umbraco)";
}
else
{
_memberGroup = MemberGroup.GetByName(Request.QueryString["id"]);
_memberGroup = MemberGroup.GetByName(_memberGroupId);
if (!IsPostBack)
{
@@ -52,9 +54,11 @@ namespace umbraco.presentation.members
private void save_click(object sender, System.Web.UI.ImageClickEventArgs e)
{
_memberGroup.Text = NameTxt.Text;
memberGroupName.Value = NameTxt.Text;
_memberGroup.Save();
this.speechBubble(BasePages.BasePage.speechBubbleIcon.save,ui.Text("speechBubbles", "editMemberGroupSaved", base.getUser()),"");
this.ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editMemberGroupSaved", base.getUser()),"");
ClientTools.ReloadActionNode(true, true);
}
#region Web Form Designer generated code

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,15 @@ namespace umbraco.presentation.members {
public partial class EditMemberGroup {
/// <summary>
/// memberGroupName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden memberGroupName;
/// <summary>
/// Panel1 control.
/// </summary>