using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CMS.CMSHelper; using CMS.FormControls; public partial class CMSModules_Membership_FormControls_Roles_SelectRoles : FormEngineUserControl { #region "Public properties" /// /// Gets or sets the enabled state of the control. /// public override bool Enabled { get { return base.Enabled; } set { base.Enabled = value; selectRole.Enabled = value; } } /// /// Determines whether use displaynames instead of codenames. /// public bool UseFriendlyNames { get { return selectRole.UseFriendlyMode; } set { selectRole.UseFriendlyMode = value; } } /// /// Gets or sets field value. /// public override object Value { get { return selectRole.Value; } set { selectRole.Value = value; } } /// /// /// public override string ValueDisplayName { get { return selectRole.ValueDisplayName; } } /// /// Gets or sets if live iste property. /// public override bool IsLiveSite { get { return selectRole.IsLiveSite; } set { selectRole.IsLiveSite = value; } } /// /// Indicates if role selector allow empty selection. /// public bool AllowEmpty { get { return selectRole.AllowEmpty; } set { selectRole.AllowEmpty = value; } } #endregion #region "Events" /// /// Page_Load event. /// protected void Page_Load(object sender, EventArgs e) { selectRole.IsLiveSite = IsLiveSite; selectRole.ShowSiteFilter = false; selectRole.CurrentSelector.ResourcePrefix = "addroles"; selectRole.SiteID = CMSContext.CurrentSiteID; } #endregion }