Imports BVSoftware.BVC.Core ' ' © 2003 BV Software LLC ' Public Class configuration_messages_forgotpassword Inherits BaseAdminPage Protected WithEvents valSummary As System.Web.UI.WebControls.ValidationSummary Protected WithEvents valPasswordEmail As System.Web.UI.WebControls.RequiredFieldValidator Protected WithEvents valPasswordSubject As System.Web.UI.WebControls.RequiredFieldValidator Protected WithEvents valPasswordMessage As System.Web.UI.WebControls.RequiredFieldValidator Protected WithEvents btnCancel As System.Web.UI.WebControls.ImageButton Protected WithEvents FormatField As System.Web.UI.WebControls.RadioButtonList Protected WithEvents FromField As System.Web.UI.WebControls.TextBox Protected WithEvents SubjectField As System.Web.UI.WebControls.TextBox Protected WithEvents MetaDescriptionControl As BVSoftware.WebControls.MetaTag Protected WithEvents MetaKeywordsControl As BVSoftware.WebControls.MetaTag Protected WithEvents msg As BVSoftware.WebControls.WebPageMessage Protected WithEvents BodyField As System.Web.UI.WebControls.TextBox Protected WithEvents btnSave As System.Web.UI.WebControls.ImageButton #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BVC2004Store.CheckThisPage(Security.RolePermission.LoginToAdmin) BVC2004Store.CheckThisPage(Security.RolePermission.AccessContentArea) If Not Page.IsPostBack Then MetaKeywordsControl.Content = WebAppSettings.MetaKeywords MetaDescriptionControl.Content = WebAppSettings.MetaDescription End If If Not Page.IsPostBack Then Try ' Load Values from Config If WebAppSettings.ForgotPasswordMailInHTML = True Then FormatField.ClearSelection() FormatField.Items(1).Selected = True Else FormatField.ClearSelection() FormatField.Items(0).Selected = True End If BodyField.Text = ContentServices.Policies.GetDescriptionOnlyByType(Content.PolicyTypes.EmailForgotPasswordBody) FromField.Text = WebAppSettings.ForgotPasswordMailFrom SubjectField.Text = WebAppSettings.ForgotPasswordMailSubject Catch Ex As Exception msg.ShowException(Ex) End Try End If End Sub Sub btnCancel_OnClick(ByVal Sender As Object, ByVal E As ImageClickEventArgs) Response.Redirect("content_messages.aspx", True) End Sub Sub btnSave_OnClick(ByVal Sender As Object, ByVal E As ImageClickEventArgs) msg.Clear() If Page.IsValid() Then Try WebAppSettings.ForgotPasswordMailInHTML = FormatField.SelectedValue ContentServices.Policies.UpdateDescriptionOnlyByType(Content.PolicyTypes.EmailForgotPasswordBody, BodyField.Text) WebAppSettings.ForgotPasswordMailFrom = FromField.Text WebAppSettings.ForgotPasswordMailSubject = SubjectField.Text msg.ShowOK("Changes Saved") Catch Ex As Exception msg.ShowException(Ex) EventLog.LogEvent(Ex) End Try End If End Sub End Class