diff --git a/Disco.Data/Configuration/SystemConfiguration.cs b/Disco.Data/Configuration/SystemConfiguration.cs index 8b2bb1f9..41286fc7 100644 --- a/Disco.Data/Configuration/SystemConfiguration.cs +++ b/Disco.Data/Configuration/SystemConfiguration.cs @@ -271,6 +271,39 @@ namespace Disco.Data.Configuration } #endregion + #region Email Configuration + public string EmailSmtpServer + { + get => Get(null); + set => Set(value); + } + public int EmailSmtpPort + { + get => Get(25); + set => Set(value); + } + public bool EmailEnableSsl + { + get => Get(false); + set => Set(value); + } + public string EmailFromAddress + { + get => Get(null); + set => Set(value); + } + public string EmailUsername + { + get => Get(null); + set => Set(value); + } + public string EmailPassword + { + get => GetDeobsfucated(null); + set => SetObsfucated(value); + } + #endregion + #region UpdateCheck public string DeploymentId { diff --git a/Disco.Models/Disco.Models.csproj b/Disco.Models/Disco.Models.csproj index 00621ad7..0348aff9 100644 --- a/Disco.Models/Disco.Models.csproj +++ b/Disco.Models/Disco.Models.csproj @@ -143,6 +143,8 @@ + + diff --git a/Disco.Models/Services/Messaging/Email.cs b/Disco.Models/Services/Messaging/Email.cs new file mode 100644 index 00000000..68ef4ecf --- /dev/null +++ b/Disco.Models/Services/Messaging/Email.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace Disco.Models.Services.Messaging +{ + public class Email + { + public string From { get; set; } + public List To { get; } = new List(); + public List CC { get; } = new List(); + public List BCC { get; } = new List(); + + public string Subject { get; set; } + public bool IsBodyHtml { get; set; } + public string Body { get; set; } + + public List Attachments { get; } = new List(); + + public Email() + { + } + + public Email(string to, string subject, string body) + : this() + { + To.Add(to); + Subject = subject; + Body = body; + } + } +} diff --git a/Disco.Models/Services/Messaging/EmailAttachment.cs b/Disco.Models/Services/Messaging/EmailAttachment.cs new file mode 100644 index 00000000..1e69234a --- /dev/null +++ b/Disco.Models/Services/Messaging/EmailAttachment.cs @@ -0,0 +1,8 @@ +namespace Disco.Models.Services.Messaging +{ + public class EmailAttachment + { + public string Name { get; set; } + public byte[] Data { get; set; } + } +} diff --git a/Disco.Services/Authorization/Claims.cs b/Disco.Services/Authorization/Claims.cs index 00c33125..bd554e2d 100644 --- a/Disco.Services/Authorization/Claims.cs +++ b/Disco.Services/Authorization/Claims.cs @@ -60,6 +60,7 @@ namespace Disco.Services.Authorization { "Config.Plugin.Show", new Tuple, Action, string, string, bool>(c => c.Config.Plugin.Show, (c, v) => c.Config.Plugin.Show = v, "Show Plugins", "Can show plugins", false) }, { "Config.Plugin.Uninstall", new Tuple, Action, string, string, bool>(c => c.Config.Plugin.Uninstall, (c, v) => c.Config.Plugin.Uninstall = v, "Uninstall Plugins", "Can uninstall plugins", false) }, { "Config.System.ConfigureActiveDirectory", new Tuple, Action, string, string, bool>(c => c.Config.System.ConfigureActiveDirectory, (c, v) => c.Config.System.ConfigureActiveDirectory = v, "Configure Active Directory Settings", "Can configure the Active Directory interoperability settings", false) }, + { "Config.System.ConfigureEmail", new Tuple, Action, string, string, bool>(c => c.Config.System.ConfigureEmail, (c, v) => c.Config.System.ConfigureEmail = v, "Configure Email Settings", "Can configure the email settings", false) }, { "Config.System.ConfigureProxy", new Tuple, Action, string, string, bool>(c => c.Config.System.ConfigureProxy, (c, v) => c.Config.System.ConfigureProxy = v, "Configure Proxy Settings", "Can configure the proxy settings", false) }, { "Config.System.Show", new Tuple, Action, string, string, bool>(c => c.Config.System.Show, (c, v) => c.Config.System.Show = v, "Show System Configuration", "Can show the system configuration", false) }, { "Config.Organisation.ConfigureAddresses", new Tuple, Action, string, string, bool>(c => c.Config.Organisation.ConfigureAddresses, (c, v) => c.Config.Organisation.ConfigureAddresses = v, "Configure Addresses", "Can configure organisation addresses", false) }, @@ -297,6 +298,7 @@ namespace Disco.Services.Authorization }), new ClaimNavigatorItem("Config.System", "System", "Permissions related to System Configuration", false, new List() { new ClaimNavigatorItem("Config.System.ConfigureActiveDirectory", false), + new ClaimNavigatorItem("Config.System.ConfigureEmail", false), new ClaimNavigatorItem("Config.System.ConfigureProxy", false), new ClaimNavigatorItem("Config.System.Show", false) }), @@ -574,6 +576,7 @@ namespace Disco.Services.Authorization c.Config.Plugin.Show = true; c.Config.Plugin.Uninstall = true; c.Config.System.ConfigureActiveDirectory = true; + c.Config.System.ConfigureEmail = true; c.Config.System.ConfigureProxy = true; c.Config.System.Show = true; c.Config.Organisation.ConfigureAddresses = true; @@ -993,6 +996,11 @@ namespace Disco.Services.Authorization /// public const string ConfigureActiveDirectory = "Config.System.ConfigureActiveDirectory"; + /// Configure Email Settings + /// Can configure the email settings + /// + public const string ConfigureEmail = "Config.System.ConfigureEmail"; + /// Configure Proxy Settings /// Can configure the proxy settings /// diff --git a/Disco.Services/Authorization/Roles/ClaimGroups/Configuration/System/SystemClaims.cs b/Disco.Services/Authorization/Roles/ClaimGroups/Configuration/System/SystemClaims.cs index f3fad582..da25e002 100644 --- a/Disco.Services/Authorization/Roles/ClaimGroups/Configuration/System/SystemClaims.cs +++ b/Disco.Services/Authorization/Roles/ClaimGroups/Configuration/System/SystemClaims.cs @@ -8,6 +8,9 @@ [ClaimDetails("Configure Proxy Settings", "Can configure the proxy settings")] public bool ConfigureProxy { get; set; } + + [ClaimDetails("Configure Email Settings", "Can configure the email settings")] + public bool ConfigureEmail { get; set; } [ClaimDetails("Configure Active Directory Settings", "Can configure the Active Directory interoperability settings")] public bool ConfigureActiveDirectory { get; set; } diff --git a/Disco.Services/Disco.Services.csproj b/Disco.Services/Disco.Services.csproj index cd5342cb..3096e279 100644 --- a/Disco.Services/Disco.Services.csproj +++ b/Disco.Services/Disco.Services.csproj @@ -390,6 +390,7 @@ + diff --git a/Disco.Services/Messaging/EmailService.cs b/Disco.Services/Messaging/EmailService.cs new file mode 100644 index 00000000..0d535f23 --- /dev/null +++ b/Disco.Services/Messaging/EmailService.cs @@ -0,0 +1,109 @@ +using Disco.Data.Configuration; +using Disco.Data.Repository; +using Disco.Models.Services.Messaging; +using System; +using System.Net; +using System.Net.Mail; + +namespace Disco.Services.Messaging +{ + public static class EmailService + { + private static string smtpServer; + private static int smtpPort; + private static string smtpFromAddress; + private static bool smtpEnableSsl; + private static string smtpUsername; + private static string smtpPassword; + + public static bool IsConfigured { get; private set; } + + static EmailService() + { + using (var database = new DiscoDataContext()) + { + Update(database.DiscoConfiguration); + } + } + + public static void ValidateConfiguration(string smtpServer, int smtpPort, string fromAddress, bool enableSsl, string username, string password) + { + // if smtpServer is null, we aren't configured (emailing is disabled) + if (!string.IsNullOrWhiteSpace(smtpServer)) + { + // validate + if (smtpPort <= 0) + throw new ArgumentOutOfRangeException(nameof(smtpPort), "Invalid SMTP port specified"); + if (string.IsNullOrWhiteSpace(fromAddress)) + throw new ArgumentOutOfRangeException(nameof(fromAddress), "From Address is required"); + // try parse FromAddress + new MailAddress(fromAddress); + } + } + + public static void Update(SystemConfiguration systemConfiguration) + { + smtpServer = systemConfiguration.EmailSmtpServer; + smtpPort = systemConfiguration.EmailSmtpPort; + smtpEnableSsl = systemConfiguration.EmailEnableSsl; + smtpFromAddress = systemConfiguration.EmailFromAddress; + smtpUsername = systemConfiguration.EmailUsername; + smtpPassword = systemConfiguration.EmailPassword; + + IsConfigured = + !string.IsNullOrWhiteSpace(smtpServer) && + smtpPort > 0 && + !string.IsNullOrWhiteSpace(smtpFromAddress); + } + + public static void SendEmail(Email email) + { + if (!IsConfigured) + throw new InvalidOperationException("Unable to send email, the email service has not been configured."); + + var message = new MailMessage() + { + Subject = email.Subject, + IsBodyHtml = email.IsBodyHtml, + Body = email.Body, + }; + + if (!string.IsNullOrWhiteSpace(email.From)) + message.From = new MailAddress(email.From); + else + message.From = new MailAddress(smtpFromAddress); + + if (email.To.Count > 0) + { + foreach (var recipient in email.To) + message.To.Add(recipient); + } + if (email.CC.Count > 0) + { + foreach (var recipient in email.CC) + message.CC.Add(recipient); + } + if (email.BCC.Count > 0) + { + foreach (var recipient in email.BCC) + message.Bcc.Add(recipient); + } + + using (var smtpClient = new SmtpClient(smtpServer, smtpPort)) + { + smtpClient.EnableSsl = smtpEnableSsl; + if (!string.IsNullOrWhiteSpace(smtpUsername)) + smtpClient.Credentials = new NetworkCredential(smtpUsername, smtpPassword); + + smtpClient.Send(message); + } + } + + public static void SendTestEmail(string recipient) + { + var email = new Email(recipient, "Disco ICT Test Email", @"Disco ICT has successfully been configured to send to this recipient."); + SendEmail(email); + } + + } +} diff --git a/Disco.Web/Areas/API/Controllers/SystemController.cs b/Disco.Web/Areas/API/Controllers/SystemController.cs index a9a4c358..5965873d 100644 --- a/Disco.Web/Areas/API/Controllers/SystemController.cs +++ b/Disco.Web/Areas/API/Controllers/SystemController.cs @@ -3,6 +3,7 @@ using Disco.Services; using Disco.Services.Authorization; using Disco.Services.Interop.ActiveDirectory; using Disco.Services.Interop.DiscoServices; +using Disco.Services.Messaging; using Disco.Services.Web; using System; using System.Collections.Generic; @@ -364,5 +365,50 @@ namespace Disco.Web.Areas.API.Controllers #endregion + #region Email Settings + + [DiscoAuthorize(Claims.Config.System.ConfigureEmail), ValidateInput(false), ValidateAntiForgeryToken] + public virtual ActionResult UpdateEmailSettings(string SmtpServer, int? SmtpPort, string FromAddress, bool EnableSsl, string Username, string Password, bool redirect = false) + { + // Default Port + if (!SmtpPort.HasValue) + SmtpPort = 25; + + EmailService.ValidateConfiguration(SmtpServer, SmtpPort.Value, FromAddress, EnableSsl, Username, Password); + + SystemConfiguration config = Database.DiscoConfiguration; + config.EmailSmtpServer = SmtpServer; + config.EmailSmtpPort = SmtpPort.Value; + config.EmailFromAddress = FromAddress; + config.EmailEnableSsl = EnableSsl; + config.EmailUsername = Username; + config.EmailPassword = Password; + + EmailService.Update(config); + + Database.SaveChanges(); + + if (redirect) + return RedirectToAction(MVC.Config.SystemConfig.Index()); + else + return Json("OK", JsonRequestBehavior.AllowGet); + } + + [DiscoAuthorize(Claims.Config.System.ConfigureEmail), ValidateAntiForgeryToken] + public virtual ActionResult SendTestEmail(string Recipient, bool redirect = false) + { + if (string.IsNullOrWhiteSpace(Recipient)) + throw new ArgumentNullException(nameof(Recipient)); + + EmailService.SendTestEmail(Recipient); + + if (redirect) + return RedirectToAction(MVC.Config.SystemConfig.Index()); + else + return Json("OK", JsonRequestBehavior.AllowGet); + } + + #endregion + } } \ No newline at end of file diff --git a/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs b/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs index 95c59c2e..3e083735 100644 --- a/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs +++ b/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs @@ -2,6 +2,7 @@ using Disco.Models.Services.Interop.DiscoServices; using Disco.Services.Interop.ActiveDirectory; using Disco.Services.Interop.DiscoServices; +using Disco.Services.Messaging; using Disco.Services.Tasks; using System; using System.Collections.Generic; @@ -98,6 +99,18 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig public string ProxyPassword { get; set; } #endregion + #region Email + public string EmailSmtpServer { get; set; } + public int EmailSmtpPort { get; set; } + public string EmailFromAddress { get; set; } + [Display(Name = "Enable SSL")] + public bool EmailEnableSsl { get; set; } + public string EmailUsername { get; set; } + [DataType(DataType.Password)] + public string EmailPassword { get; set; } + public bool EmailIsConfigured { get; set; } + #endregion + public ScheduledTaskStatus UpdateRunningStatus { get; set; } public DateTime? UpdateNextScheduled { get; set; } public UpdateResponseV2 UpdateLatestResponse { get; set; } @@ -114,10 +127,17 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig ProxyPort = config.ProxyPort, ProxyUsername = config.ProxyUsername, ProxyPassword = config.ProxyPassword, + EmailSmtpServer = config.EmailSmtpServer, + EmailSmtpPort = config.EmailSmtpPort, + EmailFromAddress = config.EmailFromAddress, + EmailEnableSsl = config.EmailEnableSsl, + EmailUsername = config.EmailUsername, + EmailPassword = config.EmailPassword, + EmailIsConfigured = EmailService.IsConfigured, UpdateLatestResponse = config.UpdateLastCheckResponse, UpdateRunningStatus = UpdateQueryTask.RunningStatus, UpdateNextScheduled = UpdateQueryTask.NextScheduled, - UpdateBetaDeployment = config.UpdateBetaDeployment + UpdateBetaDeployment = config.UpdateBetaDeployment, }; // Is an update available? diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml index 72b2e161..d4cf1bd1 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml @@ -3,6 +3,7 @@ Authorization.Require(Claims.Config.System.Show); var canConfigProxy = Authorization.Has(Claims.Config.System.ConfigureProxy); + var canConfigEmail = Authorization.Has(Claims.Config.System.ConfigureEmail); var canConfigAD = Authorization.Has(Claims.Config.System.ConfigureActiveDirectory); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "System"); @@ -318,7 +319,7 @@ }
  • @serverDescription@if (siteServers.ContainsKey(server)) - { } + {}
  • } } @@ -331,13 +332,13 @@ if (ulLi.length > toManyServers) { var liMore = $('
  • ').append( $('').attr('href', '#') - .text('Show All Servers (' + (ulLi.length - toManyServers) + ' more)') - .click(function () { - $(this).closest('li').remove(); - ul.find('li').show(); - return false; - })) - .insertAfter(ulLi[(toManyServers - 1)]); + .text('Show All Servers (' + (ulLi.length - toManyServers) + ' more)') + .click(function () { + $(this).closest('li').remove(); + ul.find('li').show(); + return false; + })) + .insertAfter(ulLi[(toManyServers - 1)]); ulLi.each(function (i) { if (i > (toManyServers - 1)) $(this).hide(); @@ -346,7 +347,7 @@ }); - } + } @@ -605,9 +606,9 @@ dataType: 'json', url: url, data: data, - success: function (response, result) { - if (result != 'success' || response != 'OK') { - alert('Unable to change property "' + UpdatePropertyName + '":\n' + response); + complete: function (response, result) { + if (result != 'success' || response.responseJSON != 'OK') { + alert('Unable to change proxy settings:\nCheck logs for more information'); ajaxLoading.hide(); } else { ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); @@ -663,6 +664,217 @@ else } +@if (canConfigEmail) +{ +
    +

    Email Settings

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + SMTP Server: + + @Html.EditorFor(m => m.EmailSmtpServer)
    + @Html.ValidationMessageFor(m => m.EmailSmtpServer) +
    + Port: + + @Html.EditorFor(m => m.EmailSmtpPort)
    + @Html.ValidationMessageFor(m => m.EmailSmtpPort) +
    + Default From Address: + + @Html.EditorFor(m => m.EmailFromAddress)
    + @Html.ValidationMessageFor(m => m.EmailFromAddress) +
    +   + + @Html.CheckBoxFor(m => m.EmailEnableSsl) @Html.LabelFor(m => m.EmailEnableSsl) +
    + Username: + + @Html.EditorFor(m => m.EmailUsername)
    + @Html.ValidationMessageFor(m => m.EmailUsername) +
    + Password: + + @Html.EditorFor(m => m.EmailPassword)
    + @Html.ValidationMessageFor(m => m.EmailPassword) +
    +   + + @Html.AntiForgeryToken() + + @AjaxHelpers.AjaxLoader() +
    +

     Recipient Email Address:

    +
    + @using (Html.BeginForm(MVC.API.System.SendTestEmail(), FormMethod.Post)) + { + + + @Html.AntiForgeryToken() + } +
    + +
    +
    +} +else +{ +
    +

    Email Settings

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + SMTP Server: + + @Html.DisplayFor(m => m.EmailSmtpServer) +
    + Port: + + @Html.DisplayFor(m => m.EmailSmtpPort) +
    + Default From Address: + + @Html.DisplayFor(m => m.EmailFromAddress) +
    + Enable SSL: + + @Html.CheckBoxFor(m => m.EmailEnableSsl, new { disabled = "disabled" }) @Html.LabelFor(m => m.EmailEnableSsl) +
    + Username: + + @Html.DisplayFor(m => m.EmailUsername) +
    + Password: + + ******** +
    +
    +}
    @Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates())
    diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs index e7b87099..44360195 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs @@ -49,6 +49,7 @@ namespace Disco.Web.Areas.Config.Views.SystemConfig Authorization.Require(Claims.Config.System.Show); var canConfigProxy = Authorization.Has(Claims.Config.System.ConfigureProxy); + var canConfigEmail = Authorization.Has(Claims.Config.System.ConfigureEmail); var canConfigAD = Authorization.Has(Claims.Config.System.ConfigureActiveDirectory); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "System"); @@ -77,7 +78,7 @@ WriteLiteral(">\r\n Disco Version:\r\n \r\n "
    \r\n "); - #line 25 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 26 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DiscoVersion.ToString(4)); @@ -90,7 +91,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">\r\n Built "); - #line 28 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 29 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(CommonHelpers.FriendlyDate(Model.DiscoVersionBuilt, "Unknown")); @@ -114,7 +115,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">"); - #line 40 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 41 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DatabaseServer); @@ -128,7 +129,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">"); - #line 44 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 45 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DatabaseName); @@ -138,7 +139,7 @@ WriteLiteral("\r\n \r\n < " Authentication:\r\n "); - #line 48 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 49 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DatabaseAuthentication); @@ -147,13 +148,13 @@ WriteLiteral("\r\n \r\n < WriteLiteral("\r\n \r\n"); - #line 50 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 51 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 50 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 51 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.DatabaseSqlAuthUsername != null) { @@ -168,7 +169,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">"); - #line 54 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 55 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DatabaseSqlAuthUsername); @@ -177,7 +178,7 @@ WriteLiteral(">"); WriteLiteral("\r\n \r\n"); - #line 56 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 57 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -196,7 +197,7 @@ WriteLiteral(" class=\"code\""); WriteLiteral(">"); - #line 66 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 67 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.DataStoreLocation); @@ -211,13 +212,13 @@ WriteLiteral(" style=\"width: 450px; margin-top: 15px;\""); WriteLiteral(">\r\n

    Updates

    \r\n \r\n"); - #line 74 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 75 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 74 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 75 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.UpdateLatestResponse == null) { @@ -241,7 +242,7 @@ WriteLiteral(" class=\"fa fa-exclamation-circle fa-lg\""); WriteLiteral("> Never\r\n \r\n \r\n"); - #line 85 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 86 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -257,7 +258,7 @@ WriteLiteral(">\r\n Last Run:\r\n \r\n "); - #line 93 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 94 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.UpdateResponseDate.ToLocalTime())); @@ -266,7 +267,7 @@ WriteLiteral(">\r\n Last Run:\r\n \r\n \r\n \r\n"); - #line 96 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 97 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.UpdateAvailable) { @@ -286,7 +287,7 @@ WriteLiteral(" class=\"fa fa-info-circle fa-lg information\""); WriteLiteral("> Version "); - #line 104 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 105 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.UpdateLatestResponse.LatestVersion); @@ -300,7 +301,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">\r\n [Released "); - #line 107 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 108 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.ReleasedDate)); @@ -313,7 +314,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">"); - #line 109 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 110 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(new HtmlString(Model.UpdateLatestResponse.Description)); @@ -321,14 +322,14 @@ WriteLiteral(">"); #line hidden WriteLiteral("\r\n (Model.UpdateLatestResponse.UrlLink + #line 111 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" +, Tuple.Create(Tuple.Create("", 4282), Tuple.Create(Model.UpdateLatestResponse.UrlLink #line default #line hidden -, 4200), false) +, 4282), false) ); WriteLiteral(" target=\"_blank\""); @@ -336,7 +337,7 @@ WriteLiteral(" target=\"_blank\""); WriteLiteral(">Download Now\r\n \r\n \r\n"); - #line 113 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 114 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -357,7 +358,7 @@ WriteLiteral("> The latest version is installed\r\n "\r\n \r\n"); - #line 124 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 125 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } } @@ -371,13 +372,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">Check for Update:\r\n \r\n\r\n\r\n\r\n \r\n
    \r\n"); - #line 130 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 131 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 130 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 131 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.UpdateRunningStatus == null) { @@ -388,7 +389,7 @@ WriteLiteral(">Check for Update:\r\n \r\n"); WriteLiteral(" "); - #line 133 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 134 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ActionLinkSmallButton("Check Now", MVC.API.System.UpdateCheck())); @@ -403,7 +404,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">[Will run automatically "); - #line 134 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 135 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(CommonHelpers.FriendlyDate(Model.UpdateNextScheduled, "Unknown")); @@ -412,7 +413,7 @@ WriteLiteral(">[Will run automatically "); WriteLiteral("]\r\n"); - #line 135 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 136 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -423,7 +424,7 @@ WriteLiteral("]\r\n"); WriteLiteral(" "); - #line 138 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 139 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ActionLink("View Status", MVC.Config.Logging.TaskStatus(Model.UpdateRunningStatus.SessionId))); @@ -438,7 +439,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">[Running Now]\r\n"); - #line 140 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 141 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -447,13 +448,13 @@ WriteLiteral(">[Running Now]\r\n"); WriteLiteral("\r\n"); - #line 142 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 143 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 142 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 143 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.UpdateBetaDeployment) { @@ -473,7 +474,7 @@ WriteLiteral(" class=\"fa fa-info-circle fa-lg\""); WriteLiteral("> Beta Deployment\r\n"); - #line 146 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 147 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -493,7 +494,7 @@ WriteLiteral(">\r\n Primary Domain:\r\n \r\n " "); - #line 159 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 160 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.ADPrimaryDomain.Name); @@ -502,7 +503,7 @@ WriteLiteral(">\r\n Primary Domain:\r\n \r\n WriteLiteral(" ["); - #line 159 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 160 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.ADPrimaryDomain.NetBiosName); @@ -515,13 +516,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">\r\n Additional Domains:\r\n \r\n \r\n"); - #line 167 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 168 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 167 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 168 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.ADDomains.Count > 1) { var adAdditionalDomains = Model.ADDomains.Where(d => d != Model.ADPrimaryDomain).OrderBy(d => d.Name).ToList(); @@ -533,7 +534,7 @@ WriteLiteral(">\r\n Additional Domains:\r\n \r\n WriteLiteral(" "); - #line 171 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 172 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adDomainFirst.Name); @@ -542,7 +543,7 @@ WriteLiteral(" "); WriteLiteral(" ["); - #line 171 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 172 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adDomainFirst.NetBiosName); @@ -551,7 +552,7 @@ WriteLiteral(" ["); WriteLiteral("]\r\n"); - #line 172 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 173 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" foreach (var adDomain in adAdditionalDomains.Skip(1)) { @@ -563,7 +564,7 @@ WriteLiteral("
    \r\n"); WriteLiteral("
    \r\n "); - #line 176 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 177 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adDomain.Name); @@ -572,7 +573,7 @@ WriteLiteral("
    \r\n ["); - #line 176 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 177 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adDomain.NetBiosName); @@ -581,7 +582,7 @@ WriteLiteral(" ["); WriteLiteral("]\r\n
    \r\n"); - #line 178 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 179 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } } else @@ -597,7 +598,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None>\r\n"); - #line 183 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 184 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -611,7 +612,7 @@ WriteLiteral(">\r\n Site:\r\n \r\n
    "); - #line 191 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 192 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.ADSite.Name); @@ -626,13 +627,13 @@ WriteLiteral(">\r\n Servers:\r\n \r\n "
    \r\n"); - #line 200 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 201 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 200 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 201 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.ADServers.Count > 0) { @@ -646,13 +647,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n"); - #line 203 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 204 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 203 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 204 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" foreach (var server in Model.ADServers) { var serverDescription = string.Format("{0} [{1}]", server.Name.EndsWith(server.Domain.Name, StringComparison.OrdinalIgnoreCase) ? server.Name.Substring(0, server.Name.Length - server.Domain.Name.Length - 1) : server.Name, server.Domain.NetBiosName); @@ -664,13 +665,13 @@ WriteLiteral(">\r\n"); WriteLiteral("
  • \r\n"); - #line 208 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 209 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 208 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 209 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (server.IsAvailable) { @@ -686,7 +687,7 @@ WriteLiteral(" title=\"Available\""); WriteLiteral(">\r\n"); - #line 211 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 212 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -698,24 +699,24 @@ WriteLiteral(" (server.AvailableWhen.Value.ToLongTimeString() + #line 215 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + , Tuple.Create(Tuple.Create(" ", 8740), Tuple.Create(server.AvailableWhen.Value.ToLongTimeString() #line default #line hidden -, 8659), false) +, 8741), false) ); WriteLiteral(">\r\n"); - #line 215 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 216 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -724,7 +725,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 216 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 217 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(serverDescription); @@ -733,13 +734,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 217 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 218 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 217 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 218 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (server.IsSiteServer) { @@ -755,7 +756,7 @@ WriteLiteral(" title=\"Site Server\""); WriteLiteral(">\r\n"); - #line 220 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 221 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -772,7 +773,7 @@ WriteLiteral(" title=\"Not a Site Server\""); WriteLiteral(">\r\n"); - #line 224 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -781,7 +782,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 226 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (server.IsWritable) { @@ -797,7 +798,7 @@ WriteLiteral(" title=\"Writable Domain Controller\""); WriteLiteral(">\r\n"); - #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 229 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -806,7 +807,7 @@ WriteLiteral(">\r\n"); WriteLiteral("
  • \r\n"); - #line 230 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 231 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -815,7 +816,7 @@ WriteLiteral(" \r\n"); WriteLiteral(" \r\n"); - #line 232 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 233 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -834,7 +835,7 @@ WriteLiteral(" class=\"fa fa-exclamation-circle fa-lg\""); WriteLiteral("> None Found\r\n
    \r\n"); - #line 238 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 239 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -848,13 +849,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">\r\n Directory:\r\n \r\n
    \r\n"); - #line 247 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 248 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 247 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 248 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.ADAllServers == null) { @@ -866,7 +867,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 250 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 251 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" })); @@ -875,7 +876,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 250 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 251 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchAllServers)); @@ -900,7 +901,7 @@ WriteLiteral(">Directory servers are currently being retrieved.
    \r\n "
    \r\n"); - #line 258 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 259 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -914,13 +915,13 @@ WriteLiteral(">Directory servers are currently being retrieved.
    \r\n WriteLiteral("
    \r\n"); - #line 265 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 266 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 265 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 266 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (!canSearchEntireDirectory) { @@ -928,27 +929,27 @@ WriteLiteral("
    \r\n"); #line default #line hidden - #line 267 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 268 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" })); #line default #line hidden - #line 267 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 268 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 267 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 268 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchAllServers)); #line default #line hidden - #line 267 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 268 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" @@ -969,7 +970,7 @@ WriteLiteral(" class=\"fa fa-exclamation-circle warning\""); WriteLiteral(">Disco will not search the entire directory which consists of more than "); - #line 270 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 271 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxAllServerSearch); @@ -979,7 +980,7 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n "

    \r\n
    \r\n"); - #line 273 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 274 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -988,40 +989,40 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchAllServers)); #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchAllServers)); #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 276 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 277 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" @@ -1048,7 +1049,7 @@ WriteLiteral(" \r\n"); - #line 287 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 288 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1067,7 +1068,7 @@ WriteLiteral("\', \'SearchAllServers\');\r\n WriteLiteral("
    \r\n"); - #line 289 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 290 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -1080,7 +1081,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 293 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 294 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" })); @@ -1089,7 +1090,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 293 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 294 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchAllServers)); @@ -1112,7 +1113,7 @@ WriteLiteral(">If this setting is enabled, Disco will query all servers with "p>\r\n
    \r\n \r\n"); - #line 300 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1128,13 +1129,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n"); - #line 305 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 306 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 305 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 306 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" var domainIndex = Model.ADDomains.ToDictionary(d => d.Name, StringComparer.OrdinalIgnoreCase); var siteServers = Model.ADServers.Where(s => s.IsSiteServer).ToDictionary(s => s.Name, StringComparer.OrdinalIgnoreCase); @@ -1157,7 +1158,7 @@ WriteLiteral("
  • \r\n " "); - #line 320 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 321 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(serverDescription); @@ -1166,23 +1167,23 @@ WriteLiteral("
  • \r\n WriteLiteral(""); - #line 320 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 321 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (siteServers.ContainsKey(server)) { #line default #line hidden -WriteLiteral(" "); +WriteLiteral(">"); - #line 321 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" - } + #line 322 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + } #line default @@ -1190,7 +1191,7 @@ WriteLiteral("> "); WriteLiteral("
  • \r\n"); - #line 323 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 324 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1206,13 +1207,13 @@ WriteLiteral(@" if (ulLi.length > toManyServers) { var liMore = $('
  • ').append( $('').attr('href', '#') - .text('Show All Servers (' + (ulLi.length - toManyServers) + ' more)') - .click(function () { - $(this).closest('li').remove(); - ul.find('li').show(); - return false; - })) - .insertAfter(ulLi[(toManyServers - 1)]); + .text('Show All Servers (' + (ulLi.length - toManyServers) + ' more)') + .click(function () { + $(this).closest('li').remove(); + ul.find('li').show(); + return false; + })) + .insertAfter(ulLi[(toManyServers - 1)]); ulLi.each(function (i) { if (i > (toManyServers - 1)) $(this).hide(); @@ -1224,8 +1225,8 @@ WriteLiteral(@" "); - #line 349 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" - } + #line 350 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + } #line default @@ -1237,13 +1238,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">\r\n Searching:\r\n \r\n
  • \r\n"); - #line 358 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 359 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 358 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 359 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" object ADSearchWildcardSuffixOnlyAttributes = null; if (!canConfigAD) @@ -1262,7 +1263,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 368 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 369 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchWildcardSuffixOnly, ADSearchWildcardSuffixOnlyAttributes)); @@ -1271,7 +1272,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 368 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 369 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchWildcardSuffixOnly)); @@ -1280,7 +1281,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 368 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 369 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -1305,13 +1306,13 @@ WriteLiteral(@">If this setting is enabled, Disco will utilize Active Direct "); - #line 375 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 376 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 375 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 376 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigAD) { @@ -1323,7 +1324,7 @@ WriteLiteral(" \r\n"); - #line 382 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 383 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1346,13 +1347,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">\r\n Search Scope:\r\n \r\n \r\n"); - #line 390 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 391 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 390 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 391 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0) { @@ -1369,13 +1370,13 @@ WriteLiteral(" id=\"Config_System_AD_SearchScope_DistinguishedNames\""); WriteLiteral(">\r\n"); - #line 394 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 395 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 394 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 395 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" foreach (var adContainer in Model.ADSearchContainers) { @@ -1387,7 +1388,7 @@ WriteLiteral(" "); - #line 396 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 397 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adContainer.Item3); @@ -1407,7 +1408,7 @@ WriteLiteral(">"); WriteLiteral("\r\n"); - #line 397 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 398 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1416,7 +1417,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n"); - #line 399 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 400 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -1444,7 +1445,7 @@ WriteLiteral(">When searching, the entire domain will be queried. This is su "/div>\r\n"); - #line 408 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 409 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1453,7 +1454,7 @@ WriteLiteral(">When searching, the entire domain will be queried. This is su WriteLiteral(" "); - #line 409 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 410 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigAD) { @@ -1488,7 +1489,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 417 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 418 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -1504,13 +1505,13 @@ WriteLiteral(" class=\"organisationalUnitTree\""); WriteLiteral(">\r\n \r\n"); - #line 421 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 422 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 421 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 422 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true))) { } @@ -1557,7 +1558,7 @@ WriteLiteral(" \r\n"); - #line 532 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 533 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1612,7 +1613,7 @@ WriteLiteral("\', null, function (data) {\r\n WriteLiteral("
    \r\n
    \r\n"); - #line 540 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 541 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigProxy) { using (Html.BeginForm(MVC.API.System.UpdateProxySettings())) @@ -1638,7 +1639,7 @@ WriteLiteral(">\r\n Address:\r\n WriteLiteral(" "); - #line 552 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 553 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyAddress)); @@ -1649,7 +1650,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 553 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 554 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyAddress)); @@ -1666,7 +1667,7 @@ WriteLiteral(">\r\n Port:\r\n \r\ WriteLiteral(" "); - #line 561 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 562 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyPort)); @@ -1677,7 +1678,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 562 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 563 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPort)); @@ -1694,7 +1695,7 @@ WriteLiteral(">\r\n Username:\r\n m.ProxyUsername)); @@ -1705,7 +1706,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 571 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 572 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyUsername)); @@ -1722,7 +1723,7 @@ WriteLiteral(">\r\n Password:\r\n m.ProxyPassword)); @@ -1733,7 +1734,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 580 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 581 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPassword)); @@ -1756,7 +1757,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">Save Proxy Settings"); - #line 588 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 589 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -1771,7 +1772,7 @@ WriteLiteral(@" var url = '"); - #line 594 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 595 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Url.Action(MVC.API.System.UpdateProxySettings())); @@ -1787,20 +1788,20 @@ WriteLiteral("\';\r\n var data = {\r\n " type: \'POST\',\r\n " + " dataType: \'json\',\r\n url: u" + "rl,\r\n data: data,\r\n " + -" success: function (response, result) {\r\n " + -" if (result != \'success\' || response != \'OK\') {\r\n " + -" alert(\'Unable to change property \"\' + Upda" + -"tePropertyName + \'\":\\n\' + response);\r\n " + -" ajaxLoading.hide();\r\n } else {\r" + -"\n ajaxLoading.hide().next(\'.ajaxO" + -"k\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " + -" }\r\n }\r\n " + -" });\r\n });\r\n }" + -");\r\n \r\n \r\n " + -" \r\n \r\n \r\n"); +" complete: function (response, result) {\r\n " + +" if (result != \'success\' || response.responseJSON != \'OK\')" + +" {\r\n alert(\'Unable to change prox" + +"y settings:\\nCheck logs for more information\');\r\n " + +" ajaxLoading.hide();\r\n " + +" } else {\r\n ajaxLoading.hide().n" + +"ext(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " + +" }\r\n }\r\n " + +" });\r\n });\r\n " + +" });\r\n \r\n \r\n " + +" \r\n \r\n \r\n"); - #line 624 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 625 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } } else @@ -1825,7 +1826,7 @@ WriteLiteral(">\r\n Address:\r\n \r\n WriteLiteral(" "); - #line 636 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 637 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyAddress)); @@ -1841,7 +1842,7 @@ WriteLiteral(">\r\n Port:\r\n \r\n WriteLiteral(" "); - #line 644 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 645 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyPort)); @@ -1857,7 +1858,7 @@ WriteLiteral(">\r\n Username:\r\n \r\n WriteLiteral(" "); - #line 652 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 653 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyUsername)); @@ -1873,7 +1874,507 @@ WriteLiteral(">\r\n Password:\r\n \r\n "table>\r\n \r\n"); - #line 665 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 666 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" +} + + + #line default + #line hidden + + #line 667 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + if (canConfigEmail) +{ + + + #line default + #line hidden +WriteLiteral(" \r\n

    Email Settings

    \r\n \r\n \r\n " + +" \r\n SMTP Server:\r\n \r\n \r\n \r\n \r\n \r\n Port:\r\n \r\n \r\n \r\n \r\n \r\n Default From Address:\r\n \r\n " + +" \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n Username:\r\n \r\n \r\n \r\n \r\n \r\n Password:\r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n " + +" \r\n
    \r" + +"\n"); + +WriteLiteral(" "); + + + #line 677 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.EditorFor(m => m.EmailSmtpServer)); + + + #line default + #line hidden +WriteLiteral("
    \r\n"); + +WriteLiteral(" "); + + + #line 678 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.ValidationMessageFor(m => m.EmailSmtpServer)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 686 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.EditorFor(m => m.EmailSmtpPort)); + + + #line default + #line hidden +WriteLiteral("
    \r\n"); + +WriteLiteral(" "); + + + #line 687 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.ValidationMessageFor(m => m.EmailSmtpPort)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 695 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.EditorFor(m => m.EmailFromAddress)); + + + #line default + #line hidden +WriteLiteral("
    \r\n"); + +WriteLiteral(" "); + + + #line 696 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.ValidationMessageFor(m => m.EmailFromAddress)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 704 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.CheckBoxFor(m => m.EmailEnableSsl)); + + + #line default + #line hidden +WriteLiteral(" "); + + + #line 704 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.LabelFor(m => m.EmailEnableSsl)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 712 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.EditorFor(m => m.EmailUsername)); + + + #line default + #line hidden +WriteLiteral("
    \r\n"); + +WriteLiteral(" "); + + + #line 713 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.ValidationMessageFor(m => m.EmailUsername)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 721 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.EditorFor(m => m.EmailPassword)); + + + #line default + #line hidden +WriteLiteral("
    \r\n"); + +WriteLiteral(" "); + + + #line 722 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.ValidationMessageFor(m => m.EmailPassword)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 730 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.AntiForgeryToken()); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n \r\n"); + + + #line 821 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" +} +else +{ + + + #line default + #line hidden +WriteLiteral(" \r\n

    Email Settings

    \r\n \r\n \r\n " + +" \r\n SMTP Server:\r\n \r\n \r\n \r\n \r\n \r\n Port:\r\n \r\n \r\n \r\n \r\n \r\n Default From Address:\r\n \r\n " + +" \r\n \r\n \r\n \r\n Enable SSL:\r\n \r\n \r\n \r\n \r\n \r\n Username:\r\n \r\n \r\n \r\n \r\n \r\n Password:\r\n \r\n \r\n \r\n \r\n \r\n"); + + + #line 877 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1888,7 +2389,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 667 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 879 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates())); diff --git a/Disco.Web/Disco.Web.csproj b/Disco.Web/Disco.Web.csproj index 8eac530a..e5ebbeca 100644 --- a/Disco.Web/Disco.Web.csproj +++ b/Disco.Web/Disco.Web.csproj @@ -1210,22 +1210,22 @@ RazorGeneratorShow.generated.cs - + RazorGenerator ShowPackage1.generated.cs - - + + RazorGenerator CreatePackage.generated.cs - + RazorGenerator Index.generated.cs - + RazorGenerator Expressions.generated.cs - + RazorGenerator General.generated.cs diff --git a/Disco.Web/Extensions/T4MVC/API.SystemController.generated.cs b/Disco.Web/Extensions/T4MVC/API.SystemController.generated.cs index 4fe45623..f01e8bad 100644 --- a/Disco.Web/Extensions/T4MVC/API.SystemController.generated.cs +++ b/Disco.Web/Extensions/T4MVC/API.SystemController.generated.cs @@ -129,6 +129,18 @@ namespace Disco.Web.Areas.API.Controllers { return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateProxySettings); } + [NonAction] + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public virtual System.Web.Mvc.ActionResult UpdateEmailSettings() + { + return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateEmailSettings); + } + [NonAction] + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public virtual System.Web.Mvc.ActionResult SendTestEmail() + { + return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SendTestEmail); + } [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] public SystemController Actions { get { return MVC.API.System; } } @@ -163,6 +175,8 @@ namespace Disco.Web.Areas.API.Controllers public readonly string Subject = "Subject"; public readonly string SyncActiveDirectoryManagedGroup = "SyncActiveDirectoryManagedGroup"; public readonly string UpdateProxySettings = "UpdateProxySettings"; + public readonly string UpdateEmailSettings = "UpdateEmailSettings"; + public readonly string SendTestEmail = "SendTestEmail"; } [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] @@ -186,6 +200,8 @@ namespace Disco.Web.Areas.API.Controllers public const string Subject = "Subject"; public const string SyncActiveDirectoryManagedGroup = "SyncActiveDirectoryManagedGroup"; public const string UpdateProxySettings = "UpdateProxySettings"; + public const string UpdateEmailSettings = "UpdateEmailSettings"; + public const string SendTestEmail = "SendTestEmail"; } @@ -310,6 +326,29 @@ namespace Disco.Web.Areas.API.Controllers public readonly string ProxyPassword = "ProxyPassword"; public readonly string redirect = "redirect"; } + static readonly ActionParamsClass_UpdateEmailSettings s_params_UpdateEmailSettings = new ActionParamsClass_UpdateEmailSettings(); + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public ActionParamsClass_UpdateEmailSettings UpdateEmailSettingsParams { get { return s_params_UpdateEmailSettings; } } + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public class ActionParamsClass_UpdateEmailSettings + { + public readonly string SmtpServer = "SmtpServer"; + public readonly string SmtpPort = "SmtpPort"; + public readonly string FromAddress = "FromAddress"; + public readonly string EnableSsl = "EnableSsl"; + public readonly string Username = "Username"; + public readonly string Password = "Password"; + public readonly string redirect = "redirect"; + } + static readonly ActionParamsClass_SendTestEmail s_params_SendTestEmail = new ActionParamsClass_SendTestEmail(); + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public ActionParamsClass_SendTestEmail SendTestEmailParams { get { return s_params_SendTestEmail; } } + [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] + public class ActionParamsClass_SendTestEmail + { + public readonly string Recipient = "Recipient"; + public readonly string redirect = "redirect"; + } static readonly ViewsClass s_views = new ViewsClass(); [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] public ViewsClass Views { get { return s_views; } } @@ -568,6 +607,37 @@ namespace Disco.Web.Areas.API.Controllers return callInfo; } + [NonAction] + partial void UpdateEmailSettingsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string SmtpServer, int? SmtpPort, string FromAddress, bool EnableSsl, string Username, string Password, bool redirect); + + [NonAction] + public override System.Web.Mvc.ActionResult UpdateEmailSettings(string SmtpServer, int? SmtpPort, string FromAddress, bool EnableSsl, string Username, string Password, bool redirect) + { + var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateEmailSettings); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "SmtpServer", SmtpServer); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "SmtpPort", SmtpPort); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FromAddress", FromAddress); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "EnableSsl", EnableSsl); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Username", Username); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Password", Password); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect); + UpdateEmailSettingsOverride(callInfo, SmtpServer, SmtpPort, FromAddress, EnableSsl, Username, Password, redirect); + return callInfo; + } + + [NonAction] + partial void SendTestEmailOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string Recipient, bool redirect); + + [NonAction] + public override System.Web.Mvc.ActionResult SendTestEmail(string Recipient, bool redirect) + { + var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SendTestEmail); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Recipient", Recipient); + ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect); + SendTestEmailOverride(callInfo, Recipient, redirect); + return callInfo; + } + } }
    \r" + +"\n"); + +WriteLiteral(" "); + + + #line 832 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.DisplayFor(m => m.EmailSmtpServer)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 840 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.DisplayFor(m => m.EmailSmtpPort)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 848 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.DisplayFor(m => m.EmailFromAddress)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n" + +""); + +WriteLiteral(" "); + + + #line 856 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.CheckBoxFor(m => m.EmailEnableSsl, new { disabled = "disabled" })); + + + #line default + #line hidden +WriteLiteral(" "); + + + #line 856 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.LabelFor(m => m.EmailEnableSsl)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n"); + +WriteLiteral(" "); + + + #line 864 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + Write(Html.DisplayFor(m => m.EmailUsername)); + + + #line default + #line hidden +WriteLiteral("\r\n
    \r\n " + +" ********\r\n