password request added

This commit is contained in:
vfedosevich 2015-05-08 04:57:15 -07:00
parent 584b1618f9
commit 82e7d0eb25
29 changed files with 1629 additions and 223 deletions

View file

@ -10176,6 +10176,132 @@ ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody' UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
GO GO
-- USER PASSWORD REQUEST EMAIL TEMPLATE
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'From' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'From', N'support@HostingCompany.com')
END
GO
DECLARE @OrganizationUserPasswordRequestLetterHtmlBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Password request notification</title>
<style type="text/css">
.Summary { background-color: ##ffffff; padding: 5px; }
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
.Summary A { color: ##0153A4; }
.Summary { font-family: Tahoma; font-size: 9pt; }
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
.Summary H2 { font-size: 1.3em; color: ##1F4978; }
.Summary TABLE { border: solid 1px ##e5e5e5; }
.Summary TH,
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
.Summary TD { padding: 8px; font-size: 9pt; }
.Summary UL LI { font-size: 1.1em; font-weight: bold; }
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
</style>
</head>
<body>
<div class="Summary">
<div class="Header">
<img src="#logoUrl#">
</div>
<h1>Password request notification</h1>
<ad:if test="#user#">
<p>
Hello #user.FirstName#,
</p>
</ad:if>
<p>
Your account have been created. In order to create a password for your account, please follow next link:
</p>
<a href="#passwordResetLink#" target="_blank">#passwordResetLink#</a>
<p>
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
</p>
<p>
Best regards
</p>
</div>
</body>';
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'HtmlBody', @OrganizationUserPasswordRequestLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @OrganizationUserPasswordRequestLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'HtmlBody'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'Priority' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'Priority', N'Normal')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'Subject' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'Subject', N'Password request notification')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
END
GO
DECLARE @OrganizationUserPasswordRequestLetterTextBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterTextBody = N'=========================================
Password request notification
=========================================
<ad:if test="#user#">
Hello #user.FirstName#,
</ad:if>
Your account have been created. In order to create a password for your account, please follow next link:
#passwordResetLink#
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
Best regards'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'TextBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'TextBody', @OrganizationUserPasswordRequestLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @OrganizationUserPasswordRequestLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'TextBody'
GO
DECLARE @OrganizationUserPasswordRequestLetterSMSBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterSMSBody = N'
User have been created. Password request url:
#passwordResetLink#'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'SMSBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'SMSBody', @OrganizationUserPasswordRequestLetterSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @OrganizationUserPasswordRequestLetterSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'SMSBody'
GO
-- Exchange setup EMAIL TEMPLATE -- Exchange setup EMAIL TEMPLATE

View file

@ -67,6 +67,7 @@ namespace WebsitePanel.EnterpriseServer
public const string RDS_POLICY = "RdsPolicy"; public const string RDS_POLICY = "RdsPolicy";
public const string USER_PASSWORD_EXPIRATION_LETTER = "UserPasswordExpirationLetter"; public const string USER_PASSWORD_EXPIRATION_LETTER = "UserPasswordExpirationLetter";
public const string USER_PASSWORD_RESET_LETTER = "UserPasswordResetLetter"; public const string USER_PASSWORD_RESET_LETTER = "UserPasswordResetLetter";
public const string USER_PASSWORD_REQUEST_LETTER = "OrganizationUserPasswordRequestLetter";
public const string USER_PASSWORD_RESET_PINCODE_LETTER = "UserPasswordResetPincodeLetter"; public const string USER_PASSWORD_RESET_PINCODE_LETTER = "UserPasswordResetPincodeLetter";
public const string HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy"; public const string HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy";

View file

@ -12,7 +12,6 @@
// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // This source code was auto-generated by wsdl, Version=2.0.50727.3038.
// //
using WebsitePanel.EnterpriseServer.Base.HostedSolution; using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers; using WebsitePanel.Providers;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
@ -37,6 +36,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol { public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol {
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted; private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted; private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted;
@ -93,6 +96,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeEmailOperationCompleted; private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeEmailOperationCompleted;
private System.Threading.SendOrPostCallback SendUserPasswordRequestSmsOperationCompleted;
private System.Threading.SendOrPostCallback SendUserPasswordRequestEmailOperationCompleted;
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted; private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted; private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
@ -165,15 +172,17 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback GetSupportServiceLevelsOperationCompleted; private System.Threading.SendOrPostCallback GetSupportServiceLevelsOperationCompleted;
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
/// <remarks/> /// <remarks/>
public esOrganizations() { public esOrganizations() {
this.Url = "http://localhost:9002/esOrganizations.asmx"; this.Url = "http://localhost:9002/esOrganizations.asmx";
} }
/// <remarks/>
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted;
/// <remarks/>
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
/// <remarks/> /// <remarks/>
public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted; public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted;
@ -258,6 +267,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/> /// <remarks/>
public event SendResetUserPasswordPincodeEmailCompletedEventHandler SendResetUserPasswordPincodeEmailCompleted; public event SendResetUserPasswordPincodeEmailCompletedEventHandler SendResetUserPasswordPincodeEmailCompleted;
/// <remarks/>
public event SendUserPasswordRequestSmsCompletedEventHandler SendUserPasswordRequestSmsCompleted;
/// <remarks/>
public event SendUserPasswordRequestEmailCompletedEventHandler SendUserPasswordRequestEmailCompleted;
/// <remarks/> /// <remarks/>
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted; public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
@ -367,10 +382,90 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
public event GetSupportServiceLevelsCompletedEventHandler GetSupportServiceLevelsCompleted; public event GetSupportServiceLevelsCompletedEventHandler GetSupportServiceLevelsCompleted;
/// <remarks/> /// <remarks/>
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted; [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
this.Invoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription});
}
/// <remarks/> /// <remarks/>
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted; public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
}
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
if ((this.UpdateSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject DeleteSupportServiceLevel(int levelId) {
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
levelId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
levelId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId) {
this.DeleteSupportServiceLevelAsync(levelId, null);
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
}
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
if ((this.DeleteSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1603,6 +1698,107 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestSms", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo) {
object[] results = this.Invoke("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndSendUserPasswordRequestSms(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo) {
this.SendUserPasswordRequestSmsAsync(itemId, accountId, reason, phoneTo, null);
}
/// <remarks/>
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo, object userState) {
if ((this.SendUserPasswordRequestSmsOperationCompleted == null)) {
this.SendUserPasswordRequestSmsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestSmsOperationCompleted);
}
this.InvokeAsync("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo}, this.SendUserPasswordRequestSmsOperationCompleted, userState);
}
private void OnSendUserPasswordRequestSmsOperationCompleted(object arg) {
if ((this.SendUserPasswordRequestSmsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SendUserPasswordRequestSmsCompleted(this, new SendUserPasswordRequestSmsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
this.Invoke("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep});
}
/// <remarks/>
public System.IAsyncResult BeginSendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep}, callback, asyncState);
}
/// <remarks/>
public void EndSendUserPasswordRequestEmail(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
this.SendUserPasswordRequestEmailAsync(itemId, accountId, reason, mailTo, finalStep, null);
}
/// <remarks/>
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep, object userState) {
if ((this.SendUserPasswordRequestEmailOperationCompleted == null)) {
this.SendUserPasswordRequestEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestEmailOperationCompleted);
}
this.InvokeAsync("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep}, this.SendUserPasswordRequestEmailOperationCompleted, userState);
}
private void OnSendUserPasswordRequestEmailOperationCompleted(object arg) {
if ((this.SendUserPasswordRequestEmailCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SendUserPasswordRequestEmailCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddOrganizationDomain(int itemId, string domainName) { public int AddOrganizationDomain(int itemId, string domainName) {
@ -3517,98 +3713,42 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
this.Invoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription});
}
/// <remarks/>
public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
}
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
if ((this.UpdateSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject DeleteSupportServiceLevel(int levelId) {
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
levelId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
levelId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId) {
this.DeleteSupportServiceLevelAsync(levelId, null);
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
}
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
if ((this.DeleteSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e); public delegate void AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e);
@ -4227,6 +4367,36 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendUserPasswordRequestSmsCompletedEventHandler(object sender, SendUserPasswordRequestSmsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendUserPasswordRequestSmsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SendUserPasswordRequestSmsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendUserPasswordRequestEmailCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e); public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
@ -5096,34 +5266,4 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
} }

View file

@ -31,6 +31,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetSystemSettingsActiveOperationCompleted; private System.Threading.SendOrPostCallback GetSystemSettingsActiveOperationCompleted;
private System.Threading.SendOrPostCallback CheckIsTwilioEnabledOperationCompleted;
private System.Threading.SendOrPostCallback SetSystemSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetSystemSettingsOperationCompleted;
/// <remarks/> /// <remarks/>
@ -44,6 +46,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event GetSystemSettingsActiveCompletedEventHandler GetSystemSettingsActiveCompleted; public event GetSystemSettingsActiveCompletedEventHandler GetSystemSettingsActiveCompleted;
/// <remarks/>
public event CheckIsTwilioEnabledCompletedEventHandler CheckIsTwilioEnabledCompleted;
/// <remarks/> /// <remarks/>
public event SetSystemSettingsCompletedEventHandler SetSystemSettingsCompleted; public event SetSystemSettingsCompletedEventHandler SetSystemSettingsCompleted;
@ -132,6 +137,44 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckIsTwilioEnabled", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool CheckIsTwilioEnabled() {
object[] results = this.Invoke("CheckIsTwilioEnabled", new object[0]);
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCheckIsTwilioEnabled(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CheckIsTwilioEnabled", new object[0], callback, asyncState);
}
/// <remarks/>
public bool EndCheckIsTwilioEnabled(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void CheckIsTwilioEnabledAsync() {
this.CheckIsTwilioEnabledAsync(null);
}
/// <remarks/>
public void CheckIsTwilioEnabledAsync(object userState) {
if ((this.CheckIsTwilioEnabledOperationCompleted == null)) {
this.CheckIsTwilioEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckIsTwilioEnabledOperationCompleted);
}
this.InvokeAsync("CheckIsTwilioEnabled", new object[0], this.CheckIsTwilioEnabledOperationCompleted, userState);
}
private void OnCheckIsTwilioEnabledOperationCompleted(object arg) {
if ((this.CheckIsTwilioEnabledCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CheckIsTwilioEnabledCompleted(this, new CheckIsTwilioEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSystemSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSystemSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int SetSystemSettings(string settingsName, SystemSettings settings) { public int SetSystemSettings(string settingsName, SystemSettings settings) {
@ -234,6 +277,32 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CheckIsTwilioEnabledCompletedEventHandler(object sender, CheckIsTwilioEnabledCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckIsTwilioEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal CheckIsTwilioEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetSystemSettingsCompletedEventHandler(object sender, SetSystemSettingsCompletedEventArgs e); public delegate void SetSystemSettingsCompletedEventHandler(object sender, SetSystemSettingsCompletedEventArgs e);

View file

@ -1632,6 +1632,73 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
public static ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo = null)
{
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_REQUEST_SMS",
itemId);
try
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
{
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
user.ItemId = itemId;
if (string.IsNullOrEmpty(phoneTo))
{
phoneTo = user.MobilePhone;
}
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_REQUEST_LETTER);
string body = settings["SMSBody"];
var pincode = GeneratePincode();
Guid token;
var items = new Hashtable();
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId, out token, pincode);
body = PackageController.EvaluateTemplate(body, items);
TaskManager.Write("Organization ID : " + user.ItemId);
TaskManager.Write("Account : " + user.DisplayName);
TaskManager.Write("Reason : " + reason);
TaskManager.Write("SmsTo : " + phoneTo);
// send Sms message
var response = SendSms(phoneTo, body);
if (response.RestException != null)
{
throw new Exception(response.RestException.Message);
}
SetAccessTokenResponse(token, pincode);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
TaskManager.CompleteResultTask(result);
result.AddError("", ex);
return result;
}
TaskManager.CompleteResultTask();
return result;
}
public static ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null) public static ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null)
{ {
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS_PINCODE"); var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS_PINCODE");
@ -1851,6 +1918,33 @@ namespace WebsitePanel.EnterpriseServer
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER", finalStep); SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER", finalStep);
} }
public static void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
{
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
user.ItemId = itemId;
if (string.IsNullOrEmpty(mailTo))
{
mailTo = user.PrimaryEmailAddress;
}
var generalSettings = OrganizationController.GetOrganizationGeneralSettings(itemId);
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_REQUEST_LETTER, "USER_PASSWORD_REQUEST_LETTER", finalStep);
}
public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason, public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
string mailTo, string logoUrl) string mailTo, string logoUrl)
{ {
@ -1919,8 +2013,6 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type) public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
{ {
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type)); return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));

View file

@ -202,5 +202,15 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.CompleteTask(); TaskManager.CompleteTask();
} }
} }
public static bool CheckIsTwilioEnabled()
{
var settings = SystemController.GetSystemSettingsActive(SystemSettings.TWILIO_SETTINGS, false);
return settings != null
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty))
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty))
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty));
}
} }
} }

View file

@ -211,6 +211,18 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod]
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo)
{
return OrganizationController.SendUserPasswordRequestSms(itemId, accountId, reason, phoneTo);
}
[WebMethod]
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
{
OrganizationController.SendUserPasswordRequestEmail(itemId, accountId, reason, mailTo, finalStep);
}
#endregion #endregion
#region Domains #region Domains

View file

@ -59,6 +59,12 @@ namespace WebsitePanel.EnterpriseServer
return SystemController.GetSystemSettingsActive(settingsName, decrypt); return SystemController.GetSystemSettingsActive(settingsName, decrypt);
} }
[WebMethod]
public bool CheckIsTwilioEnabled()
{
return SystemController.CheckIsTwilioEnabled();
}
[WebMethod] [WebMethod]
public int SetSystemSettings(string settingsName, SystemSettings settings) public int SetSystemSettings(string settingsName, SystemSettings settings)
{ {

View file

@ -88,11 +88,11 @@ namespace WebsitePanel.WebDavPortal.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Address Inforamtion. /// Looks up a localized string similar to Address Information.
/// </summary> /// </summary>
public static string AddressInforamtion { public static string AddressInformation {
get { get {
return ResourceManager.GetString("AddressInforamtion", resourceCulture); return ResourceManager.GetString("AddressInformation", resourceCulture);
} }
} }

View file

@ -123,8 +123,8 @@
<data name="Address" xml:space="preserve"> <data name="Address" xml:space="preserve">
<value>Address</value> <value>Address</value>
</data> </data>
<data name="AddressInforamtion" xml:space="preserve"> <data name="AddressInformation" xml:space="preserve">
<value>Address Inforamtion</value> <value>Address Information</value>
</data> </data>
<data name="Back" xml:space="preserve"> <data name="Back" xml:space="preserve">
<value>Back</value> <value>Back</value>

View file

@ -169,7 +169,7 @@
<div class="panel-heading" role="tab" id="heading-address-information"> <div class="panel-heading" role="tab" id="heading-address-information">
<h4 class="panel-title"> <h4 class="panel-title">
<a class="collapsed" data-toggle="collapse" href="#address-information" aria-expanded="false" aria-controls="address-information"> <a class="collapsed" data-toggle="collapse" href="#address-information" aria-expanded="false" aria-controls="address-information">
@UI.AddressInforamtion @UI.AddressInformation
</a> </a>
</h4> </h4>
</div> </div>

View file

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ddlPriorityItem.High" xml:space="preserve">
<value>High</value>
</data>
<data name="ddlPriorityItem.Low" xml:space="preserve">
<value>Low</value>
</data>
<data name="ddlPriorityItem.Normal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="lblFrom.Text" xml:space="preserve">
<value>From:</value>
</data>
<data name="lblHtmlBody.Text" xml:space="preserve">
<value>HTML Body:</value>
</data>
<data name="lblLogoUrl.Text" xml:space="preserve">
<value>Logo Url:</value>
</data>
<data name="lblNoChangesHtmlBody" xml:space="preserve">
<value>No Changes HTML Body:</value>
</data>
<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>
<data name="lblSubject.Text" xml:space="preserve">
<value>Subject:</value>
</data>
<data name="lblTextBody.Text" xml:space="preserve">
<value>Text Body:</value>
</data>
<data name="lblSmsBody.Text" xml:space="preserve">
<value>SMS</value>
</data>
</root>

View file

@ -159,4 +159,7 @@
<data name="lnkOrganizationUserPasswordResetPincodeLetter.Text" xml:space="preserve"> <data name="lnkOrganizationUserPasswordResetPincodeLetter.Text" xml:space="preserve">
<value>Organization User Password Reset Pincode Letter</value> <value>Organization User Password Reset Pincode Letter</value>
</data> </data>
<data name="lnkOrganizationUserPasswordRequestLetter.Text" xml:space="preserve">
<value>Organization User Password Request Letter</value>
</data>
</root> </root>

View file

@ -8,6 +8,7 @@
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %> <%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> <wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -113,6 +114,11 @@
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" /> <asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
</td> </td>
</tr> </tr>
<tr>
<td colspan="2">
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="password"></wsp:SendToControl>
</td>
</tr>
<tr> <tr>
<td class="FormLabel150" valign="top"><asp:Localize ID="locMailboxType" runat="server" meta:resourcekey="locMailboxType" Text="Choose mailbox type:"></asp:Localize></td> <td class="FormLabel150" valign="top"><asp:Localize ID="locMailboxType" runat="server" meta:resourcekey="locMailboxType" Text="Choose mailbox type:"></asp:Localize></td>
<td> <td>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Web.Security;
using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
@ -161,12 +162,19 @@ namespace WebsitePanel.Portal.ExchangeServer
string subscriberNumber = IsNewUser ? txtSubscriberNumber.Text.Trim() : userSelector.GetSubscriberNumber(); string subscriberNumber = IsNewUser ? txtSubscriberNumber.Text.Trim() : userSelector.GetSubscriberNumber();
var passwordString = password.Password;
if (sendToControl.IsRequestSend && IsNewUser)
{
passwordString = Membership.GeneratePassword(16, 3);
}
accountId = ES.Services.ExchangeServer.CreateMailbox(PanelRequest.ItemID, accountId, type, accountId = ES.Services.ExchangeServer.CreateMailbox(PanelRequest.ItemID, accountId, type,
accountName, accountName,
displayName, displayName,
name, name,
domain, domain,
password.Password, passwordString,
chkSendInstructions.Checked, chkSendInstructions.Checked,
sendInstructionEmail.Text, sendInstructionEmail.Text,
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId), Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
@ -187,6 +195,15 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
} }
if (sendToControl.SendEmail && IsNewUser)
{
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
}
else if (sendToControl.SendMobile && IsNewUser)
{
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
}
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "mailbox_settings", Response.Redirect(EditUrl("AccountID", accountId.ToString(), "mailbox_settings",
"SpaceID=" + PanelSecurity.PackageId.ToString(), "SpaceID=" + PanelSecurity.PackageId.ToString(),
"ItemID=" + PanelRequest.ItemID.ToString())); "ItemID=" + PanelRequest.ItemID.ToString()));

View file

@ -255,6 +255,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword; protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword;
/// <summary>
/// sendToControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
/// <summary> /// <summary>
/// locMailboxType control. /// locMailboxType control.
/// </summary> /// </summary>

View file

@ -5,106 +5,118 @@
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EmailControl.ascx" TagName="EmailControl" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EmailControl.ascx" TagName="EmailControl" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> <wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div runat="server" id="divWrapper"> <div runat="server" id="divWrapper">
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
function buildDisplayName() { function buildDisplayName() {
document.getElementById("<%= txtDisplayName.ClientID %>").value = ''; document.getElementById("<%= txtDisplayName.ClientID %>").value = '';
if (document.getElementById("<%= txtFirstName.ClientID %>").value != '') if (document.getElementById("<%= txtFirstName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' '; document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' ';
if (document.getElementById("<%= txtInitials.ClientID %>").value != '') if (document.getElementById("<%= txtInitials.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' '; document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' ';
if (document.getElementById("<%= txtLastName.ClientID %>").value != '') if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value; document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
} }
</script> </script>
</div> </div>
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">
<div class="Title"> <div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" /> <asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize> <asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize>
</div> </div>
<div class="FormBody"> <asp:UpdatePanel ID="CreateUserUpdatePanel" runat="server" UpdateMode="Conditional">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <ContentTemplate>
<table> <div class="FormBody">
<tr> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<td class="FormLabel150"><asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td> <table>
<td> <tr>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();" ></asp:TextBox> <td class="FormLabel150">
&nbsp; <asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td>
<td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
&nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" />
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox> <asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="FormLabel150"><asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td> <td class="FormLabel150">
<td> <asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td>
<asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox> <td>
</td> <asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox>
</tr> </td>
<tr> </tr>
<td class="FormLabel150"><asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td> <tr>
<td> <td class="FormLabel150">
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox> <asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName" <td>
ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator> <asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
</td> <asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
</tr> ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<tr> </td>
<td class="FormLabel150"><asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td> </tr>
<td> <tr>
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox> <td class="FormLabel150">
<asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber" <asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td>
ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator> <td>
</td> <asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
</tr> <asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber"
<tr> ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<td class="FormLabel150"><asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td> </td>
<td> </tr>
<wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox"> <tr>
</wsp:EmailAddress> <td class="FormLabel150">
</td> <asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td>
</tr> <td>
<tr> <wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox">
<td class="FormLabel150" valign="top"><asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td> </wsp:EmailAddress>
<td> </td>
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true" > </tr>
</wsp:PasswordControl> <tr>
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" /> <td class="FormLabel150" valign="top">
</td> <asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
</tr> <td>
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true">
</table> </wsp:PasswordControl>
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
</td>
</tr>
</table>
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="password"></wsp:SendToControl>
<table>
<tr> <table>
<td class="FormLabel150"> <tr>
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" /> <td class="FormLabel150">
</td> <asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
<td><wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td> </td>
</tr> <td>
</table> <wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
</tr>
<div class="FormFooterClean"> </table>
<asp:Button id="btnCreate" runat="server" Text="Create Mailbox"
CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
OnClick="btnCreate_Click"
OnClientClick="ShowProgressDialog('Creating mailbox...');"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
</div> </div>
</div> </ContentTemplate>
</div> </asp:UpdatePanel>
</div> <div class="FormFooterClean">
</div> <asp:Button ID="btnCreate" runat="server" Text="Create Mailbox"
</div> CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
OnClick="btnCreate_Click"
OnClientClick="ShowProgressDialog('Creating user...');"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
</div>
</div>
</div>
</div>
</div>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Web.Security;
using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
@ -98,10 +99,17 @@ namespace WebsitePanel.Portal.HostedSolution
try try
{ {
var passwordString = password.Password;
if (sendToControl.IsRequestSend)
{
passwordString = Membership.GeneratePassword(16, 3);
}
int accountId = ES.Services.Organizations.CreateUser(PanelRequest.ItemID, txtDisplayName.Text.Trim(), int accountId = ES.Services.Organizations.CreateUser(PanelRequest.ItemID, txtDisplayName.Text.Trim(),
email.AccountName.ToLower(), email.AccountName.ToLower(),
email.DomainName.ToLower(), email.DomainName.ToLower(),
password.Password, passwordString,
txtSubscriberNumber.Text.Trim(), txtSubscriberNumber.Text.Trim(),
chkSendInstructions.Checked, chkSendInstructions.Checked,
sendInstructionEmail.Text); sendInstructionEmail.Text);
@ -119,6 +127,15 @@ namespace WebsitePanel.Portal.HostedSolution
} }
} }
if (sendToControl.SendEmail)
{
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
}
else if (sendToControl.SendMobile)
{
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
}
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_user", Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_user",
"SpaceID=" + PanelSecurity.PackageId, "SpaceID=" + PanelSecurity.PackageId,
"ItemID=" + PanelRequest.ItemID, "ItemID=" + PanelRequest.ItemID,

View file

@ -48,6 +48,15 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle; protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// CreateUserUpdatePanel 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 CreateUserUpdatePanel;
/// <summary> /// <summary>
/// messageBox control. /// messageBox control.
/// </summary> /// </summary>
@ -210,6 +219,15 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword; protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword;
/// <summary>
/// sendToControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
/// <summary> /// <summary>
/// chkSendInstructions control. /// chkSendInstructions control.
/// </summary> /// </summary>

View file

@ -0,0 +1,55 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordRequestLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordRequestLetter" %>
<table>
<tr>
<td class="SubHead" width="150" nowrap><asp:Label ID="lblFrom" runat="server" meta:resourcekey="lblFrom" Text="From:"></asp:Label></td>
<td class="Normal" width="100%">
<asp:TextBox ID="txtFrom" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblSubject" runat="server" meta:resourcekey="lblSubject" Text="Subject:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtSubject" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblPriority" runat="server" meta:resourcekey="lblPriority" Text="Priority"></asp:Label></td>
<td class="Normal">
<asp:DropDownList ID="ddlPriority" runat="server" CssClass="NormalTextBox" resourcekey="ddlPriority">
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Normal">Normal</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblLogoUrl" runat="server" meta:resourcekey="lblLogoUrl" Text="Logo Url:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtLogoUrl" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblHtmlBody" runat="server" meta:resourcekey="lblHtmlBody" Text="HTML Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtHtmlBody" 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="lblTextBody" runat="server" meta:resourcekey="lblTextBody" Text="Text Body:"></asp:Label></td>
</tr>
<tr>
<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="lblSmsBody" runat="server" meta:resourcekey="lblSmsBody" Text="SMS Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal
{
public partial class SettingsUserPasswordRequestLetter : WebsitePanelControlBase, IUserSettingsEditorControl
{
public void BindSettings(UserSettings settings)
{
txtFrom.Text = settings["From"];
txtSubject.Text = settings["Subject"];
Utils.SelectListItem(ddlPriority, settings["Priority"]);
txtHtmlBody.Text = settings["HtmlBody"];
txtTextBody.Text = settings["TextBody"];
txtLogoUrl.Text = settings["LogoUrl"];
txtSmsBody.Text = settings["SMSBody"];
}
public void SaveSettings(UserSettings settings)
{
settings["From"] = txtFrom.Text;
settings["Subject"] = txtSubject.Text;
settings["Priority"] = ddlPriority.SelectedValue;
settings["HtmlBody"] = txtHtmlBody.Text;
settings["TextBody"] = txtTextBody.Text;
settings["LogoUrl"] = txtLogoUrl.Text;
settings["SMSBody"] = txtSmsBody.Text;
}
}
}

View file

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SettingsUserPasswordRequestLetter {
/// <summary>
/// lblFrom 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 lblFrom;
/// <summary>
/// txtFrom 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 txtFrom;
/// <summary>
/// lblSubject 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 lblSubject;
/// <summary>
/// txtSubject 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 txtSubject;
/// <summary>
/// lblPriority 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 lblPriority;
/// <summary>
/// ddlPriority 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.DropDownList ddlPriority;
/// <summary>
/// lblLogoUrl 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 lblLogoUrl;
/// <summary>
/// txtLogoUrl 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 txtLogoUrl;
/// <summary>
/// lblHtmlBody 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 lblHtmlBody;
/// <summary>
/// txtHtmlBody 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 txtHtmlBody;
/// <summary>
/// lblTextBody 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 lblTextBody;
/// <summary>
/// txtTextBody 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 txtTextBody;
/// <summary>
/// lblSmsBody 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 lblSmsBody;
/// <summary>
/// txtSmsBody 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 txtSmsBody;
}
}

View file

@ -54,6 +54,10 @@
<asp:HyperLink ID="lnkOrganizationUserPasswordResetPincodeLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetPincodeLetter" <asp:HyperLink ID="lnkOrganizationUserPasswordResetPincodeLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetPincodeLetter"
Text="User Password Reset Pincode Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetPincodeLetter", "SettingsUserPasswordResetPincodeLetter") %>'></asp:HyperLink> Text="User Password Reset Pincode Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetPincodeLetter", "SettingsUserPasswordResetPincodeLetter") %>'></asp:HyperLink>
</li> </li>
<li>
<asp:HyperLink ID="HyperLink3" runat="server" meta:resourcekey="lnkOrganizationUserPasswordRequestLetter"
Text="Organization User Password Request Letter" NavigateUrl='<%# GetSettingsLink("OrganizationUserPasswordRequestLetter", "SettingsUserPasswordRequestLetter") %>'></asp:HyperLink>
</li>
</ul> </ul>
</div> </div>
<div class="FormFooter"> <div class="FormFooter">

View file

@ -129,6 +129,15 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetPincodeLetter; protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetPincodeLetter;
/// <summary>
/// HyperLink3 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.HyperLink HyperLink3;
/// <summary> /// <summary>
/// btnCancel control. /// btnCancel control.
/// </summary> /// </summary>

View file

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnResetPassoword.Text" xml:space="preserve">
<value>Send Password Reset Email</value>
</data>
<data name="chkSaveAsMobile.Text" xml:space="preserve">
<value>Save as user mobile</value>
</data>
<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>
<data name="chkSendPasswordResetEmail.Text" xml:space="preserve">
<value>Send Password Request</value>
</data>
</root>

View file

@ -0,0 +1,52 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SendToControl.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.SendToControl" %>
<table id="send-to-table">
<tr>
<td class="FormLabel150"></td>
<td>
<asp:CheckBox ID="chkSendPasswordResetEmail" runat="server" meta:resourcekey="chkSendPasswordResetEmail" Text="Send Password Request" AutoPostBack="true" Checked="false" OnCheckedChanged="chkSendPasswordResetEmail_StateChanged" />
</td>
</tr>
<tbody id="SendToBody" runat="server" visible="False">
<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="HugeTextBox200" />
<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="HugeTextBox200" />
<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>
</tbody>
</table>
<div runat="server" id="divWrapper">
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("#send-to-table input").live("click", function (e) {
DisableProgressDialog();
});
});
</script>
</div>

