/// <summary> /// Overrides OnInit method. /// </summary> protected override void OnInit(EventArgs e) { base.OnInit(e); // Assign save action to the save button in header actions HeaderActions.AddAction(new SaveAction()); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; CategorySelector.ProductID = ProductID; CategorySelector.OnSelectionChanged += CategorySelector_OnSelectionChanged; // Get list of existing categories GetListOfAlreadyCreatedVariants(ExistingCategories); VariantGrid.DelayedReload = true; VariantGrid.OnLoadColumns += VariantGrid_OnLoadColumns; // Disable pager and display all records VariantGrid.PageSize = "##ALL##"; VariantGrid.PagerConfig = new UniGridPagerConfig { DisplayPager = false }; VariantGrid.GridView.AllowPaging = false; VariantGrid.ApplyPageSize = false; VariantGrid.RememberStateByParam = ""; VariantGrid.Pager.DisplayPager = false; }
/// <summary> /// Initializes header action control. /// </summary> private void InitHeaderActions() { var btnSave = new SaveAction(Page) { Permission = "Manage", ResourceName = "CMS.ABTest" }; HeaderActions.AddAction(btnSave); switch (TestStatus) { case ABTestStatusEnum.NotStarted: if (ABTest.ABTestID != 0) { AddStartTestButton(); } break; case ABTestStatusEnum.Scheduled: AddStartTestButton(); break; case ABTestStatusEnum.Running: AddFinishTestButton(); break; } }
protected void Page_Load(object sender, EventArgs e) { emailId = QueryHelper.GetInteger("emailid", 0); isArchive = QueryHelper.GetBoolean("archive", false); gridElem.WhereCondition = "EmailID=" + emailId.ToString(); gridElem.OnExternalDataBound += gridElem_OnExternalDataBound; gridElem.OnBeforeDataReload += gridElem_OnBeforeDataReload; gridElem.OnAction += gridElem_OnAction; gridElem.Pager.ShowPageSize = false; gridElem.Pager.DefaultPageSize = 15; CurrentMaster.Title.TitleText = GetString("emailqueue.sentdetails.title"); CurrentMaster.Title.TitleImage = GetImageUrl("Objects/CMS_User/massemail.png"); // Header action initialization HeaderActions.AddAction(new HeaderAction() { Text = GetString("emailqueue.queue.deleteselected"), ImageUrl = GetImageUrl("CMSModules/CMS_EmailQueue/deleteselected.png"), OnClientClick = "if (!confirm(" + ScriptHelper.GetString(GetString("EmailQueue.DeleteSelectedRecipientConfirmation")) + ")) return false;", CommandName = "delete" }); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Initializes header action control. /// </summary> private void InitHeaderActions() { // Find out if current account is merged into another site or global account if (ai != null) { mergedIntoSite = (ai.AccountMergedWithAccountID != 0); mergedIntoGlobal = (ai.AccountGlobalAccountID != 0); mergedIntoGlobal &= AccountHelper.AuthorizedReadAccount(UniSelector.US_GLOBAL_RECORD, false); if (!ContactHelper.IsSiteManager) { mergedIntoGlobal &= SettingsKeyProvider.GetBoolValue(CMSContext.CurrentSiteName + ".CMSCMGlobalAccounts"); } } HeaderActions.AddAction(new SaveAction(Page)); if (mergedIntoSite || mergedIntoGlobal) { HeaderActions.AddAction(new HeaderAction { ControlType = HeaderActionTypeEnum.Hyperlink, Text = GetString("om.contact.splitfromparent"), ImageUrl = GetImageUrl("CMSModules/CMS_ContactManagement/split.png"), CommandName = "split" }); } HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
protected void Page_Load(object sender, EventArgs e) { if (BaseInfo == null) { ShowError(GetString("codegenerator.objectwasnotloaded")); txtCode.Visible = false; return; } DataClassInfo dci = GetDataClassInfo(); if (dci != null) { mClassName = dci.ClassName; string formDefinition = dci.ClassFormDefinition; var fi = new FormInfo(formDefinition); mCode = GetCode(fi); txtCode.Text = mCode; HeaderActions.AddAction(new HeaderAction() { Text = GetString("codegenerator.downloadfile"), CommandName = DOWNLOAD_FILE, OnClientClick = "window.noProgress = true;" }); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; } }
protected void InitActions() { HeaderActions actions = (HeaderActions)ControlsHelper.GetChildControl(layoutElem, typeof(HeaderActions)); if (actions != null) { actions.AddAction(new SaveAction(Page)); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); // Alter page to work as an application if (QueryHelper.GetBoolean("application", false)) { PageTitle.Visible = false; CurrentMaster.FooterContainer.Visible = false; HeaderActions.AddAction(new HeaderAction { Index = -2, Text = GetString("support.submit"), EventName = ComponentEvents.SUBMIT, OnClientClick = "StoreDescriptionForPostback();" }); // Register save ComponentEvents.RequestEvents.RegisterForComponentEvent("Submit", ComponentEvents.SUBMIT, (s, args) => { Submit(s, args); }); } else { // Set submit button SetSaveResourceString("support.submit"); SetSaveJavascript("StoreDescriptionForPostback();"); Save += Submit; } RegisterCSS(); SetCategoriesDropdown(); SetFormControls(); RegisterScripts(); // Everything afterward only once if (RequestHelper.IsPostBack()) { // Restore description content from hidden field txtDescription.Controls.Add(new LiteralControl(hdnDescription.Value)); return; } // Remove any stale window objects WindowHelper.Remove(WarningToggleField); WindowHelper.Remove(ErrorToggleField); WindowHelper.Remove("Metrics"); // Set url txtURL.Text = GetURL(); // Set resource strings PageTitle.TitleText = GetString("support.title"); txtName.Attributes.Add("placeholder", GetString("support.name.placeholder")); txtCategoryCustom.Attributes.Add("placeholder", GetString("support.category.custom.placeholder")); txtOrganization.Attributes.Add("placeholder", GetString("support.organization.placeholder")); txtURL.Attributes.Add("placeholder", GetString("support.url.placeholder")); (txtEmail.Controls[0] as CMSTextBox).Attributes.Add("placeholder", GetString("support.email.placeholder")); lnkAdvanced.Text = icAdvanced.AlternativeText = GetString("support.metrics.flyopen"); }
protected void Page_Load(object sender, EventArgs e) { ButtonSetPassword.Text = GetString("Administration-User_Edit_Password.SetPassword"); LabelPassword.Text = GetString("Administration-User_Edit_Password.NewPassword"); LabelConfirmPassword.Text = GetString("Administration-User_Edit_Password.ConfirmPassword"); chkSendEmail.Text = GetString("Administration-User_Edit_Password.SendEmail"); if (!RequestHelper.IsPostBack()) { if (UserID > 0) { // Check that only global administrator can edit global administrator's accounts ui = UserInfoProvider.GetUserInfo(UserID); EditedObject = ui; CheckUserAvaibleOnSite(ui); if (!CheckGlobalAdminEdit(ui)) { plcTable.Visible = false; ShowError(GetString("Administration-User_List.ErrorGlobalAdmin")); return; } if (ui != null) { if (ui.GetValue("UserPassword") != null) { string password = ui.GetValue("UserPassword").ToString(); if (password.Length > 0) { passStrength.TextBoxAttributes.Add("value", hiddenPassword); TextBoxConfirmPassword.Attributes.Add("value", hiddenPassword); } } } } } HeaderActions.AddAction(new HeaderAction() { ImageUrl = GetImageUrl("Objects/CMS_User/passwordgenerate.png"), Text = GetString("Administration-User_Edit_Password.gennew"), CommandName = GENERATEPASSWORD, OnClientClick = GetGeneratePasswordScript() }); if (DisplaySendPaswd()) { HeaderActions.AddAction(new HeaderAction() { ImageUrl = GetImageUrl("Objects/CMS_User/passwordsend.png"), Text = GetString("Administration-User_Edit_Password.sendpswd"), CommandName = SENDPASSWORD }); } HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
private void SetupSaveButton() { // Setup Save button HeaderActions.AddAction(new SaveAction() { Text = SiteHasMultipleCultures ? GetString("dataprotection.consents.saveconsenttext") : GetString("general.save"), Enabled = Consent.CheckPermissions(PermissionsEnum.Modify, CurrentSiteName, CurrentUser) }); HeaderActions.ActionPerformed += new CommandEventHandler(HeaderActions_ActionPerformed); }
/// <summary> /// Initializes header action control. /// </summary> private void InitHeaderActions() { var btnSave = new SaveAction { Permission = "Manage", ResourceName = "CMS.ABTest" }; HeaderActions.AddAction(btnSave); }
protected void Page_Load(object sender, EventArgs e) { String text = String.Empty; String url = TargetUrl; bool enabled = true; String onClick = String.Empty; // If new element is set, load it directly, otherwise use first element with prefix 'new' in its name. UIElementInfo uiNew = String.IsNullOrEmpty(NewElement) ? UIContext.UIElement.GetNewElement() : UIElementInfoProvider.GetUIElementInfo(UIContext.UIElement.ElementResourceID, NewElement); bool openInDialog = false; String dialogWidth = null; String dialogHeight = null; if (uiNew != null) { UIContextData data = new UIContextData(); data.LoadData(uiNew.ElementProperties); text = UIElementInfoProvider.GetElementCaption(uiNew); enabled = UIContextHelper.CheckElementVisibilityCondition(uiNew); url = ContextResolver.ResolveMacros(UIContextHelper.GetElementUrl(uiNew, UIContext)); openInDialog = data["OpenInDialog"].ToBoolean(false); dialogWidth = data["DialogWidth"].ToString(null); dialogHeight = data["DialogHeight"].ToString(null); // Set on-click for JavaScript type if (uiNew.ElementType == UIElementTypeEnum.Javascript) { onClick = url; url = String.Empty; } else { // For URL append dialog hash if needed url = UIContextHelper.AppendDialogHash(UIContext, url); } } // If url is non empty add action if (((url != String.Empty) || (onClick != String.Empty)) && (HeaderActions != null)) { HeaderActions.AddAction(new HeaderAction() { Text = GetString(text), RedirectUrl = url, Enabled = enabled, OnClientClick = onClick, OpenInDialog = openInDialog, DialogWidth = dialogWidth, DialogHeight = dialogHeight }); } }
private void InitHeaderActions() { HeaderActions.AddAction(new HeaderAction { Text = GetString("BizFormList.lnkNewBizForm"), Tooltip = GetString("BizFormList.lnkNewBizForm"), RedirectUrl = "BizForm_New.aspx", ResourceName = "cms.form", Permission = "CreateForm" }); }
protected override void OnInit(EventArgs e) { base.OnInit(e); // Register Send header action HeaderActions.AddAction(new HeaderAction { ButtonStyle = ButtonStyle.Primary, Text = GetString("general.send"), CommandName = SEND_CMND_NAME }); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Initializes header action control. /// </summary> private void InitHeaderActions() { // Initialize SPLIT button btnSplit = btnSplit ?? new HeaderAction { Text = GetString("om.contact.splitfromparent"), CommandName = "split", CommandArgument = "false", }; HeaderActions.AddAction(btnSplit); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Adds the "Start test" button. /// </summary> private void AddStartTestButton() { string testStartUrl = ResolveUrl("~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABTest/StartABTest.aspx?testid=" + ABTest.ABTestID); var btnStartTest = new HeaderAction { Tooltip = GetString("abtesting.starttest.tooltip"), Text = GetString("abtesting.starttest"), OnClientClick = "modalDialog('" + testStartUrl + @"', '', 670, 320);", Enabled = IsUserAuthorizedToManageTest }; HeaderActions.AddAction(btnStartTest); }
/// <summary> /// Initializes header actions. /// </summary> private void InitHeaderActions() { HeaderAction sendAction = new HeaderAction { Text = GetString("general.send"), ButtonStyle = ButtonStyle.Primary, CommandName = "send", ResourceName = "CMS.Users", Permission = "Modify" }; HeaderActions.AddAction(sendAction); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Adds the "Finish test" button /// </summary> private void AddFinishTestButton() { string testFinishUrl = ResolveUrl("~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABTest/FinishABTest.aspx?testid=" + ABTest.ABTestID); var btnFinishTest = new HeaderAction { ResourceName = "CMS.ABTest", Permission = "Manage", Tooltip = GetString("abtesting.finishtest.tooltip"), Text = GetString("abtesting.finishtest"), OnClientClick = "modalDialog('" + testFinishUrl + @"', '', 670, 320);", }; HeaderActions.AddAction(btnFinishTest); }
protected void Page_Load(object sender, EventArgs e) { UserInfo ui = UserInfo; EditedObject = ui; CheckUserAvaibleOnSite(ui); // Check that only global administrator can edit global administrator's accounts if (!CheckGlobalAdminEdit(ui)) { plcTable.Visible = false; ShowError(GetString("Administration-User_List.ErrorGlobalAdmin")); return; } if (ui != null) { if (!ui.CheckPermissions(PermissionsEnum.Modify, SiteContext.CurrentSiteName, MembershipContext.AuthenticatedUser)) { RedirectToAccessDenied(ui.TypeInfo.ModuleName, CMSAdminControl.PERMISSION_MODIFY); } passStrength.PlaceholderText = "mem.general.changepassword"; // Hide warning panel after user extended validity of his own password if (ui.UserID == MembershipContext.AuthenticatedUser.UserID) { btnSetPassword.OnClientClick += "window.top.HideWarning()"; } } HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-User_Edit_Password.gennew"), CommandName = GENERATEPASSWORD, OnClientClick = GetGeneratePasswordScript() }); if (DisplaySendPassword()) { HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-User_Edit_Password.sendpswd"), CommandName = SENDPASSWORD }); } HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Initializes all nested controls. /// </summary> private void SetupControls() { IsLiveSite = false; InitializeScripts(); HeaderActions.ActionsList.Clear(); // Validate action HeaderAction validate = new HeaderAction(); validate.OnClientClick = "LoadHTMLToElement('" + hdnHTML.ClientID + "'," + ScriptHelper.GetString(Url) + ");"; validate.Text = GetString("general.validate"); validate.Tooltip = validate.Text; validate.CommandName = "validate"; // View HTML code string click = GetViewSourceActionClick(); HeaderAction viewCode = new HeaderAction(); viewCode.OnClientClick = click; viewCode.Text = GetString("validation.viewcode"); viewCode.Tooltip = viewCode.Text; viewCode.ButtonStyle = ButtonStyle.Default; HeaderActions.AddAction(validate); HeaderActions.AddAction(viewCode); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; chkErrorsOnly.ResourceString = "validation.html.showerrorsonly"; chkErrorsOnly.AddCssClass("dont-check-changes"); // Set sorting and add events gridValidationResult.OrderBy = "line ASC"; gridValidationResult.IsLiveSite = IsLiveSite; gridValidationResult.OnExternalDataBound += GridExternalDataBound; gridValidationResult.OnExternalDataBound += gridValidationResult_OnExternalDataBound; gridValidationResult.OnDataReload += gridValidationResult_OnDataReload; gridValidationResult.GridView.RowDataBound += GridView_RowDataBound; gridValidationResult.ZeroRowsText = GetString("validation.html.notvalidated"); gridValidationResult.ShowActionsMenu = true; gridValidationResult.AllColumns = "line, column, message, source"; gridValidationResult.DelayedReload = true; gridValidationResult.RememberState = false; // Set custom validating text up.ProgressText = GetString("validation.validating"); }
/// <summary> /// Adds the "Select as winner" button. /// </summary> private void AddSelectAsWinnerButton() { var actions = new List <HeaderAction>(); AddSelectAsWinnerOptions(actions); HeaderActions.AddAction(new HeaderAction { Tooltip = GetString("abtesting.selectwinner.tooltip"), Text = GetString("abtesting.selectwinner"), Inactive = true, AlternativeActions = actions, Enabled = IsUserAuthorizedToManageTest }); }
protected void Page_Load(object sender, EventArgs e) { UniGrid.OnAction += new OnActionEventHandler(uniGrid_OnAction); UniGrid.ZeroRowsText = GetString("WebFarmTasks_List.ZeroRows"); UniGrid.GridView.DataBound += new EventHandler(GridView_DataBound); UniGrid.GridView.RowDataBound += GridView_RowDataBound; HeaderActions.AddAction(new HeaderAction { ButtonStyle = ButtonStyle.Primary, Text = GetString("WebFarmTasks_List.RunButton"), CommandName = "run" }); HeaderActions.AddAction(new HeaderAction { ButtonStyle = ButtonStyle.Default, Text = GetString("WebFarmTasks_List.EmptyButton"), CommandName = "empty" }); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Initiates header actions. /// </summary> private void InitHeaderActions() { var recalculationQuery = QueryHelper.BuildQueryWithHash("scoreID", ScoreId.ToString(CultureInfo.InvariantCulture)); var recalculationURL = ResolveUrl("~/CMSModules/Scoring/Pages/ScheduleRecalculationDialog.aspx") + recalculationQuery; var score = ScoreInfoProvider.GetScoreInfo(ScoreId); mButtonRecalculate = mButtonRecalculate ?? new HeaderAction { Text = GetString("om.score.recalculate"), OnClientClick = "modalDialog('" + recalculationURL + @"', '', 660, 320);", Enabled = false, ResourceName = score.TypeInfo.ModuleName, Permission = "modify" }; HeaderActions.AddAction(mButtonRecalculate); }
/// <summary> /// Initializes header actions /// </summary> private void InitHeaderActions() { HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnRestart"), ButtonStyle = ButtonStyle.Primary, CommandName = "Restart", }); HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnRestartWebfarm"), ButtonStyle = ButtonStyle.Primary, CommandName = "RestartWebFarm", Visible = WebFarmButtonVisible, }); HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnClearCache"), ButtonStyle = ButtonStyle.Primary, CommandName = "ClearCache", }); HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnClearCounters"), ButtonStyle = ButtonStyle.Default, CommandName = "ClearCounters", Visible = SystemContext.IsFullTrustLevel && LicenseHelper.CheckFeature(RequestContext.CurrentDomain, FeatureEnum.HealthMonitoring), }); HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnClear"), ButtonStyle = ButtonStyle.Default, CommandName = "ClearMemory", }); HeaderActions.AddAction(new HeaderAction { Text = GetString("Administration-System.btnRestartServices"), ButtonStyle = ButtonStyle.Default, CommandName = "RestartServices", Visible = SystemContext.IsFullTrustLevel && WinServiceHelper.ServicesAvailable(), }); }
protected void Page_Load(object sender, EventArgs e) { webpartId = QueryHelper.GetInteger("webpartid", 0); EditedObject = WebPartInfoProvider.GetWebPartInfo(webpartId); GenerateCode(); // Ensure header action HeaderAction generate = new HeaderAction(); generate.Text = GetString("WebPartCode.Generate"); generate.Tooltip = generate.Text; generate.CommandName = "generate"; HeaderActions.AddAction(generate); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
protected void Page_Load(object sender, EventArgs e) { var savedReportId = QueryHelper.GetInteger("reportId", 0); if ((!RequestHelper.IsPostBack()) && (QueryHelper.GetInteger("View", 0) == 1)) { ltlScript.Text += ScriptHelper.GetScript("parent.SelTab(3,'','');"); } string queryParams = String.Format("?reportid={0}", savedReportId); HeaderActions.AddAction(new HeaderAction { Text = GetString("Report_View.Print"), OnClientClick = string.Format("myModalDialog('SavedReport_Print.aspx{0}&hash={1}', 'SavedReportPrint', 650, 700); return false;", queryParams, QueryHelper.GetHash(queryParams)) }); // Creates SavedReport obj SavedReportInfo sri = SavedReportInfoProvider.GetSavedReportInfo(savedReportId); if (sri != null) { ReportInfo ri = ReportInfoProvider.GetReportInfo(sri.SavedReportReportID); if (ri != null) { // Initialize pagetitle breadcrumbs PageBreadcrumbs.Items.Add(new BreadcrumbItem() { Text = ri.ReportDisplayName, RedirectUrl = URLHelper.AddParameterToUrl(UIContextHelper.GetElementUrl(ModuleName.REPORTING, "SavedReports", false, ri.ReportID), "reportid", ri.ReportID.ToString()) }); PageBreadcrumbs.Items.Add(new BreadcrumbItem() { Text = sri.SavedReportTitle }); } // Backward compatibility // Check whether url is relative and check whether url to get report graph page is correct string savedReportHtml = ReportInfoProvider.GetReportGraphUrlRegExp.Replace(sri.SavedReportHTML, RepairURL); ltlHtml.Text = HTMLHelper.ResolveUrls(savedReportHtml, ResolveUrl("~/")); } ScriptHelper.RegisterPrintDialogScript(this); }
/// <summary> /// Adds the "Finish test" with alternative actions button. /// </summary> private void AddFinishAndSelectAsWinnerButton() { var actions = new List <HeaderAction>(); AddSelectAsWinnerOptions(actions); string testFinishUrl = ResolveUrl("~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABTest/FinishABTest.aspx?testid=" + ABTest.ABTestID); HeaderActions.AddAction(new HeaderAction { Tooltip = GetString("abtesting.finishtest.tooltip"), Text = GetString("abtesting.finishtest"), AlternativeActions = actions, OnClientClick = "modalDialog('" + testFinishUrl + @"', '', 670, 320);", Enabled = IsUserAuthorizedToManageTest }); }
/// <summary> /// Initializes header action control. /// </summary> private void InitHeaderActions() { // Initialize SAVE button btnSave = btnSave ?? new SaveAction(Page); // Initialize SPLIT button btnSplit = btnSplit ?? new HeaderAction() { ControlType = HeaderActionTypeEnum.Hyperlink, Text = GetString("om.contact.splitfromparent"), ImageUrl = GetImageUrl("CMSModules/CMS_ContactManagement/split.png"), CommandName = "split", CommandArgument = "false", }; HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; HeaderActions.AddAction(btnSave); HeaderActions.AddAction(btnSplit); }
protected void Page_Load(object sender, EventArgs e) { emailId = QueryHelper.GetInteger("emailid", 0); isArchive = QueryHelper.GetBoolean("archive", false); gridElem.WhereCondition = "EmailID=" + emailId; gridElem.OnExternalDataBound += gridElem_OnExternalDataBound; gridElem.OnBeforeDataReload += gridElem_OnBeforeDataReload; gridElem.OnAction += gridElem_OnAction; // Header action initialization HeaderActions.AddAction(new HeaderAction { Text = GetString("emailqueue.queue.deleteselected"), OnClientClick = "if (!confirm(" + ScriptHelper.GetString(GetString("EmailQueue.DeleteSelectedRecipientConfirmation")) + ")) return false;", CommandName = "delete" }); HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; }
/// <summary> /// Adds the "Start test" button. If the tested page is under workflow, the button's enabled state is based on the page's published state. /// </summary> private void AddStartTestButton() { string testStartUrl = ResolveUrl("~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABTest/StartABTest.aspx?testid=" + ABTest.ABTestID); var pageIsPublished = DocumentManager.Step?.StepIsPublished ?? true; var tooltip = !IsUserAuthorizedToManageTest?GetString("abtesting.starttest.tooltip.permissionrequired") : pageIsPublished?GetString("abtesting.starttest.tooltip") : GetString("abtesting.starttest.tooltip.disabled"); var btnStartTest = new HeaderAction { Tooltip = tooltip, Text = GetString("abtesting.starttest"), OnClientClick = "modalDialog('" + testStartUrl + @"', '', 670, 320);", Enabled = IsUserAuthorizedToManageTest && pageIsPublished }; HeaderActions.AddAction(btnStartTest); }
/// <summary> /// Load page life-cycle event. /// </summary> protected override void OnLoad(EventArgs e) { base.OnLoad(e); LoadForm(); InitAsyncLog(); // Add Serialize all objects button mSerializeAction = new HeaderAction { Text = GetString("ci.serializeallobjects"), CommandName = "serialize", ButtonStyle = ButtonStyle.Default }; HeaderActions.AddAction(mSerializeAction); HeaderActions.ActionPerformed += ActionPerformed; ShowInformation(GetString("ci.performancemessage")); }