/// <summary> /// Retrieves a display name of the specified CMS user settings field, and returns it. /// </summary> /// <param name="fieldName">The CMS user settings field name.</param> /// <returns>A display name of the specified CMS user settings field, if found; otherwise, an empty string.</returns> protected string GetUserSettingsFieldDisplayName(string fieldName) { FormFieldInfo field = UserSettingsFormInfo.GetFormField(fieldName); if (field == null) { return(String.Empty); } return(ResHelper.LocalizeString(field.GetPropertyValue(FormFieldPropertyEnum.FieldCaption, MacroContext.CurrentResolver))); }
protected override void OnInit(EventArgs e) { base.OnInit(e); ScriptHelper.RegisterWOpenerScript(Page); ScriptHelper.RegisterJQuery(Page); PageTitle.TitleText = GetString("fb.mapping.editor.title"); ShowWarning(GetString("fb.mapping.editor.introduction")); ShowInformation(GetString("fb.mapping.editor.instruction")); UserMappingItemRepeater.ItemDataBound += UserMappingItemRepeater_ItemDataBound; UserSettingsMappingItemRepeater.ItemDataBound += UserSettingsMappingItemRepeater_ItemDataBound; Save += (s, ea) => Confirm(); try { RestoreParameters(); UserMappingItemRepeater.DataSource = UserFormInfo.GetFields(true, true); UserMappingItemRepeater.DataBind(); UserSettingsMappingItemRepeater.DataSource = UserSettingsFormInfo.GetFields(true, true); UserSettingsMappingItemRepeater.DataBind(); } catch (Exception exception) { HandleError(exception); } }