View file

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebsitePanel.Portal.UserControls
{
public partial class SendToControl : WebsitePanelControlBase
{
public string ValidationGroup
{
get { return valEmailAddress.ValidationGroup; }
set
{
valEmailAddress.ValidationGroup = value;
regexEmailValid.ValidationGroup = value;
valMobile.ValidationGroup = value;
regexMobileValid.ValidationGroup = value;
}
}
public bool IsRequestSend
{
get { return chkSendPasswordResetEmail.Checked; }
}
public bool SendEmail
{
get { return chkSendPasswordResetEmail.Checked && rbtnEmail.Checked; }
}
public bool SendMobile
{
get { return chkSendPasswordResetEmail.Checked && rbtnMobile.Checked; }
}
public string Email
{
get { return txtEmailAddress.Text; }
}
public string Mobile
{
get { return txtMobile.Text; }
}
public string ControlToHide { get; set; }
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
{
EmailRow.Visible = rbtnEmail.Checked;
MobileRow.Visible = !rbtnEmail.Checked;
}
protected void chkSendPasswordResetEmail_StateChanged(object sender, EventArgs e)
{
SendToBody.Visible = chkSendPasswordResetEmail.Checked;
if (!string.IsNullOrEmpty(ControlToHide))
{
var control = Parent.FindControl(ControlToHide);
if (control != null)
{
control.Visible = !chkSendPasswordResetEmail.Checked;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
var isTwilioEnabled = ES.Services.System.CheckIsTwilioEnabled();
rbtnMobile.Visible = isTwilioEnabled;
}
}
}

View file

@ -0,0 +1,159 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.UserControls {
public partial class SendToControl {
/// <summary>
/// chkSendPasswordResetEmail 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 chkSendPasswordResetEmail;
/// <summary>
/// SendToBody 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.HtmlGenericControl SendToBody;
/// <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>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locEmailAddress;
/// <summary>
/// txtEmailAddress 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 txtEmailAddress;
/// <summary>
/// valEmailAddress 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 valEmailAddress;
/// <summary>
/// regexEmailValid 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 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>
/// divWrapper 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.HtmlGenericControl divWrapper;
}
}

View file

@ -332,6 +332,20 @@
<Compile Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx.designer.cs"> <Compile Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx.designer.cs">
<DependentUpon>HostedSharePointEnterpriseStorageUsage.ascx</DependentUpon> <DependentUpon>HostedSharePointEnterpriseStorageUsage.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="SettingsUserPasswordRequestLetter.ascx.cs">
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsUserPasswordRequestLetter.ascx.designer.cs">
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
</Compile>
<Compile Include="UserControls\SendToControl.ascx.cs">
<DependentUpon>SendToControl.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UserControls\SendToControl.ascx.designer.cs">
<DependentUpon>SendToControl.ascx</DependentUpon>
</Compile>
<Compile Include="VpsMenu.ascx.cs"> <Compile Include="VpsMenu.ascx.cs">
<DependentUpon>VpsMenu.ascx</DependentUpon> <DependentUpon>VpsMenu.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -4901,6 +4915,8 @@
<Content Include="HostedSharePoint\HostedSharePointEnterpriseRestoreSiteCollection.ascx" /> <Content Include="HostedSharePoint\HostedSharePointEnterpriseRestoreSiteCollection.ascx" />
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageSettings.ascx" /> <Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageSettings.ascx" />
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx" /> <Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx" />
<Content Include="SettingsUserPasswordRequestLetter.ascx" />
<Content Include="UserControls\SendToControl.ascx" />
<Content Include="VpsMenu.ascx" /> <Content Include="VpsMenu.ascx" />
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" /> <Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
<Content Include="SearchObject.ascx" /> <Content Include="SearchObject.ascx" />
@ -5026,6 +5042,9 @@
<Content Include="App_LocalResources\VpsMenu.ascx.resx"> <Content Include="App_LocalResources\VpsMenu.ascx.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<Content Include="App_LocalResources\SettingsUserPasswordRequestLetter.ascx.resx">
<SubType>Designer</SubType>
</Content>
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" /> <EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
<Content Include="RDSServersEditServer.ascx" /> <Content Include="RDSServersEditServer.ascx" />
<Content Include="RDS\AssignedRDSServers.ascx" /> <Content Include="RDS\AssignedRDSServers.ascx" />
@ -5225,6 +5244,7 @@
<Content Include="UserControls\App_LocalResources\MailAccountActions.ascx.resx" /> <Content Include="UserControls\App_LocalResources\MailAccountActions.ascx.resx" />
<Content Include="ScheduleTaskControls\App_LocalResources\UserPasswordExpirationNotificationView.ascx.resx" /> <Content Include="ScheduleTaskControls\App_LocalResources\UserPasswordExpirationNotificationView.ascx.resx" />
<Content Include="SkinControls\App_LocalResources\SearchObject.ascx.resx" /> <Content Include="SkinControls\App_LocalResources\SearchObject.ascx.resx" />
<Content Include="UserControls\App_LocalResources\SendToControl.ascx.resx" />
<EmbeddedResource Include="UserControls\App_LocalResources\WebsiteActions.ascx.resx" /> <EmbeddedResource Include="UserControls\App_LocalResources\WebsiteActions.ascx.resx" />
<Content Include="VPS\UserControls\App_LocalResources\Generation.ascx.resx"> <Content Include="VPS\UserControls\App_LocalResources\Generation.ascx.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>