password reset link sms added
This commit is contained in:
parent
9c9fad9ba7
commit
7bd6628bea
21 changed files with 664 additions and 60 deletions
|
@ -5131,7 +5131,6 @@
|
|||
<data name="Quota.VPSForPC.StartShutdownAllowed" xml:space="preserve">
|
||||
<value>Allow user to Start, Turn off VPS</value>
|
||||
</data>
|
||||
|
||||
<data name="ResourceGroup.VPS2012" xml:space="preserve">
|
||||
<value>Virtual Private Servers 2012</value>
|
||||
</data>
|
||||
|
@ -5198,7 +5197,6 @@
|
|||
<data name="Quota.VPS2012.StartShutdownAllowed" xml:space="preserve">
|
||||
<value>Allow user to Start, Turn off VPS</value>
|
||||
</data>
|
||||
|
||||
<data name="Error.CreateCheckPointError" xml:space="preserve">
|
||||
<value>Error creating CheckPoint</value>
|
||||
</data>
|
||||
|
@ -5784,7 +5782,7 @@
|
|||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_VIEW_SESSION" xml:space="preserve">
|
||||
<value>View session error</value>
|
||||
</data>
|
||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_CONTROL_SESSION" xml:space="preserve">
|
||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_CONTROL_SESSION" xml:space="preserve">
|
||||
<value>Control session error</value>
|
||||
</data>
|
||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve">
|
||||
|
@ -5805,4 +5803,7 @@
|
|||
<data name="Error.UNABLETOLOADPASSWORDSETTINGS" xml:space="preserve">
|
||||
<value>Unable to load password settings</value>
|
||||
</data>
|
||||
<data name="Error.SEND_USER_PASSWORD_RESET_SMS" xml:space="preserve">
|
||||
<value>Sms was not sent.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -141,6 +141,12 @@
|
|||
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
|
||||
<value>No Changes Text Body:</value>
|
||||
</data>
|
||||
<data name="lblPasswordResetLinkSmsBody.Text" xml:space="preserve">
|
||||
<value>Password Reset Link Sms Body:</value>
|
||||
</data>
|
||||
<data name="lblPasswordResetPincodeSmsBody.Text" xml:space="preserve">
|
||||
<value>Password Reset Link Pincode Body:</value>
|
||||
</data>
|
||||
<data name="lblPriority.Text" xml:space="preserve">
|
||||
<value>Priority:</value>
|
||||
</data>
|
||||
|
|
|
@ -123,10 +123,22 @@
|
|||
<data name="locEmailAddress.Text" xml:space="preserve">
|
||||
<value>Email:</value>
|
||||
</data>
|
||||
<data name="locMobile.Text" xml:space="preserve">
|
||||
<value>Mobile</value>
|
||||
</data>
|
||||
<data name="locReason.Text" xml:space="preserve">
|
||||
<value>Reason:</value>
|
||||
</data>
|
||||
<data name="locSendTo.Text" xml:space="preserve">
|
||||
<value>Send to:</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Reset Password</value>
|
||||
</data>
|
||||
<data name="rbtnEmail.Text" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="rbtnMobile.Text" xml:space="preserve">
|
||||
<value>Mobile</value>
|
||||
</data>
|
||||
</root>
|
|
@ -4,42 +4,69 @@
|
|||
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
|
||||
-
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
|
||||
-
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
||||
</div>
|
||||
|
||||
<div class="FormBody">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150" valign="top"><asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress" ></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200"/>
|
||||
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<asp:UpdatePanel ID="PasswrodResetUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locSendTo" runat="server" meta:resourcekey="locSendTo" Text="Send to:"></asp:Localize></td>
|
||||
<td class="FormRBtnL">
|
||||
<asp:RadioButton ID="rbtnEmail" runat="server" meta:resourcekey="rbtnEmail" Text="Email" GroupName="SendToGroup" AutoPostBack="true" Checked="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||
<asp:RadioButton ID="rbtnMobile" runat="server" meta:resourcekey="rbtnMobile" Text="Mobile" GroupName="SendToGroup" AutoPostBack="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||
<br />
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EmailRow" runat="server">
|
||||
<td class="FormLabel150" valign="top">
|
||||
<asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200" />
|
||||
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="MobileRow" runat="server" visible="False">
|
||||
<td class="FormLabel150" valign="top">
|
||||
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMobile" CssClass="TextBox200" />
|
||||
<asp:RequiredFieldValidator ID="valMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="regexMobileValid" runat="server" ValidationExpression="^\+?\d+$" ValidationGroup="ResetUserPassword" ControlToValidate="txtMobile" ErrorMessage="Invalid Mobile Format"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button ID="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
|
||||
|
||||
txtEmailAddress.Text = user.PrimaryEmailAddress;
|
||||
|
||||
txtMobile.Text = user.MobilePhone;
|
||||
}
|
||||
|
||||
protected void btnResetPassoword_Click(object sender, EventArgs e)
|
||||
|
@ -35,11 +37,31 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
return;
|
||||
}
|
||||
|
||||
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text);
|
||||
if (rbtnEmail.Checked)
|
||||
{
|
||||
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID, PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
ShowErrorMessage("SEND_USER_PASSWORD_RESET_SMS");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||
(PanelRequest.Context == "Mailbox") ? "mailboxes" : "users",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
|
||||
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmailRow.Visible = rbtnEmail.Checked;
|
||||
MobileRow.Visible = !rbtnEmail.Checked;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,6 +39,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litDisplayName;
|
||||
|
||||
/// <summary>
|
||||
/// PasswrodResetUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel PasswrodResetUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// locSendTo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locSendTo;
|
||||
|
||||
/// <summary>
|
||||
/// rbtnEmail control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RadioButton rbtnEmail;
|
||||
|
||||
/// <summary>
|
||||
/// rbtnMobile control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RadioButton rbtnMobile;
|
||||
|
||||
/// <summary>
|
||||
/// EmailRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow EmailRow;
|
||||
|
||||
/// <summary>
|
||||
/// locEmailAddress control.
|
||||
/// </summary>
|
||||
|
@ -75,6 +120,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexEmailValid;
|
||||
|
||||
/// <summary>
|
||||
/// MobileRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow MobileRow;
|
||||
|
||||
/// <summary>
|
||||
/// locMobile control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locMobile;
|
||||
|
||||
/// <summary>
|
||||
/// txtMobile control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtMobile;
|
||||
|
||||
/// <summary>
|
||||
/// valMobile control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valMobile;
|
||||
|
||||
/// <summary>
|
||||
/// regexMobileValid control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexMobileValid;
|
||||
|
||||
/// <summary>
|
||||
/// locReason control.
|
||||
/// </summary>
|
||||
|
|
|
@ -41,5 +41,20 @@
|
|||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetLinkSmsBody" runat="server" meta:resourcekey="lblPasswordResetLinkSmsBody" Text="Password Reset Link Sms Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtBodyPasswordResetLinkSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetPincodeSmsBody" runat="server" meta:resourcekey="lblPasswordResetPincodeSmsBody" Text="Password Reset Link Pincode Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtPasswordResetPincodeSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
|
@ -18,6 +18,9 @@ namespace WebsitePanel.Portal
|
|||
txtHtmlBody.Text = settings["HtmlBody"];
|
||||
txtTextBody.Text = settings["TextBody"];
|
||||
txtLogoUrl.Text = settings["LogoUrl"];
|
||||
|
||||
txtBodyPasswordResetLinkSmsBody.Text = settings["PasswordResetLinkSmsBody"];
|
||||
txtPasswordResetPincodeSmsBody.Text = settings["PasswordResetPincodeSmsBody"];
|
||||
}
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
|
@ -28,6 +31,9 @@ namespace WebsitePanel.Portal
|
|||
settings["HtmlBody"] = txtHtmlBody.Text;
|
||||
settings["TextBody"] = txtTextBody.Text;
|
||||
settings["LogoUrl"] = txtLogoUrl.Text;
|
||||
|
||||
settings["PasswordResetLinkSmsBody"]= txtBodyPasswordResetLinkSmsBody.Text;
|
||||
settings["PasswordResetPincodeSmsBody"] =txtPasswordResetPincodeSmsBody.Text;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -119,5 +119,41 @@ namespace WebsitePanel.Portal {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
|
||||
|
||||
/// <summary>
|
||||
/// lblPasswordResetLinkSmsBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPasswordResetLinkSmsBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtBodyPasswordResetLinkSmsBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtBodyPasswordResetLinkSmsBody;
|
||||
|
||||
/// <summary>
|
||||
/// lblPasswordResetPincodeSmsBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPasswordResetPincodeSmsBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtPasswordResetPincodeSmsBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPasswordResetPincodeSmsBody;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue