#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.Views.Job
{
    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;
    
    #line 1 "..\..\Views\Job\Export.cshtml"
    using Disco.Web.Models.Job;
    
    #line default
    #line hidden
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Export.cshtml")]
    public partial class Export : Disco.Services.Web.WebViewPage<ExportModel>
    {
        public Export()
        {
        }
        public override void Execute()
        {
            
            #line 3 "..\..\Views\Job\Export.cshtml"
  
    Authorization.RequireAny(Claims.Job.Actions.Export);

    ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Export Jobs");

    var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
    var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
        .GroupBy(m => m.ShortDisplayName);

            
            #line default
            #line hidden
WriteLiteral("\r\n<div");

WriteLiteral(" id=\"Jobs_Export\"");

WriteLiteral(">\r\n");

            
            #line 13 "..\..\Views\Job\Export.cshtml"
    
            
            #line default
            #line hidden
            
            #line 13 "..\..\Views\Job\Export.cshtml"
     using (Html.BeginForm(MVC.API.Job.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Job.SaveExport()) }))
    {
        
            
            #line default
            #line hidden
            
            #line 15 "..\..\Views\Job\Export.cshtml"
   Write(Html.AntiForgeryToken());

            
            #line default
            #line hidden
            
            #line 15 "..\..\Views\Job\Export.cshtml"
                                

            
            #line default
            #line hidden
WriteLiteral("        <div");

WriteLiteral(" id=\"Jobs_Export_Type\"");

WriteLiteral(" class=\"form\"");

WriteLiteral(" style=\"width: 570px\"");

WriteLiteral(">\r\n            <h2>Export Filter</h2>\r\n            <table>\r\n                <tr>\r" +
"\n                    <th");

WriteLiteral(" style=\"width: 150px\"");

WriteLiteral(">\r\n                        Start Date:\r\n                    </th>\r\n              " +
"      <td>\r\n");

WriteLiteral("                        ");

            
            #line 24 "..\..\Views\Job\Export.cshtml"
                   Write(Html.EditorFor(m => m.Options.FilterStartDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                        ");

            
            #line 25 "..\..\Views\Job\Export.cshtml"
                   Write(Html.ValidationMessageFor(m => m.Options.FilterStartDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n       " +
"             <th>End Date:</th>\r\n                    <td>\r\n");

WriteLiteral("                        ");

            
            #line 31 "..\..\Views\Job\Export.cshtml"
                   Write(Html.EditorFor(m => m.Options.FilterEndDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                        ");

            
            #line 32 "..\..\Views\Job\Export.cshtml"
                   Write(Html.ValidationMessageFor(m => m.Options.FilterEndDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n       " +
"             <th>Status:</th>\r\n                    <td>\r\n");

WriteLiteral("                        ");

            
            #line 38 "..\..\Views\Job\Export.cshtml"
                   Write(Html.DropDownListFor(m => m.Options.FilterJobStatusId, m => m.JobStatuses, i => i.Key, i => i.Value, "-- All Jobs --"));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n       " +
"             <td");

WriteLiteral(" colspan=\"2\"");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n                        <table");

WriteLiteral(" class=\"sub\"");

WriteLiteral(">\r\n                            <tr>\r\n                                <th");

WriteLiteral(" style=\"width: 150px; text-align: right;\"");

WriteLiteral(">Type:</th>\r\n                                <td>\r\n");

WriteLiteral("                                    ");

            
            #line 47 "..\..\Views\Job\Export.cshtml"
                               Write(Html.DropDownListFor(m => m.Options.FilterJobTypeId, m => m.JobTypes, i => i.Id, i => i.Description, "-- All Jobs --"));

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </td>\r\n                            </tr>\r\n     " +
"                       <tr>\r\n                                <td");

WriteLiteral(" colspan=\"2\"");

WriteLiteral(" id=\"Jobs_Export_SubTypes\"");

WriteLiteral(">\r\n");

            
            #line 52 "..\..\Views\Job\Export.cshtml"
                                    
            
            #line default
            #line hidden
            
            #line 52 "..\..\Views\Job\Export.cshtml"
                                     foreach (var jobType in Model.JobTypes)
                                    {
                                        var subTypes = jobType.JobSubTypes.OrderBy(s => s.Description).ToList();
                                        var itemsPerColumn = (int)Math.Ceiling((double)subTypes.Count / 2);

            
            #line default
            #line hidden
WriteLiteral("                                        <div");

WriteAttribute("id", Tuple.Create(" id=\"", 2721), Tuple.Create("\"", 2760)
, Tuple.Create(Tuple.Create("", 2726), Tuple.Create("Jobs_Export_SubTypes_", 2726), true)
            
            #line 56 "..\..\Views\Job\Export.cshtml"
, Tuple.Create(Tuple.Create("", 2747), Tuple.Create<System.Object, System.Int32>(jobType.Id
            
            #line default
            #line hidden
, 2747), false)
);

WriteLiteral(" class=\"Jobs_Export_SubType_Target\"");

WriteLiteral(" data-typeid=\"");

            
            #line 56 "..\..\Views\Job\Export.cshtml"
                                                                                                                                Write(jobType.Id);

            
            #line default
            #line hidden
WriteLiteral("\"");

WriteLiteral(">\r\n");

            
            #line 57 "..\..\Views\Job\Export.cshtml"
                                            
            
            #line default
            #line hidden
            
            #line 57 "..\..\Views\Job\Export.cshtml"
                                             if (jobType.JobSubTypes.Count > 2)
                                            {

            
            #line default
            #line hidden
WriteLiteral("                                                <span");

WriteLiteral(" class=\"select\"");

WriteLiteral("><a");

WriteLiteral(" class=\"selectAll\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">ALL</a> | <a");

WriteLiteral(" class=\"selectNone\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">NONE</a></span>\r\n");

            
            #line 60 "..\..\Views\Job\Export.cshtml"
                                            }

            
            #line default
            #line hidden
WriteLiteral("                                            <table");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n                                                <tr>\r\n                        " +
"                            <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                                        <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 65 "..\..\Views\Job\Export.cshtml"
                                                            
            
            #line default
            #line hidden
            
            #line 65 "..\..\Views\Job\Export.cshtml"
                                                             foreach (var subType in subTypes.Take(itemsPerColumn))
                                                            {

            
            #line default
            #line hidden
WriteLiteral("                                                                <li>\r\n           " +
"                                                         <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 3769), Tuple.Create("\"", 3822)
, Tuple.Create(Tuple.Create("", 3774), Tuple.Create("Jobs_Export_SubTypes_", 3774), true)
            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                     , Tuple.Create(Tuple.Create("", 3795), Tuple.Create<System.Object, System.Int32>(jobType.Id
            
            #line default
            #line hidden
, 3795), false)
, Tuple.Create(Tuple.Create("", 3808), Tuple.Create("_", 3808), true)
            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 3809), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 3809), false)
);

WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");

WriteAttribute("value", Tuple.Create(" value=\"", 3858), Tuple.Create("\"", 3877)
            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                                                                           , Tuple.Create(Tuple.Create("", 3866), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 3866), false)
);

WriteLiteral(" ");

            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                    Write((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 4014), Tuple.Create("\"", 4068)
, Tuple.Create(Tuple.Create("", 4020), Tuple.Create("Jobs_Export_SubTypes_", 4020), true)
            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                           , Tuple.Create(Tuple.Create("", 4041), Tuple.Create<System.Object, System.Int32>(jobType.Id
            
            #line default
            #line hidden
, 4041), false)
, Tuple.Create(Tuple.Create("", 4054), Tuple.Create("_", 4054), true)
            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                                         , Tuple.Create(Tuple.Create("", 4055), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 4055), false)
);

WriteLiteral(">");

            
            #line 68 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                                                                                                                                  Write(subType.Description);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                                                </li>\r\n" +
"");

            
            #line 70 "..\..\Views\Job\Export.cshtml"
                                                            }

            
            #line default
            #line hidden
WriteLiteral("                                                        </ul>\r\n                  " +
"                                  </td>\r\n                                       " +
"             <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                                        <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 75 "..\..\Views\Job\Export.cshtml"
                                                            
            
            #line default
            #line hidden
            
            #line 75 "..\..\Views\Job\Export.cshtml"
                                                             foreach (var subType in subTypes.Skip(itemsPerColumn))
                                                            {

            
            #line default
            #line hidden
WriteLiteral("                                                                <li>\r\n           " +
"                                                         <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 4848), Tuple.Create("\"", 4901)
, Tuple.Create(Tuple.Create("", 4853), Tuple.Create("Jobs_Export_SubTypes_", 4853), true)
            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                     , Tuple.Create(Tuple.Create("", 4874), Tuple.Create<System.Object, System.Int32>(jobType.Id
            
            #line default
            #line hidden
, 4874), false)
, Tuple.Create(Tuple.Create("", 4887), Tuple.Create("_", 4887), true)
            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 4888), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 4888), false)
);

WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");

WriteAttribute("value", Tuple.Create(" value=\"", 4937), Tuple.Create("\"", 4956)
            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                                                                           , Tuple.Create(Tuple.Create("", 4945), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 4945), false)
);

WriteLiteral(" ");

            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                    Write((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 5093), Tuple.Create("\"", 5147)
, Tuple.Create(Tuple.Create("", 5099), Tuple.Create("Jobs_Export_SubTypes_", 5099), true)
            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                           , Tuple.Create(Tuple.Create("", 5120), Tuple.Create<System.Object, System.Int32>(jobType.Id
            
            #line default
            #line hidden
, 5120), false)
, Tuple.Create(Tuple.Create("", 5133), Tuple.Create("_", 5133), true)
            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                                         , Tuple.Create(Tuple.Create("", 5134), Tuple.Create<System.Object, System.Int32>(subType.Id
            
            #line default
            #line hidden
, 5134), false)
);

WriteLiteral(">");

            
            #line 78 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                                                                                                                                                  Write(subType.Description);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                                                </li>\r\n" +
"");

            
            #line 80 "..\..\Views\Job\Export.cshtml"
                                                            }

            
            #line default
            #line hidden
WriteLiteral(@"                                                        </ul>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
");

            
            #line 86 "..\..\Views\Job\Export.cshtml"
                                    }

            
            #line default
            #line hidden
WriteLiteral("                                </td>\r\n                            </tr>\r\n       " +
"                 </table>\r\n                    </td>\r\n                </tr>\r\n   " +
"             <tr>\r\n                    <th>Job Queue:</th>\r\n                    " +
"<td>\r\n");

WriteLiteral("                        ");

            
            #line 95 "..\..\Views\Job\Export.cshtml"
                   Write(Html.DropDownListFor(m => m.Options.FilterJobQueueId, m => m.JobQueues, i => i.Id.ToString(), i => i.Name, "-- All Jobs --"));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n       " +
"             <th>");

            
            #line 99 "..\..\Views\Job\Export.cshtml"
                   Write(Html.LabelFor(m => m.Options.Format));

            
            #line default
            #line hidden
WriteLiteral("</th>\r\n                    <td>\r\n");

WriteLiteral("                        ");

            
            #line 101 "..\..\Views\Job\Export.cshtml"
                   Write(Html.DropDownListFor(m => m.Options.Format, m => Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)), i => i, i => i));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n            </table>\r\n       " +
" </div>\r\n");

WriteLiteral("        <div");

WriteLiteral(" id=\"Jobs_Export_Fields\"");

WriteLiteral(" class=\"form\"");

WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");

WriteLiteral(">\r\n            <h2>Export Fields <a");

WriteLiteral(" id=\"Jobs_Export_Fields_Defaults\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">(Defaults)</a></h2>\r\n            <table>\r\n");

            
            #line 109 "..\..\Views\Job\Export.cshtml"
                
            
            #line default
            #line hidden
            
            #line 109 "..\..\Views\Job\Export.cshtml"
                 foreach (var optionGroup in optionGroups)
                {
                    var optionFields = optionGroup.ToList();
                    var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);

            
            #line default
            #line hidden
WriteLiteral("                    <tr>\r\n                        <th");

WriteLiteral(" style=\"width: 120px;\"");

WriteLiteral(">\r\n");

WriteLiteral("                            ");

            
            #line 115 "..\..\Views\Job\Export.cshtml"
                       Write(optionGroup.Key);

            
            #line default
            #line hidden
WriteLiteral("\r\n");

            
            #line 116 "..\..\Views\Job\Export.cshtml"
                            
            
            #line default
            #line hidden
            
            #line 116 "..\..\Views\Job\Export.cshtml"
                             if (optionFields.Count > 2)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span");

WriteLiteral(" style=\"display: block;\"");

WriteLiteral(" class=\"select\"");

WriteLiteral("><a");

WriteLiteral(" class=\"selectAll\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">ALL</a> | <a");

WriteLiteral(" class=\"selectNone\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">NONE</a></span>\r\n");

            
            #line 119 "..\..\Views\Job\Export.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </th>\r\n                        <td>\r\n                    " +
"        <div");

WriteLiteral(" class=\"Jobs_Export_Fields_Group\"");

WriteLiteral(">\r\n                                <table");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n                                    <tr>\r\n                                    " +
"    <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                            <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 127 "..\..\Views\Job\Export.cshtml"
                                                
            
            #line default
            #line hidden
            
            #line 127 "..\..\Views\Job\Export.cshtml"
                                                 foreach (var optionItem in optionFields.Take(itemsPerColumn))
                                                {

            
            #line default
            #line hidden
WriteLiteral("                                                    <li");

WriteAttribute("title", Tuple.Create(" title=\"", 7857), Tuple.Create("\"", 7888)
            
            #line 129 "..\..\Views\Job\Export.cshtml"
, Tuple.Create(Tuple.Create("", 7865), Tuple.Create<System.Object, System.Int32>(optionItem.Description
            
            #line default
            #line hidden
, 7865), false)
);

WriteLiteral(">\r\n                                                        <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 7970), Tuple.Create("\"", 8007)
, Tuple.Create(Tuple.Create("", 7975), Tuple.Create("Options_", 7975), true)
            
            #line 130 "..\..\Views\Job\Export.cshtml"
           , Tuple.Create(Tuple.Create("", 7983), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 7983), false)
);

WriteAttribute("name", Tuple.Create(" name=\"", 8008), Tuple.Create("\"", 8047)
, Tuple.Create(Tuple.Create("", 8015), Tuple.Create("Options.", 8015), true)
            
            #line 130 "..\..\Views\Job\Export.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 8023), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 8023), false)
);

WriteLiteral(" value=\"true\"");

WriteLiteral(" ");

            
            #line 130 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                      Write(((bool)optionItem.Model) ? "checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 8118), Tuple.Create("\"", 8156)
, Tuple.Create(Tuple.Create("", 8124), Tuple.Create("Options_", 8124), true)
            
            #line 130 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                , Tuple.Create(Tuple.Create("", 8132), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 8132), false)
);

WriteLiteral(">");

            
            #line 130 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                     Write(optionItem.DisplayName);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                                    </li>\r\n");

            
            #line 132 "..\..\Views\Job\Export.cshtml"
                                                }

            
            #line default
            #line hidden
WriteLiteral("                                            </ul>\r\n                              " +
"          </td>\r\n                                        <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                            <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 137 "..\..\Views\Job\Export.cshtml"
                                                
            
            #line default
            #line hidden
            
            #line 137 "..\..\Views\Job\Export.cshtml"
                                                 foreach (var optionItem in optionFields.Skip(itemsPerColumn))
                                                {

            
            #line default
            #line hidden
WriteLiteral("                                                    <li");

WriteAttribute("title", Tuple.Create(" title=\"", 8745), Tuple.Create("\"", 8776)
            
            #line 139 "..\..\Views\Job\Export.cshtml"
, Tuple.Create(Tuple.Create("", 8753), Tuple.Create<System.Object, System.Int32>(optionItem.Description
            
            #line default
            #line hidden
, 8753), false)
);

WriteLiteral(">\r\n                                                        <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 8858), Tuple.Create("\"", 8895)
, Tuple.Create(Tuple.Create("", 8863), Tuple.Create("Options_", 8863), true)
            
            #line 140 "..\..\Views\Job\Export.cshtml"
           , Tuple.Create(Tuple.Create("", 8871), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 8871), false)
);

WriteAttribute("name", Tuple.Create(" name=\"", 8896), Tuple.Create("\"", 8935)
, Tuple.Create(Tuple.Create("", 8903), Tuple.Create("Options.", 8903), true)
            
            #line 140 "..\..\Views\Job\Export.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 8911), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 8911), false)
);

WriteLiteral(" value=\"true\"");

WriteLiteral(" ");

            
            #line 140 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                      Write(((bool)optionItem.Model) ? "checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 9006), Tuple.Create("\"", 9044)
, Tuple.Create(Tuple.Create("", 9012), Tuple.Create("Options_", 9012), true)
            
            #line 140 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                , Tuple.Create(Tuple.Create("", 9020), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
            
            #line default
            #line hidden
, 9020), false)
);

WriteLiteral(">");

            
            #line 140 "..\..\Views\Job\Export.cshtml"
                                                                                                                                                                                                                                                                     Write(optionItem.DisplayName);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                                    </li>\r\n");

            
            #line 142 "..\..\Views\Job\Export.cshtml"
                                                }

            
            #line default
            #line hidden
WriteLiteral(@"                                            </ul>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
");

            
            #line 150 "..\..\Views\Job\Export.cshtml"

                }

            
            #line default
            #line hidden
WriteLiteral("            </table>\r\n        </div>\r\n");

WriteLiteral("        <script>\r\n            $(function () {\r\n                const $FilterStart" +
"Date = $(\'#Options_FilterStartDate\');\r\n                const $FilterEndDate = $(" +
"\'#Options_FilterEndDate\');\r\n                const $FilterJobTypeId = $(\'#Options" +
"_FilterJobTypeId\');\r\n\r\n                $FilterStartDate.attr(\'type\', \'date\');\r\n " +
"               $FilterEndDate.attr(\'type\', \'date\');\r\n\r\n                var expor" +
"tDefaultFields = [\'JobId\', \'JobStatus\', \'JobType\', \'JobSubTypes\', \'JobOpenedDate" +
"\', \'DeviceSerialNumber\', \'DeviceModelDescription\', \'DeviceProfileName\', \'UserId\'" +
", \'UserDisplayName\'];\r\n                var $exportFields = $(\'#Jobs_Export_Field" +
"s\');\r\n                var $form = $FilterStartDate.closest(\'form\');\r\n\r\n         " +
"       function exportTypeChange() {\r\n                    $exportTypeTargetConta" +
"iners.hide();\r\n                    $exportTypeTargetContainers.find(\'select\').pr" +
"op(\'disabled\', true);\r\n\r\n                    switch ($exportType.val()) {\r\n     " +
"                   case \'Batch\':\r\n                            $(\'#Devices_Export" +
"_Type_Target_Batch\').show().find(\'select\').prop(\'disabled\', false);\r\n           " +
"                 break;\r\n                        case \'Profile\':\r\n              " +
"              $(\'#Devices_Export_Type_Target_Profile\').show().find(\'select\').pro" +
"p(\'disabled\', false);\r\n                            break;\r\n                     " +
"   case \'Model\':\r\n                            $(\'#Devices_Export_Type_Target_Mod" +
"el\').show().find(\'select\').prop(\'disabled\', false);\r\n                           " +
" break;\r\n                    }\r\n                }\r\n                $FilterJobTyp" +
"eId\r\n                    .on(\'change\', function (e) {\r\n                        $" +
"(\'#Jobs_Export_SubTypes\').hide()\r\n                            .find(\'.Jobs_Expor" +
"t_SubType_Target\').hide()\r\n                            .find(\'input\').prop(\'disa" +
"bled\', true);\r\n\r\n                        const type = $(e.currentTarget).val();\r" +
"\n                        if (type) {\r\n                            $(\'#Jobs_Expor" +
"t_SubTypes\').show()\r\n                            $(\'#Jobs_Export_SubTypes_\' + ty" +
"pe).show()\r\n                                .find(\'input\').prop(\'disabled\', fals" +
"e);\r\n                        }\r\n                    }).trigger(\'change\');\r\n     " +
"           $(\'#Jobs_Export_SubTypes\').on(\'click\', \'a.selectAll,a.selectNone\', fu" +
"nction (e) {\r\n                    e.preventDefault();\r\n                    var $" +
"this = $(this);\r\n                    $this.closest(\'div\').find(\'input\').prop(\'ch" +
"ecked\', $this.is(\'.selectAll\'));\r\n                    return false;\r\n           " +
"     });\r\n\r\n                $exportFields.on(\'click\', \'a.selectAll,a.selectNone\'" +
", function (e) {\r\n                    e.preventDefault();\r\n                    v" +
"ar $this = $(this);\r\n                    $this.closest(\'tr\').find(\'input\').prop(" +
"\'checked\', $this.is(\'.selectAll\'));\r\n                    return false;\r\n        " +
"        });\r\n\r\n                $(\'#Jobs_Export_Fields_Defaults\').click(function " +
"(e) {\r\n                    e.preventDefault();\r\n\r\n                    $exportFie" +
"lds.find(\'input\').prop(\'checked\', false);\r\n\r\n                    $.each(exportDe" +
"faultFields, function (index, value) {\r\n                        $(\'#Options_\' + " +
"value).prop(\'checked\', true);\r\n                    });\r\n\r\n                    re" +
"turn false;\r\n                });\r\n\r\n                $.validator.unobtrusive.pars" +
"e($form);\r\n                $form.data(\"validator\").settings.submitHandler = func" +
"tion () {\r\n                    var exportFieldCount = $exportFields.find(\'input:" +
"checked\').length;\r\n\r\n                    if (exportFieldCount > 0) {\r\n\r\n        " +
"                const $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n      " +
"                      width: 400,\r\n                            height: 164,\r\n   " +
"                         resizable: false,\r\n                            modal: t" +
"rue,\r\n                            autoOpen: true\r\n                        });\r\n\r" +
"\n                        $form[0].submit();\r\n                    }\r\n            " +
"        else\r\n                        alert(\'Select at least one field to export" +
".\');\r\n                };\r\n\r\n                $(\'#Jobs_Export_Button\').click(funct" +
"ion () {\r\n                    $form.submit();\r\n                });\r\n            " +
"    $(\'#Jobs_Export_Save_Button\').click(function () {\r\n                    $form" +
".attr(\'action\', $form[0].dataset.saveaction);\r\n                    $form.submit(" +
");\r\n                });\r\n            });\r\n        </script>\r\n");

            
            #line 251 "..\..\Views\Job\Export.cshtml"
    }

            
            #line default
            #line hidden
WriteLiteral("</div>\r\n");

            
            #line 253 "..\..\Views\Job\Export.cshtml"
 if (Model.ExportId.HasValue)
{

            
            #line default
            #line hidden
WriteLiteral("    <div");

WriteLiteral(" id=\"Export_Download_Dialog\"");

WriteLiteral(" class=\"dialog\"");

WriteLiteral(" title=\"Export Jobs\"");

WriteLiteral(">\r\n");

            
            #line 256 "..\..\Views\Job\Export.cshtml"
        
            
            #line default
            #line hidden
            
            #line 256 "..\..\Views\Job\Export.cshtml"
         if (Model.ExportResult.RecordCount == 0)
        {

            
            #line default
            #line hidden
WriteLiteral("            <h4>No records matched the filter criteria</h4>\r\n");

            
            #line 259 "..\..\Views\Job\Export.cshtml"
        }
        else
        {

            
            #line default
            #line hidden
WriteLiteral("            <h4>");

            
            #line 262 "..\..\Views\Job\Export.cshtml"
           Write(Model.ExportResult.RecordCount);

            
            #line default
            #line hidden
WriteLiteral(" record");

            
            #line 262 "..\..\Views\Job\Export.cshtml"
                                                  Write(Model.ExportResult.RecordCount != 1 ? "s" : null);

            
            #line default
            #line hidden
WriteLiteral(" were successfully exported.</h4>\r\n");

WriteLiteral("            <a");

WriteAttribute("href", Tuple.Create(" href=\"", 14423), Tuple.Create("\"", 14491)
            
            #line 263 "..\..\Views\Job\Export.cshtml"
, Tuple.Create(Tuple.Create("", 14430), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
            
            #line default
            #line hidden
, 14430), false)
);

WriteLiteral(" class=\"button\"");

WriteLiteral("><i");

WriteLiteral(" class=\"fa fa-download fa-lg\"");

WriteLiteral("></i>Download Job Export</a>\r\n");

            
            #line 264 "..\..\Views\Job\Export.cshtml"
        }

            
            #line default
            #line hidden
WriteLiteral("    </div>\r\n");

WriteLiteral(@"    <script>
        $(function () {
            $('#Export_Download_Dialog')
                .dialog({
                    width: 400,
                    height: 164,
                    resizable: false,
                    modal: true,
                    autoOpen: true
                });
        });
    </script>
");

            
            #line 278 "..\..\Views\Job\Export.cshtml"
}

            
            #line default
            #line hidden
WriteLiteral("<div");

WriteLiteral(" id=\"Export_Exporting\"");

WriteLiteral(" class=\"dialog\"");

WriteLiteral(" title=\"Exporting Jobs...\"");

WriteLiteral(">\r\n    <h4><i");

WriteLiteral(" class=\"fa fa-lg fa-cog fa-spin\"");

WriteLiteral(" title=\"Please Wait\"");

WriteLiteral("></i>Exporting jobs...</h4>\r\n</div>\r\n<div");

WriteLiteral(" class=\"actionBar\"");

WriteLiteral(">\r\n");

            
            #line 283 "..\..\Views\Job\Export.cshtml"
    
            
            #line default
            #line hidden
            
            #line 283 "..\..\Views\Job\Export.cshtml"
     if (Authorization.Has(Claims.Config.ManageSavedExports))
    {

            
            #line default
            #line hidden
WriteLiteral("        <button");

WriteLiteral(" type=\"button\"");

WriteLiteral(" id=\"Jobs_Export_Save_Button\"");

WriteLiteral(" class=\"button\"");

WriteLiteral(">Save Export</button>\r\n");

            
            #line 286 "..\..\Views\Job\Export.cshtml"
    }
    else
    {

            
            #line default
            #line hidden
WriteLiteral("        <button");

WriteLiteral(" type=\"button\"");

WriteLiteral(" class=\"button\"");

WriteLiteral(" disabled");

WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");

WriteLiteral(">Save Export</button>\r\n");

            
            #line 290 "..\..\Views\Job\Export.cshtml"
    }

            
            #line default
            #line hidden
WriteLiteral("\r\n    <button");

WriteLiteral(" id=\"Jobs_Export_Button\"");

WriteLiteral(" type=\"button\"");

WriteLiteral(" class=\"button\"");

WriteLiteral(">Export Now</button>\r\n</div>\r\n");

        }
    }
}
#pragma warning restore 1591
