235 lines
10 KiB
C#
235 lines
10 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.Shared
|
|
{
|
|
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/Shared/LinkedGroupShared.cshtml")]
|
|
public partial class LinkedGroupShared : Disco.Services.Web.WebViewPage<dynamic>
|
|
{
|
|
public LinkedGroupShared()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 1 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
|
|
|
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_Dialog\"");
|
|
|
|
WriteLiteral(" title=\"Linked Group\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(">\r\n <h3");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_Title\"");
|
|
|
|
WriteLiteral("></h3>\r\n <form");
|
|
|
|
WriteLiteral(" action=\"#\"");
|
|
|
|
WriteLiteral(" method=\"post\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 7 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <table");
|
|
|
|
WriteLiteral(" class=\"input\"");
|
|
|
|
WriteLiteral(">\r\n <tbody>\r\n <tr>\r\n <th>\r\n " +
|
|
" <label");
|
|
|
|
WriteLiteral(" for=\"Config_LinkedGroup_Id\"");
|
|
|
|
WriteLiteral(">Linked Group:</label>\r\n </th>\r\n <td>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_Id\"");
|
|
|
|
WriteLiteral(" type=\"text\"");
|
|
|
|
WriteLiteral(" name=\"groupId\"");
|
|
|
|
WriteLiteral(" data-sourceurl=\"");
|
|
|
|
|
|
#line 15 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
|
Write(Url.Action(MVC.API.System.SearchGroupSubjects()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>\r\n <label");
|
|
|
|
WriteLiteral(" for=\"Config_LinkedGroup_FilterDate\"");
|
|
|
|
WriteLiteral(">Filter Date: </label>\r\n </th>\r\n <td>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_FilterDate\"");
|
|
|
|
WriteLiteral(" type=\"text\"");
|
|
|
|
WriteLiteral(" name=\"filterBeginDate\"");
|
|
|
|
WriteLiteral(" placeholder=\"No Filter\"");
|
|
|
|
WriteLiteral(" autocomplete=\"off\"");
|
|
|
|
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th> </th>\r\n <td>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_UpdateDescriptionOff\"");
|
|
|
|
WriteLiteral(" type=\"hidden\"");
|
|
|
|
WriteLiteral(" name=\"updateDescription\"");
|
|
|
|
WriteLiteral(" value=\"False\"");
|
|
|
|
WriteLiteral(" disabled />\r\n <input");
|
|
|
|
WriteLiteral(" id=\"Config_LinkedGroup_UpdateDescription\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" name=\"updateDescription\"");
|
|
|
|
WriteLiteral(" value=\"True\"");
|
|
|
|
WriteLiteral(" checked />\r\n <label");
|
|
|
|
WriteLiteral(" for=\"Config_LinkedGroup_UpdateDescription\"");
|
|
|
|
WriteLiteral(">Update Group Description</label>\r\n </td>\r\n </t" +
|
|
"r>\r\n </tbody>\r\n </table>\r\n </form>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box error\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-circle\"");
|
|
|
|
WriteLiteral("></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />\r\n " +
|
|
" Any <strong>existing members will be removed from the group</strong>, " +
|
|
"and it will be automatically synchronized with related members.\r\n If " +
|
|
"the \'Update Group Description\' option is selected, the group\'s description will " +
|
|
"also be updated to reflect its managed status.\r\n </p>\r\n </div>\r\n</div>" +
|
|
"\r\n<script>\r\n $(function () {\r\n let dialog;\r\n let dialogGroupId;" +
|
|
"\r\n let dialogFilterDate;\r\n let dialogUpdateDescription;\r\n l" +
|
|
"et dialogTitle;\r\n\r\n function showDialog(groupId, filterDateOption, filter" +
|
|
"DateValue, updateUrl, title, updateDescription) {\r\n if (dialog == nul" +
|
|
"l) {\r\n dialog = $(\'#Config_LinkedGroup_Dialog\').dialog({\r\n " +
|
|
" width: 450,\r\n resizable: false,\r\n " +
|
|
" modal: true,\r\n autoOpen: false\r\n });\r\n\r\n " +
|
|
" dialogFilterDate = $(\'#Config_LinkedGroup_FilterDate\');\r\n " +
|
|
" dialogFilterDate.datetimepicker({\r\n ampm: true,\r\n " +
|
|
" changeYear: true,\r\n changeMonth: true,\r\n " +
|
|
" dateFormat: \'yy/mm/dd\'\r\n });\r\n\r\n di" +
|
|
"alogUpdateDescription = $(\'#Config_LinkedGroup_UpdateDescription\').on(\'change\', " +
|
|
"function () {\r\n $(\'#Config_LinkedGroup_UpdateDescriptionOff\')" +
|
|
".prop(\'disabled\', $(this).prop(\'checked\'));\r\n });\r\n\r\n " +
|
|
" dialogGroupId = $(\'#Config_LinkedGroup_Id\');\r\n dialogGroupId." +
|
|
"focus(function () { $(this).select(); });\r\n dialogGroupId.autocom" +
|
|
"plete({\r\n source: dialogGroupId.attr(\'data-sourceurl\'),\r\n " +
|
|
" minLength: 2,\r\n select: function (e, ui) {\r\n " +
|
|
" dialogGroupId.val(ui.item.Id);\r\n r" +
|
|
"eturn false;\r\n }\r\n }).data(\'ui-autocomplete\')." +
|
|
"_renderItem = function (ul, item) {\r\n return $(\"<li>\")\r\n " +
|
|
" .data(\"item.autocomplete\", item)\r\n .ap" +
|
|
"pend(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item.Type + " +
|
|
"\")</a>\")\r\n .appendTo(ul);\r\n };\r\n\r\n " +
|
|
" dialogTitle = $(\'#Config_LinkedGroup_Title\');\r\n }\r\n\r\n " +
|
|
" var dialogButtons = {};\r\n if (!!groupId) {\r\n dialo" +
|
|
"gButtons[\'Remove Link\'] = function () {\r\n $(this).dialog(\'dis" +
|
|
"able\');\r\n dialogGroupId.val(\'\');\r\n dialogG" +
|
|
"roupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n }\r\n " +
|
|
" }\r\n dialogButtons[(!!groupId ? \'Save Changes\' : \'Link Grou" +
|
|
"p\')] = function () {\r\n if (!dialogGroupId.val()) {\r\n " +
|
|
" alert(\'A Linked Group must be specified\');\r\n return;\r\n" +
|
|
" }\r\n $(this).dialog(\'disable\');\r\n d" +
|
|
"ialogGroupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n }\r" +
|
|
"\n dialogButtons[\'Cancel\'] = function () {\r\n $(this).di" +
|
|
"alog(\'close\');\r\n };\r\n\r\n dialogGroupId.val(groupId);\r\n\r\n " +
|
|
" if (!!filterDateOption) {\r\n if (!!filterDateValue) {\r\n " +
|
|
" dialogFilterDate.datetimepicker(\'setDate\', moment(filterDateVa" +
|
|
"lue).toDate());\r\n } else {\r\n dialogFilterDate." +
|
|
"val(\'\');\r\n }\r\n dialogFilterDate.closest(\'tr\').show" +
|
|
"();\r\n } else {\r\n dialogFilterDate.closest(\'tr\').hide()" +
|
|
";\r\n }\r\n\r\n dialogUpdateDescription.prop(\'checked\', updateDe" +
|
|
"scription);\r\n\r\n dialogTitle.text(title);\r\n dialog.dialog(\'" +
|
|
"option\', \'buttons\', dialogButtons);\r\n dialog.dialog(\'option\', \'title\'" +
|
|
", \'Linked Group: \' + title);\r\n dialog.dialog(\'open\');\r\n }\r\n\r\n " +
|
|
" $(document).on(\'click\', \'.Config_LinkedGroup_LinkButton\', function () {\r\n" +
|
|
" $this = $(this);\r\n\r\n var configuredGroupId = $this.attr(\'" +
|
|
"data-linkedgroupid\');\r\n var configuredFilterBeginDate = $this.attr(\'d" +
|
|
"ata-linkedgroupfilterdate\');\r\n var filterDateOption = $this.attr(\'dat" +
|
|
"a-linkedgroupfilterdateoption\') === \'True\';\r\n var description = $this" +
|
|
".attr(\'data-linkedgroupdescription\');\r\n var updateUrl = $this.attr(\'d" +
|
|
"ata-linkedgroupupdateurl\');\r\n var updateDescription = $this.attr(\'dat" +
|
|
"a-linkedgroupupdatedescription\') === \'True\';\r\n\r\n showDialog(configure" +
|
|
"dGroupId, filterDateOption, configuredFilterBeginDate, updateUrl, description, u" +
|
|
"pdateDescription);\r\n\r\n return false;\r\n });\r\n });\r\n</script>" +
|
|
"\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|