Merge
This commit is contained in:
commit
3888f9e8cf
18 changed files with 251 additions and 23 deletions
|
@ -192,4 +192,7 @@
|
|||
<data name="TwilioSettings.Text" xml:space="preserve">
|
||||
<value>Twilio</value>
|
||||
</data>
|
||||
<data name="lblPasswordResetLinkLifeSpan.Text" xml:space="preserve">
|
||||
<value>Password Reset Link Life Span (hours):</value>
|
||||
</data>
|
||||
</root>
|
|
@ -120,6 +120,9 @@
|
|||
<data name="btnResetPassoword.Text" xml:space="preserve">
|
||||
<value>Send Password Reset Email</value>
|
||||
</data>
|
||||
<data name="chkDontSaveAsMobile.Text" xml:space="preserve">
|
||||
<value>Don't save as user mobile</value>
|
||||
</data>
|
||||
<data name="locEmailAddress.Text" xml:space="preserve">
|
||||
<value>Email:</value>
|
||||
</data>
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMobile" CssClass="TextBox200" />
|
||||
<asp:CheckBox ID="chkDontSaveAsMobile" runat="server" Text="Don't save as mobile" meta:resourcekey="chkDontSaveAsMobile" Checked="True" />
|
||||
<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>
|
||||
|
|
|
@ -39,11 +39,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (rbtnEmail.Checked)
|
||||
{
|
||||
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text, true);
|
||||
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID, PanelRequest.AccountID,
|
||||
txtReason.Text, txtEmailAddress.Text, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID, PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
|
||||
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID,
|
||||
PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
|
@ -51,6 +53,49 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if (chkDontSaveAsMobile.Checked == false)
|
||||
{
|
||||
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
|
||||
PanelRequest.AccountID);
|
||||
|
||||
ES.Services.Organizations.SetUserGeneralSettings(
|
||||
PanelRequest.ItemID, PanelRequest.AccountID,
|
||||
user.DisplayName,
|
||||
string.Empty,
|
||||
false,
|
||||
user.Disabled,
|
||||
user.Locked,
|
||||
|
||||
user.FirstName,
|
||||
user.Initials,
|
||||
user.LastName,
|
||||
|
||||
user.Address,
|
||||
user.City,
|
||||
user.State,
|
||||
user.Zip,
|
||||
user.Country,
|
||||
|
||||
user.JobTitle,
|
||||
user.Company,
|
||||
user.Department,
|
||||
user.Office,
|
||||
user.Manager == null ? null : user.Manager.AccountName,
|
||||
|
||||
user.BusinessPhone,
|
||||
user.Fax,
|
||||
user.HomePhone,
|
||||
txtMobile.Text,
|
||||
user.Pager,
|
||||
user.WebPage,
|
||||
user.Notes,
|
||||
user.ExternalEmail,
|
||||
user.SubscriberNumber,
|
||||
user.LevelId,
|
||||
user.IsVIP,
|
||||
user.UserMustChangePassword);
|
||||
}
|
||||
}
|
||||
|
||||
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||
|
|
|
@ -147,6 +147,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtMobile;
|
||||
|
||||
/// <summary>
|
||||
/// chkDontSaveAsMobile 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.CheckBox chkDontSaveAsMobile;
|
||||
|
||||
/// <summary>
|
||||
/// valMobile control.
|
||||
/// </summary>
|
||||
|
|
|
@ -92,10 +92,15 @@
|
|||
<asp:CheckBox ID="chkEnablePasswordReset" runat="server" Text="Yes" meta:resourcekey="chkEnablePasswordReset" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblPasswordResetLinkLifeSpan" runat="server" meta:resourcekey="lblPasswordResetLinkLifeSpan" />
|
||||
<td><asp:TextBox runat="server" ID="txtPasswordResetLinkLifeSpan" Width="450px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblWebdavPortalUrl" runat="server" meta:resourcekey="lblWebdavPortalUrl" />
|
||||
<td><asp:TextBox runat="server" ID="txtWebdavPortalUrl" Width="450px" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
chkEnablePasswordReset.Checked = Utils.ParseBool(settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
|
||||
txtWebdavPortalUrl.Text = settings[WEBDAV_PORTAL_URL];
|
||||
txtPasswordResetLinkLifeSpan.Text = settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN];
|
||||
}
|
||||
|
||||
// Twilio portal
|
||||
|
@ -262,6 +263,7 @@ namespace WebsitePanel.Portal
|
|||
settings = new WSP.SystemSettings();
|
||||
settings[WEBDAV_PORTAL_URL] = txtWebdavPortalUrl.Text;
|
||||
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY] = chkEnablePasswordReset.Checked.ToString();
|
||||
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN] = txtPasswordResetLinkLifeSpan.Text;
|
||||
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WEBDAV_PORTAL_SETTINGS, settings);
|
||||
|
||||
if (result < 0)
|
||||
|
|
|
@ -264,6 +264,24 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkEnablePasswordReset;
|
||||
|
||||
/// <summary>
|
||||
/// lblPasswordResetLinkLifeSpan 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 lblPasswordResetLinkLifeSpan;
|
||||
|
||||
/// <summary>
|
||||
/// txtPasswordResetLinkLifeSpan 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 txtPasswordResetLinkLifeSpan;
|
||||
|
||||
/// <summary>
|
||||
/// lblWebdavPortalUrl control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue