@@ -59,53 +87,32 @@
diff --git a/Site5/Security/RequestPasswordReset.aspx.cs b/Site5/Security/RequestPasswordReset.aspx.cs
index db433888..cf82ed20 100644
--- a/Site5/Security/RequestPasswordReset.aspx.cs
+++ b/Site5/Security/RequestPasswordReset.aspx.cs
@@ -2,8 +2,10 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
+using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
+using Swarmops.Logic.Support;
namespace Swarmops.Pages.Security
{
@@ -11,7 +13,50 @@ namespace Swarmops.Pages.Security
{
protected void Page_Load(object sender, EventArgs e)
{
+ this.Title = Resources.Pages.Security.ResetPassword_PageTitle;
+ this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginTop] = "-3px";
+ this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginRight] = "3px";
+ if (!Page.IsPostBack)
+ {
+ Localize();
+ }
}
+
+ private void Localize()
+ {
+ // Normal template
+ this.LabelSidebarInfoContent.Text = Resources.Pages.Security.ResetPassword_Info;
+ this.LabelSidebarInfoHeader.Text = Resources.Global.Sidebar_Information;
+ this.LabelCurrentOrganizationName.Text = Resources.Global.Global_Organization;
+ this.LabelCurrentUserName.Text = Resources.Global.Global_NoOwner;
+ this.LabelPreferences.Text = Resources.Global.CurrentUserInfo_Preferences;
+
+ // Page specific
+ this.LabelContentTitle.Text = Resources.Pages.Security.ResetPassword_PageTitle;
+ this.LabelMail.Text = Resources.Pages.Security.ResetPassword_Email;
+ this.LabelSuccessMaybe.Text = Resources.Pages.Security.ResetPassword_TicketSentMaybe;
+ this.ButtonRequest.Text = Resources.Pages.Security.ResetPassword_Reset;
+ }
+
+ [WebMethod]
+ public static bool RequestTicket (string mailAddress)
+ {
+ mailAddress = mailAddress.Trim();
+
+ if (string.IsNullOrEmpty (mailAddress))
+ {
+ return false; // this is the only case when we return false: a _syntactically_invalid_ address
+ }
+
+ string resetTicket = SupportFunctions.GenerateSecureRandomKey (16); // 16 bytes = 128 bits random key, more than good enough
+
+ // Create notification
+
+ // Create log entry
+
+ return true;
+ }
+
}
}
\ No newline at end of file