update: minor changes to document template bulk generation

This commit is contained in:
Gary Sharp
2025-09-07 12:06:23 +10:00
parent ca7193a8fc
commit 36c24542e1
8 changed files with 481 additions and 324 deletions
@@ -882,8 +882,9 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = user.UserId, Id = user.UserId,
UserEmailAddress = user.EmailAddress, UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress,
Scope = $"Matched '{dataId}'", Scope = $"Matched '{dataId}'",
IsError = false, IsError = false,
}); });
@@ -912,6 +913,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = adUser.Id, Id = adUser.Id,
UserId = adUser.Id,
UserDisplayName = adUser.DisplayName, UserDisplayName = adUser.DisplayName,
UserEmailAddress = adUser.Email, UserEmailAddress = adUser.Email,
Scope = $"Group Member '{group.Name}'", Scope = $"Group Member '{group.Name}'",
@@ -959,8 +961,9 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.DeviceSerialNumber, Id = assignment.DeviceSerialNumber,
UserEmailAddress = dbUser.EmailAddress, UserId = dbUser.UserId,
UserDisplayName = dbUser.DisplayName, UserDisplayName = dbUser.DisplayName,
UserEmailAddress = dbUser.EmailAddress,
Scope = $"Matched assigned user '{dataId}'", Scope = $"Matched assigned user '{dataId}'",
IsError = false, IsError = false,
}); });
@@ -998,8 +1001,9 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = device.SerialNumber, Id = device.SerialNumber,
UserEmailAddress = user?.EmailAddress, UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress,
Scope = $"Matched '{deviceSerialNumber}'", Scope = $"Matched '{deviceSerialNumber}'",
IsError = false, IsError = false,
}); });
@@ -1048,6 +1052,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = adUser.Id, Id = adUser.Id,
UserId = adUser.Id,
UserDisplayName = adUser.DisplayName, UserDisplayName = adUser.DisplayName,
UserEmailAddress = adUser.Email, UserEmailAddress = adUser.Email,
Scope = $"Group Member '{group.Name}'", Scope = $"Group Member '{group.Name}'",
@@ -1060,6 +1065,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = user.Id, Id = user.Id,
UserId = user.Id,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.Email, UserEmailAddress = user.Email,
Scope = $"Matched '{groupId}'", Scope = $"Matched '{groupId}'",
@@ -1126,8 +1132,9 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.UserId, Id = assignment.UserId,
UserEmailAddress = user?.EmailAddress, UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress,
Scope = $"Assigned User Flag '{flag.Name}'", Scope = $"Assigned User Flag '{flag.Name}'",
IsError = false, IsError = false,
}); });
@@ -1184,8 +1191,9 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.DeviceSerialNumber, Id = assignment.DeviceSerialNumber,
UserEmailAddress = user?.EmailAddress, UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress,
Scope = $"Assigned User Flag '{flag.Name}'", Scope = $"Assigned User Flag '{flag.Name}'",
IsError = false, IsError = false,
}); });
@@ -1250,6 +1258,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = user.UserId, Id = user.UserId,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Device Profile '{profile.Name}' Matches Assigned Device '{assignment.SerialNumber}'", Scope = $"Device Profile '{profile.Name}' Matches Assigned Device '{assignment.SerialNumber}'",
@@ -1284,6 +1293,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = device.SerialNumber, Id = device.SerialNumber,
UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress, UserEmailAddress = user?.EmailAddress,
Scope = $"Device Profile '{profile.Name}'", Scope = $"Device Profile '{profile.Name}'",
@@ -1347,6 +1357,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.AssignedUserId, Id = assignment.AssignedUserId,
UserId = user?.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Device Batch '{batch.Name}' Matches Assigned Device '{assignment.SerialNumber}'", Scope = $"Device Batch '{batch.Name}' Matches Assigned Device '{assignment.SerialNumber}'",
@@ -1380,6 +1391,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = device.SerialNumber, Id = device.SerialNumber,
UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress, UserEmailAddress = user?.EmailAddress,
Scope = $"Device Batch '{batch.Name}'", Scope = $"Device Batch '{batch.Name}'",
@@ -1439,6 +1451,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.Device.AssignedUserId, Id = assignment.Device.AssignedUserId,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Document Template '{template.Id}' Attachment Matches Assigned Device '{assignment.Device.SerialNumber}'", Scope = $"Document Template '{template.Id}' Attachment Matches Assigned Device '{assignment.Device.SerialNumber}'",
@@ -1460,6 +1473,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.Job.UserId, Id = assignment.Job.UserId,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Document Template '{template.Id}' Attachment Matches Job '{assignment.Job.Id}'", Scope = $"Document Template '{template.Id}' Attachment Matches Job '{assignment.Job.Id}'",
@@ -1481,6 +1495,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.UserId, Id = assignment.UserId,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Document Template '{template.Id}' Attachment Matches User", Scope = $"Document Template '{template.Id}' Attachment Matches User",
@@ -1542,6 +1557,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.DeviceSerialNumber, Id = assignment.DeviceSerialNumber,
UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress, UserEmailAddress = user?.EmailAddress,
Scope = $"Document Template '{template.Id}'", Scope = $"Document Template '{template.Id}'",
@@ -1563,6 +1579,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.Job.DeviceSerialNumber, Id = assignment.Job.DeviceSerialNumber,
UserId = user?.UserId,
UserDisplayName = user?.DisplayName, UserDisplayName = user?.DisplayName,
UserEmailAddress = user?.EmailAddress, UserEmailAddress = user?.EmailAddress,
Scope = $"Document Template '{template.Id}' Attachment Matches Job '{assignment.Job.Id}'", Scope = $"Document Template '{template.Id}' Attachment Matches Job '{assignment.Job.Id}'",
@@ -1589,6 +1606,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = userDeviceAssignment.DeviceSerialNumber, Id = userDeviceAssignment.DeviceSerialNumber,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"Document Template '{template.Id}' Attachment Matches User '{user.UserId}'", Scope = $"Document Template '{template.Id}' Attachment Matches User '{user.UserId}'",
@@ -1688,6 +1706,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = user.UserId, Id = user.UserId,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"User Detail '{key}'{(string.IsNullOrWhiteSpace(value) ? null : $" with the value '{value}'")} Matches User", Scope = $"User Detail '{key}'{(string.IsNullOrWhiteSpace(value) ? null : $" with the value '{value}'")} Matches User",
@@ -1727,6 +1746,7 @@ namespace Disco.Web.Areas.API.Controllers
results.Add(new BulkGenerateItemModel() results.Add(new BulkGenerateItemModel()
{ {
Id = assignment.DeviceSerialNumber, Id = assignment.DeviceSerialNumber,
UserId = user.UserId,
UserDisplayName = user.DisplayName, UserDisplayName = user.DisplayName,
UserEmailAddress = user.EmailAddress, UserEmailAddress = user.EmailAddress,
Scope = $"User Detail '{key}'{(string.IsNullOrWhiteSpace(value) ? null : $" with the value '{value}'")} Matches User '{user.UserId}'", Scope = $"User Detail '{key}'{(string.IsNullOrWhiteSpace(value) ? null : $" with the value '{value}'")} Matches User '{user.UserId}'",
@@ -3,6 +3,7 @@
public class BulkGenerateItemModel public class BulkGenerateItemModel
{ {
public string Id { get; set; } public string Id { get; set; }
public string UserId { get; set; }
public string UserEmailAddress { get; set; } public string UserEmailAddress { get; set; }
public string UserDisplayName { get; set; } public string UserDisplayName { get; set; }
public string Scope { get; set; } public string Scope { get; set; }
@@ -35,7 +35,7 @@
{ {
<button id="AddDocumentAttachment" class="button small">Add With Document Attachment</button> <button id="AddDocumentAttachment" class="button small">Add With Document Attachment</button>
} }
<button id="AddUsers" class="button small">Add With Assigned User</button> <button id="AddUsers" class="button small">Add With Assigned Users</button>
@if (Model.UserDetails.Any(b => b.Count > 0)) @if (Model.UserDetails.Any(b => b.Count > 0))
{ {
<button id="AddUserDetail" class="button small">Add With Assigned User Detail</button> <button id="AddUserDetail" class="button small">Add With Assigned User Detail</button>
@@ -262,7 +262,7 @@ WriteLiteral(" id=\"AddUsers\"");
WriteLiteral(" class=\"button small\""); WriteLiteral(" class=\"button small\"");
WriteLiteral(">Add With Assigned User</button>\r\n"); WriteLiteral(">Add With Assigned Users</button>\r\n");
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\BulkGenerateDevice.cshtml" #line 39 "..\..\Areas\Config\Views\DocumentTemplate\BulkGenerateDevice.cshtml"
@@ -1,4 +1,4 @@
@model Disco.Web.Areas.Config.Models.DocumentTemplate.BulkGenerateModel @model Disco.Models.UI.Config.DocumentTemplate.ConfigDocumentTemplateBulkGenerate
@using Disco.Services.Interop.ActiveDirectory; @using Disco.Services.Interop.ActiveDirectory;
@{ @{
if (Model == null) if (Model == null)
@@ -24,18 +24,18 @@
<div id="DocumentTemplate_BulkGenerate_Dialog_AddUsers" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Users"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddUsers" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Users">
<div class="brief"> <div class="brief">
<div> <div>
Enter multiple <span class="scopeDescBulkGenerate">User Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>). Enter multiple <span class="scopeDescBulkGenerate">User Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>)
</div> </div>
@if (userModel != null) @if (userModel != null)
{ {
<div> <div>
Security Groups can also be included. Members will be resolved and added. Security Groups can also be included. Members will be resolved and added
</div> </div>
} }
@if (deviceModel != null) @if (deviceModel != null)
{ {
<div> <div>
Devices associated with the users will be added. Devices associated with the users will be added
</div> </div>
} }
<div class="examples clearfix"> <div class="examples clearfix">
@@ -71,7 +71,7 @@
<div id="DocumentTemplate_BulkGenerate_Dialog_AddDevices" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Devices"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddDevices" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Devices">
<div class="brief"> <div class="brief">
<div> <div>
Enter multiple <span class="scopeDescBulkGenerate">Device Serial Numbers</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>). Enter multiple <span class="scopeDescBulkGenerate">Device Serial Numbers</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>)
</div> </div>
<div class="examples clearfix"> <div class="examples clearfix">
<h4>Examples:</h4> <h4>Examples:</h4>
@@ -103,7 +103,7 @@
<div id="DocumentTemplate_BulkGenerate_Dialog_AddGroupMembers" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Group Members"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddGroupMembers" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Group Members">
<div class="brief"> <div class="brief">
<div> <div>
Add all members of a group (including recursive members) to the bulk generation. Add all members of a group (including recursive members)
</div> </div>
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddGroupMembers())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddGroupMembers()))
@@ -130,7 +130,7 @@
<div id="DocumentTemplate_BulkGenerate_Dialog_AddUserFlag" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add User Flag"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddUserFlag" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add User Flag">
<div class="brief"> <div class="brief">
<div> <div>
Add all users associated with the flag to the bulk generation. Add all users associated with the flag
</div> </div>
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddUserFlag())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddUserFlag()))
@@ -155,7 +155,7 @@
<div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceFlag" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add Device Flag"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceFlag" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add Device Flag">
<div class="brief"> <div class="brief">
<div> <div>
Add all devices associated with the flag to the bulk generation. Add all devices associated with the flag
</div> </div>
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceFlag())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceFlag()))
@@ -178,14 +178,20 @@
@if (Model.DeviceProfiles.Any(b => b.Count > 0)) @if (Model.DeviceProfiles.Any(b => b.Count > 0))
{ {
<div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceProfile" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Device Profile"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceProfile" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Device Profile">
@if (userModel != null) <div class="brief">
{ @if (userModel != null)
<div class="brief"> {
<div> <div>
Add all users associated with a device in the selected profile to the bulk generation. Add all users associated with a device in the selected profile
</div> </div>
</div> }
} @if (deviceModel != null)
{
<div>
Add all devices in the selected profile
</div>
}
</div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceProfile())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceProfile()))
{ {
<input name="deviceProfileId" type="hidden" required /> <input name="deviceProfileId" type="hidden" required />
@@ -207,9 +213,18 @@
{ {
<div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceBatch" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Device Batch"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddDeviceBatch" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Device Batch">
<div class="brief"> <div class="brief">
<div> @if (userModel != null)
Add all users associated with a device in the selected batch to the bulk generation. {
</div> <div>
Add all users associated with a device in the selected batch
</div>
}
@if (deviceModel != null)
{
<div>
Add all devices in the selected batch
</div>
})
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceBatch())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDeviceBatch()))
{ {
@@ -232,9 +247,18 @@
{ {
<div id="DocumentTemplate_BulkGenerate_Dialog_AddDocumentAttachment" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Document Attachment"> <div id="DocumentTemplate_BulkGenerate_Dialog_AddDocumentAttachment" class="dialog dialog-bulk-generate" title="@(Model.DocumentTemplate.Description): Add by Document Attachment">
<div class="brief"> <div class="brief">
<div> @if (userModel != null)
Add all users associated with an attachment of the selected document template to the bulk generation. {
</div> <div>
Add all users associated with an attachment of the selected document template
</div>
}
@if (deviceModel != null)
{
<div>
Add all devices associated with an attachment of the selected document template
</div>
})
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDocumentAttachment())) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerateAddDocumentAttachment()))
{ {
@@ -264,13 +288,13 @@
@if (userModel != null) @if (userModel != null)
{ {
<div> <div>
Add all users with a matching user detail to the bulk generation. Add all users with a matching user detail
</div> </div>
} }
@if (deviceModel != null) @if (deviceModel != null)
{ {
<div> <div>
Add all devices assigned to users with a matching user detail to the bulk generation. Add all devices assigned to users with a matching user detail
</div> </div>
} }
</div> </div>
File diff suppressed because it is too large Load Diff
@@ -907,17 +907,17 @@ else
dataType: 'json', dataType: 'json',
url: url, url: url,
data: data, data: data,
complete: function (response, result) { complete: function (response) {
if (result != 'success') { if (response.status === 200) {
alert('Unable to change email settings:\nCheck logs for more information');
ajaxLoading.hide();
} else {
ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
if (!!$('#EmailSmtpServer').val()) { if (!!$('#EmailSmtpServer').val()) {
testButton.removeAttr('disabled'); testButton.removeAttr('disabled');
} else { } else {
testButton.attr('disabled', 'disabled'); testButton.attr('disabled', 'disabled');
} }
} else {
alert('Unable to change email settings:\nCheck logs for more information');
ajaxLoading.hide();
} }
} }
}); });
@@ -2753,46 +2753,46 @@ WriteLiteral("\';\r\n var data = {\r\n
" type: \'POST\',\r\n " + " type: \'POST\',\r\n " +
" dataType: \'json\',\r\n url: url,\r\n " + " dataType: \'json\',\r\n url: url,\r\n " +
" data: data,\r\n complet" + " data: data,\r\n complet" +
"e: function (response, result) {\r\n if (re" + "e: function (response) {\r\n if (response.s" +
"sult != \'success\') {\r\n alert(\'Unable " + "tatus === 200) {\r\n ajaxLoading.hide()" +
"to change email settings:\\nCheck logs for more information\');\r\n " +
" ajaxLoading.hide();\r\n " +
" } else {\r\n ajaxLoading.hide()" +
".next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " + ".next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " +
" if (!!$(\'#EmailSmtpServer\').val()) {\r\n " + " if (!!$(\'#EmailSmtpServer\').val()) {\r\n " +
" testButton.removeAttr(\'disabled\');\r\n " + " testButton.removeAttr(\'disabled\');\r\n " +
" } else {\r\n " + " } else {\r\n " +
" testButton.attr(\'disabled\', \'disabled\');\r\n " + " testButton.attr(\'disabled\', \'disabled\');\r\n " +
" }\r\n }\r\n " + " }\r\n } else {\r\n " +
" }\r\n });\r\n " + " alert(\'Unable to change email settings:\\nCheck logs f" +
"});\r\n\r\n testButton.closest(\'table\').find(\'td>input\')." + "or more information\');\r\n ajaxLoading." +
"change(function () {\r\n testButton.attr(\'disabled\'" + "hide();\r\n }\r\n " +
", \'disabled\');\r\n });\r\n tes" + " }\r\n });\r\n });\r" +
"tButton.click(function () {\r\n if (!testDialog) {\r" + "\n\r\n testButton.closest(\'table\').find(\'td>input\').chan" +
"\n testDialog = $(\'#Config_System_Email_Test_D" + "ge(function () {\r\n testButton.attr(\'disabled\', \'d" +
"ialog\')\r\n .dialog({\r\n " + "isabled\');\r\n });\r\n testBut" +
" resizable: false,\r\n " + "ton.click(function () {\r\n if (!testDialog) {\r\n " +
" height: 180,\r\n modal: true,\r\n " + " testDialog = $(\'#Config_System_Email_Test_Dialo" +
" autoOpen: false,\r\n " + "g\')\r\n .dialog({\r\n " +
" buttons: {\r\n " + " resizable: false,\r\n " +
" Send: function () {\r\n va" + " height: 180,\r\n modal: true,\r\n " +
"r $this = $(this);\r\n var reci" + " autoOpen: false,\r\n " +
"pientInput = $(\'#Config_System_Email_Test_Recipient\');\r\n " + " buttons: {\r\n " +
" if (!!recipientInput.val()) {\r\n " + " Send: function () {\r\n var $t" +
" $this.dialog(\"disable\");\r\n " + "his = $(this);\r\n var recipien" +
" $this.dialog(\"option\", \"buttons\", null);\r\n " + "tInput = $(\'#Config_System_Email_Test_Recipient\');\r\n " +
" recipientInput.closest(\'f" + " if (!!recipientInput.val()) {\r\n " +
"orm\').submit()\r\n } else {\r\n " + " $this.dialog(\"disable\");\r\n " +
" alert(\'Enter the recipient" + " $this.dialog(\"option\", \"buttons\", null);\r\n " +
" address for the test email\');\r\n " + " recipientInput.closest(\'form\'" +
" }\r\n },\r\n " + ").submit()\r\n } else {\r\n " +
" Cancel: function () {\r\n " + " alert(\'Enter the recipient add" +
" $(this).dialog(\"close\");\r\n " + "ress for the test email\');\r\n " +
" }\r\n }\r\n " + "}\r\n },\r\n " +
" });\r\n }\r\n " + " Cancel: function () {\r\n " +
" testDialog.dialog(\'open\');\r\n });\r\n\r" + " $(this).dialog(\"close\");\r\n " +
"\n });\r\n </script>\r\n </t" + " }\r\n }\r\n " +
"d>\r\n </tr>\r\n </table>\r\n </div>\r\n"); " });\r\n }\r\n " +
" testDialog.dialog(\'open\');\r\n });\r\n\r\n " +
" });\r\n </script>\r\n </td>\r\n" +
" </tr>\r\n </table>\r\n </div>\r\n");
#line 964 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 964 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"