|
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
index 5608b564..e9926fae 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.Web.Security;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
@@ -161,12 +162,19 @@ namespace WebsitePanel.Portal.ExchangeServer
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,
accountName,
displayName,
name,
domain,
- password.Password,
+ passwordString,
chkSendInstructions.Checked,
sendInstructionEmail.Text,
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",
"SpaceID=" + PanelSecurity.PackageId.ToString(),
"ItemID=" + PanelRequest.ItemID.ToString()));
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs
index 013a6f68..7b1646f4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.designer.cs
@@ -255,6 +255,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
///
protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword;
+ ///
+ /// sendToControl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
+
///
/// locMailboxType control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx
index a69cef4f..cb861a3b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx
@@ -5,106 +5,118 @@
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EmailControl.ascx" TagName="EmailControl" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
-
+ if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
+ document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
+ }
+
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
-
- |
-
-
- |
-
-
-
- |
-
-
- |
-
-
-
- |
-
-
- |
-
-
-
-
- |
-
-
-
+
+ |
+
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
index 217ac7f0..9bb7ba68 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.Web.Security;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution;
@@ -98,10 +99,17 @@ namespace WebsitePanel.Portal.HostedSolution
try
{
+ var passwordString = password.Password;
+
+ if (sendToControl.IsRequestSend)
+ {
+ passwordString = Membership.GeneratePassword(16, 3);
+ }
+
int accountId = ES.Services.Organizations.CreateUser(PanelRequest.ItemID, txtDisplayName.Text.Trim(),
email.AccountName.ToLower(),
email.DomainName.ToLower(),
- password.Password,
+ passwordString,
txtSubscriberNumber.Text.Trim(),
chkSendInstructions.Checked,
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",
"SpaceID=" + PanelSecurity.PackageId,
"ItemID=" + PanelRequest.ItemID,
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs
index 727d7527..adf1b0c0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.designer.cs
@@ -48,6 +48,15 @@ namespace WebsitePanel.Portal.HostedSolution {
///
protected global::System.Web.UI.WebControls.Localize locTitle;
+ ///
+ /// CreateUserUpdatePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel CreateUserUpdatePanel;
+
///
/// messageBox control.
///
@@ -210,6 +219,15 @@ namespace WebsitePanel.Portal.HostedSolution {
///
protected global::System.Web.UI.WebControls.CheckBox chkUserMustChangePassword;
+ ///
+ /// sendToControl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
+
///
/// chkSendInstructions control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx
new file mode 100644
index 00000000..a8eb6054
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx
@@ -0,0 +1,55 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordRequestLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordRequestLetter" %>
+
+
+
+
+
+
+ |
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ High
+ Normal
+ Low
+
+ |
+
+
+ |
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
+
|
+
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.cs
new file mode 100644
index 00000000..7a1e2596
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.cs
@@ -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;
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.designer.cs
new file mode 100644
index 00000000..69efede1
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordRequestLetter.ascx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal {
+
+
+ public partial class SettingsUserPasswordRequestLetter {
+
+ ///
+ /// lblFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblFrom;
+
+ ///
+ /// txtFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtFrom;
+
+ ///
+ /// lblSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSubject;
+
+ ///
+ /// txtSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSubject;
+
+ ///
+ /// lblPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPriority;
+
+ ///
+ /// ddlPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
+
+ ///
+ /// lblLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblLogoUrl;
+
+ ///
+ /// txtLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtLogoUrl;
+
+ ///
+ /// lblHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblHtmlBody;
+
+ ///
+ /// txtHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
+
+ ///
+ /// lblTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTextBody;
+
+ ///
+ /// txtTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtTextBody;
+
+ ///
+ /// lblSmsBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSmsBody;
+
+ ///
+ /// txtSmsBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSmsBody;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
index dd09fdc8..8351143e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
@@ -54,6 +54,10 @@
+
+
+
|