ac24055365
initial - not feature complete
906 lines
29 KiB
C#
906 lines
29 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Areas.Config.Views.Export
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Export/Create.cshtml")]
|
|
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.CreateModel>
|
|
{
|
|
public Create()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.ManageSavedExports);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", null, "Create Saved " + Model.ExportTypeName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n\r\n");
|
|
|
|
|
|
#line 8 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
using (Html.BeginForm(MVC.Config.Export.Create(), FormMethod.Post))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 10 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 10 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 11 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.HiddenFor(m => m.Id));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 11 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_Details\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 530px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Save ");
|
|
|
|
|
|
#line 14 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ExportTypeName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h2>\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 140px\"");
|
|
|
|
WriteLiteral(">Name:</th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 19 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(model => model.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
">\r\n Description:<br />\r\n <em");
|
|
|
|
WriteLiteral(" class=\"small\"");
|
|
|
|
WriteLiteral(">Optional</em>\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 28 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(model => model.Description));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
|
|
|
|
|
#line 33 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_Schedule\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 530px; margin-top: 10px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Schedule</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
"<th");
|
|
|
|
WriteLiteral(" style=\"width: 140px\"");
|
|
|
|
WriteLiteral("> </th>\r\n <td>\r\n <label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 41 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleEnabled));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n Enable Scheduled Export\r\n </label>\r\n" +
|
|
" </td>\r\n </tr>\r\n <tr");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 1528), Tuple.Create("\"", 1578)
|
|
|
|
#line 46 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 1536), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 1536), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <th>\r\n Days:\r\n </th>\r\n " +
|
|
" <td>\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <li><label>");
|
|
|
|
|
|
#line 52 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleMonday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Monday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 53 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleTuesday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Tuesday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 54 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleWednesday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Wednesday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 55 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleThursday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Thursday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 56 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleFriday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Friday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 57 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleSaturday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Saturday</label></li>\r\n <li><label>");
|
|
|
|
|
|
#line 58 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.ScheduleSunday));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Sunday</label></li>\r\n </ul>\r\n </td>\r\n " +
|
|
" </tr>\r\n <tr");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 2480), Tuple.Create("\"", 2530)
|
|
|
|
#line 62 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 2488), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 2488), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <th>\r\n Start Time:\r\n </th>\r\n" +
|
|
" <td>\r\n <select");
|
|
|
|
WriteLiteral(" name=\"ScheduleStartHour\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 68 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 68 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteLiteral(" value=\"0\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 69 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleStartHour == 0 ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">12:00 AM</option>\r\n");
|
|
|
|
|
|
#line 70 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
for (int i = 1; i < 12; i++)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 2962), Tuple.Create("\"", 2972)
|
|
|
|
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 2970), Tuple.Create<System.Object, System.Int32>(i
|
|
|
|
#line default
|
|
#line hidden
|
|
, 2970), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleStartHour == i ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(i);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(":00 AM</option>\r\n");
|
|
|
|
|
|
#line 73 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteLiteral(" value=\"12\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 74 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleStartHour == 12 ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">12:00 PM</option>\r\n");
|
|
|
|
|
|
#line 75 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
for (int i = 13; i < 24; i++)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 3324), Tuple.Create("\"", 3334)
|
|
|
|
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3332), Tuple.Create<System.Object, System.Int32>(i
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3332), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleStartHour == i ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(i % 12);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(":00 PM</option>\r\n");
|
|
|
|
|
|
#line 78 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </select>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i> By default, Disco ICT shuts down at 1:30am and does not resume again until its needed. If a scheduled export was missed during this time, it will be run as soon as Disco ICT is resumed.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 3959), Tuple.Create("\"", 4009)
|
|
|
|
#line 88 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3967), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3967), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <th>\r\n Repeat Hourly Until:\r\n " +
|
|
" </th>\r\n <td>\r\n <select");
|
|
|
|
WriteLiteral(" name=\"ScheduleEndHour\"");
|
|
|
|
WriteLiteral(">\r\n <option");
|
|
|
|
WriteLiteral(" value=\"\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 94 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleEndHour.HasValue ? null : "selected");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">Run once</option>\r\n");
|
|
|
|
|
|
#line 95 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 95 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
for (int i = 1; i < 12; i++)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 4445), Tuple.Create("\"", 4455)
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4453), Tuple.Create<System.Object, System.Int32>(i
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4453), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleEndHour == i ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(i);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(":00 AM</option>\r\n");
|
|
|
|
|
|
#line 99 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteLiteral(" value=\"12\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 100 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleEndHour == 12 ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">12:00 PM</option>\r\n");
|
|
|
|
|
|
#line 101 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
for (int i = 12; i < 24; i++)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <option");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 4803), Tuple.Create("\"", 4813)
|
|
|
|
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4811), Tuple.Create<System.Object, System.Int32>(i
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4811), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Model.ScheduleEndHour == i ? "selected" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(i % 12);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(":00 PM</option>\r\n");
|
|
|
|
|
|
#line 104 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </select>\r\n </td>\r\n </tr>\r\n " +
|
|
" <tr");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 5037), Tuple.Create("\"", 5087)
|
|
|
|
#line 109 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5045), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5045), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <th>\r\n File System Location:\r\n " +
|
|
" </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 114 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.FilePath));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
|
|
|
WriteLiteral("></i> This is the full file path on the Disco ICT server (<code>");
|
|
|
|
|
|
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Environment.MachineName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>). The location may be a network path. The Disco ICT Service Account (<cod" +
|
|
"e>");
|
|
|
|
|
|
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Environment.UserDomainName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\\");
|
|
|
|
|
|
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Environment.UserName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>) must have write access to the location.\r\n </p>\r\n " +
|
|
" </div>\r\n <label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 121 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Html.EditorFor(m => m.TimestampSuffix));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Add time stamp suffix to file name\r\n </label>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
|
|
|
WriteLiteral("></i> This will create a new file each time the export runs.\r\n " +
|
|
" </p>\r\n </div>\r\n </td>\r\n </tr>\r" +
|
|
"\n </table>\r\n </div>\r\n");
|
|
|
|
|
|
#line 132 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_OnDemand\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 530px; margin-top: 10px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>On Demand Export</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 140px\"");
|
|
|
|
WriteLiteral(">\r\n Additional Users/Groups:\r\n </th>\r\n " +
|
|
" <td>\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_OnDemand_List\"");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 142 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 142 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
if (Model.OnDemandSubjects != null)
|
|
{
|
|
foreach (var sg in Model.OnDemandSubjects)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n <input");
|
|
|
|
WriteLiteral(" type=\"hidden\"");
|
|
|
|
WriteLiteral(" name=\"OnDemandPrincipals\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 6926), Tuple.Create("\"", 6940)
|
|
|
|
#line 147 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 6934), Tuple.Create<System.Object, System.Int32>(sg.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 6934), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 6984), Tuple.Create("\"", 7034)
|
|
, Tuple.Create(Tuple.Create("", 6992), Tuple.Create("fa", 6992), true)
|
|
, Tuple.Create(Tuple.Create(" ", 6994), Tuple.Create("fa-user", 6995), true)
|
|
|
|
#line 148 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7002), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "s" : null
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7002), false)
|
|
, Tuple.Create(Tuple.Create(" ", 7028), Tuple.Create("fa-lg", 7029), true)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 149 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(sg.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" [");
|
|
|
|
|
|
#line 149 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(sg.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-times-circle remove\"");
|
|
|
|
WriteLiteral("></i>\r\n </li>\r\n");
|
|
|
|
|
|
#line 152 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n <div>\r\n <in" +
|
|
"put");
|
|
|
|
WriteLiteral(" type=\"text\"");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_OnDemand_Input\"");
|
|
|
|
WriteLiteral(" placeholder=\"Search users and groups\"");
|
|
|
|
WriteLiteral(" data-url=\"");
|
|
|
|
|
|
#line 156 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Url.Action(MVC.API.System.SearchSubjects()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-subjecturl=\"");
|
|
|
|
|
|
#line 156 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
Write(Url.Action(MVC.API.System.Subject()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" />\r\n <button");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" id=\"Config_Export_Create_OnDemand_Add\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Add</button>\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i> Users with the Manage Saved Exports permission (including Disco ICT Administrators) can perform an on-demand export at any time.
|
|
Users or Group Members can be added to this list. These will also be able to perform an on-demand export using the link available after saving.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 169 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n <button");
|
|
|
|
WriteLiteral(" type=\"submit\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Save</button>\r\n </div>\r\n");
|
|
|
|
|
|
#line 173 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<script>\r\n $(function () {\r\n $(\'#ScheduleEnabled\').on(\'change\', functio" +
|
|
"n () {\r\n const enabled = $(this).is(\':checked\');\r\n $(\'#Con" +
|
|
"fig_Export_Create_Schedule tr:not(:first)\').toggleClass(\'hidden\', !enabled);\r\n " +
|
|
" });\r\n\r\n const onDemandInput = $(\'#Config_Export_Create_OnDemand_Inp" +
|
|
"ut\');\r\n\r\n onDemandInput\r\n .autocomplete({\r\n sou" +
|
|
"rce: onDemandInput.attr(\'data-url\'),\r\n minLength: 2,\r\n " +
|
|
" focus: function (e, ui) {\r\n onDemandInput.val(ui.item.Id" +
|
|
");\r\n return false;\r\n },\r\n selec" +
|
|
"t: function (e, ui) {\r\n onDemandInput.val(ui.item.Id).blur();" +
|
|
"\r\n return false;\r\n }\r\n }).data(\'ui-" +
|
|
"autocomplete\')._renderItem = function (ul, item) {\r\n return $(\"<l" +
|
|
"i></li>\")\r\n .data(\"item.autocomplete\", item)\r\n " +
|
|
" .append(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item" +
|
|
".Type + \")</a>\")\r\n .appendTo(ul);\r\n };\r\n $(" +
|
|
"\'#Config_Export_Create_OnDemand_Add\').on(\'click\', async function () {\r\n " +
|
|
" const id = onDemandInput.val();\r\n const body = new FormData();\r\n " +
|
|
" body.append(\'Id\', id);\r\n const response = await fetch(onDem" +
|
|
"andInput.attr(\'data-subjecturl\'), {\r\n method: \'POST\',\r\n " +
|
|
" body: body\r\n });\r\n if (!response.ok) {\r\n " +
|
|
" alert(\'Error: \' + response.statusText);\r\n return;\r\n " +
|
|
" }\r\n const data = await response.json();\r\n\r\n if (!data.Is" +
|
|
"Group && !data.IsUserAccount) {\r\n alert(\'Error: Only users and gr" +
|
|
"oups can be added.\');\r\n return;\r\n }\r\n\r\n con" +
|
|
"st $li = $(\'<li><input type=\"hidden\" name=\"OnDemandPrincipals\" /><i class=\"fa fa" +
|
|
"-lg\"></i> <span></span><i class=\"fa fa-times-circle remove\"></i></li>\');\r\n " +
|
|
" $li.find(\'input\').val(data.Id);\r\n $li.find(\'i.fa-lg\').addClass(" +
|
|
"data.Type === \'user\' ? \'fa-user\' : \'fa-users\');\r\n $li.find(\'span\').te" +
|
|
"xt(data.Name + \' [\' + data.Id + \']\');\r\n $li.appendTo(\'#Config_Export_" +
|
|
"Create_OnDemand_List\');\r\n });\r\n $(\'#Config_Export_Create_OnDemand_" +
|
|
"List\').on(\'click\', \'.remove\', function () {\r\n $(this).closest(\'li\').r" +
|
|
"emove();\r\n })\r\n })\r\n</script>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|