Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
25 kB
3
Indexable
Never
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MiscellaneousAccess.aspx.cs" Inherits="SPForms.Layouts.SPForms.MiscellaneousAccess" DynamicMasterPageFile="~masterurl/default.master" EnableEventValidation="false" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <script type='text/javascript' src="Scripts/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui.min.js"></script>
    <script type="text/javascript" src="Scripts/tether.min.js"></script>
    <script type="text/javascript" src="Scripts/bootstrap.min.js"></script>
    <link rel="stylesheet" href="Scripts/jquery-ui.min.css" />
    <link type="text/css" href="Scripts/bootstrap.min.css" rel="Stylesheet" />
    <link type="text/css" href="Scripts/bootstrap-grid.min.css" rel="Stylesheet" />
    <link type="text/css" href="Scripts/forms.css" rel="Stylesheet" />
    <link type="text/css" href="Scripts/table.css" rel="Stylesheet" />
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="upMiscAccess" runat="server" ChildrenAsTriggers="true">
        <ContentTemplate>
            <div class="container">
                <asp:Panel ID="pnlForm" runat="server">
                    <div class="form-group row">
                        <div class="col-md-12">
                            <asp:Label ID="lblRequestTypeHeader" CssClass="RequestHeader" runat="server"></asp:Label>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblName.ClientID %>">Name</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblName" CssClass="form-control" runat="server" />
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblDepartment.ClientID %>">Department</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblDepartment" runat="server" CssClass="form-control"></asp:Label>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblPosition.ClientID %>">Position</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblPosition" runat="server" CssClass="form-control"></asp:Label>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= ddlRequestType.ClientID %>">Request Type</label>
                        </div>
                        <div class="col-md-10">
                            <asp:DropDownList ID="ddlRequestType" runat="server" AutoPostBack="true">
                                <asp:ListItem Text="" Value=""></asp:ListItem>
                                <asp:ListItem Text="Shared Folder" Value="Shared Folder"></asp:ListItem>
                                <asp:ListItem Text="Internet" Value="Internet"></asp:ListItem>
                                <asp:ListItem Text="VPN" Value="VPN"></asp:ListItem>
                                <asp:ListItem Text="Bypass Proxy for specific destinations" Value="Bypass Proxy for specific destinations"></asp:ListItem>
                                <asp:ListItem Text="Media Storage" Value="Media Storage"></asp:ListItem>
                                <asp:ListItem Text="External Email" Value="External Email"></asp:ListItem>
                                <asp:ListItem Text="Internet on behalf an external user" Value="Internet on behalf an external user"></asp:ListItem>
                                   <asp:ListItem Text="URL Exception" Value="URL Exception"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvRequestType" runat="server" ControlToValidate="ddlRequestType" ErrorMessage="This field is required" ForeColor="Red"></asp:RequiredFieldValidator>
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblRequestDate.ClientID %>">Request Date</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblRequestDate" runat="server" CssClass="form-control"></asp:Label>
                        </div>
                    </div>
        
                    <asp:Panel ID="pnlInternet" runat="server" Visible="false">
                        <asp:Panel ID="pnlOnBehalfOf" runat="server" Visible="false">
                            <div class="form-group row">
                                <div class="col-md-2">
                                    <label for="<%= txtOnBehalfOf.ClientID %>">On Behalf of</label>
                                </div>
                                <div class="col-md-4">
                                    <asp:TextBox ID="txtOnBehalfOf" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                        </asp:Panel>
                        <div class="form-group row">
                            <div class="col-md-2">
                                <label for="<%= ddlTimeLimit.ClientID %>">Time Limit</label>
                            </div>
                            <div class="col-md-4">
                                <asp:DropDownList ID="ddlTimeLimit" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="form-group row">
                                <div class="col-md-2">
                                    <label for="<%= txtMainSites.ClientID %>">Main Sites to be visited</label>
                                </div>
                                <div class="col-md-4">
                                    <asp:TextBox ID="txtMainSites" runat="server" CssClass="form-control multiline" TextMode="MultiLine"></asp:TextBox>
                                    <small class="form-text text-muted">Detail all sites needed to be accessed</small>
                                </div>
                            </div>
                    </asp:Panel>

                    <asp:Panel ID="pnlVpn" runat="server" Visible="false">
                        <div class="form-group row">
                            <div class="col-md-2">

                            </div>
                            <div class="col-md-8">
                                <asp:CheckBox ID="chkGlobus" Text="Globus" runat="server" />
                                <asp:CheckBox ID="chkOutlook" Text="Outlook" runat="server" />
                           </div>
                        </div>
  <div class="form-group row">
                            <div class="col-md-2">

                            </div>
                            <div class="col-md-4">
  <label for="<%= txtOtherVpn.ClientID %>">Other</label>
                                <asp:TextBox ID="txtOtherVpn" CssClass="form-control multiline" TextMode="MultiLine" runat="server"></asp:TextBox>
                       
                            
                            </div>
                        </div>
                    </asp:Panel>

                    <asp:Panel ID="pnlPeriod" runat="server" Visible="false">
                        <div class="form-group row">
                            <div class="col-md-2">
                                <label for="ddlPeriod">Period</label>
                            </div>
                            <div class="col-md-4">
                                <asp:DropDownList ID="ddlPeriod" runat="server">
                                    <asp:ListItem Text="Select..." Value=""></asp:ListItem>
                                    <asp:ListItem Text="Permanent" Value="Permanent"></asp:ListItem>
                                    <asp:ListItem Text="Temporary" Value="Temporary"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div ID="pnlFromTo" style="display:none">
                            <div class="form-group row">
                                <div class="col-md-2">&nbsp;</div>
                                <div class="col-md-4">
                                    <label for="<%= txtFromDate.ClientID %>">From Date</label>
                                    <asp:TextBox ID="txtFromDate" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                                <div class="col-md-4">
                                    <label for="<%= txtToDate.ClientID %>">To Date</label>
                                    <asp:TextBox ID="txtToDate" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="pnlFirewall" runat="server" Visible="false">
                        <div class="form-group row">
                            <div class="col-md-2"></div>
                            <div class="col-md-8">
                                <asp:GridView ID="gvFirewall" runat="server" ShowFooter="true" CssClass="dataGrid" PagerStyle-CssClass="pager" HeaderStyle-CssClass="header" RowStyle-CssClass="rows" FooterStyle-CssClass="footer" AutoGenerateColumns="false" EnableViewState="true">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Source">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtSource" runat="server" Text='<%# Eval("FirewallSource") %>'></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Destination">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtDestination" runat="server" Text='<%# Eval("FirewallDestination") %>'></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Protocol">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtProtocol" runat="server" Text='<%# Eval("FirewallProtocol") %>'></asp:TextBox>
                                            </ItemTemplate>
                                            <FooterStyle HorizontalAlign="Right" />
                                            <FooterTemplate>
                                                <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="pnlMediaStorage" runat="server" Visible="false">
                        <div class="form-group row">
                            <div class="col-md-2">
                                <label for="<%= chkFlash.ClientID %>">Type of access</label>
                            </div>
                            <div class="col-md-8">
                                <asp:CheckBox ID="chkFlash" runat="server" Text="Flash" />&nbsp;
                                <asp:CheckBox ID="chkCdrom" runat="server" Text="CD-ROM" />&nbsp;
                                <asp:CheckBox ID="chkFloppy" runat="server" Text="Floppy" />&nbsp;&nbsp;

                                <label for="<%= txtOtherMedia.ClientID %>">Other</label>&nbsp;
                                <asp:TextBox ID="txtOtherMedia" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group row">
                            <div class="col-md-2">
                                <label for="<%= txtComputerName.ClientID %>">Computer Name</label>
                            </div>
                            <div class="col-md-4">
                                <asp:TextBox ID="txtComputerName" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                    </asp:Panel>

                    
                    <asp:Panel ID="pnlURLException" runat="server" Visible="false">
                    <div class="form-group row">
                            <div class="col-md-2">
                                <label for="<%=ddlURLTrusted.ClientID %>">URL Trusted/Expected</label>
                            </div>
                            <div class="col-md-4">
                                <asp:DropDownList ID="ddlURLTrusted" runat="server"> 
                                    <asp:ListItem Text="" Value="" Selected="True"></asp:ListItem>
                                     <asp:ListItem Text="Yes" Value="Yes"></asp:ListItem>
                                     <asp:ListItem Text="No" Value="No"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
  <div class="form-group row">
                            <div class="col-md-2">
                                  <label for="<%=txtURLNeeded.ClientID %>">URL Needed</label>
                            </div>
                            <div class="col-md-4">
                                <asp:TextBox ID="txtURLNeeded" CssClass="form-control multiline" TextMode="MultiLine" runat="server"></asp:TextBox>
                       
                            
                            </div>
                        </div>
                    </asp:Panel>
                        <asp:Panel ID="pnlFolderAccess" runat="server" Visible="false">
                
  <div class="form-group row">
                            <div class="col-md-2">
                                  <label for="<%=txtURLNeeded.ClientID %>">Folder(s)</label>
                            </div>
                            <div class="col-md-4">
                                <asp:TextBox ID="txtFolderAccess" CssClass="form-control multiline" TextMode="MultiLine" runat="server"></asp:TextBox>
                       
                            
                            </div>
                        </div>
                                    <div class="form-group row">
                            <div class="col-md-2">
                                <label for="<%=cblPermission.ClientID %>">Permission</label>
                            </div>
                            <div class="col-md-4">
                                <asp:CheckBoxList ID="cblPermission"  CellPadding="10"   runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="Read" Text="Read"></asp:ListItem>
                                    <asp:ListItem Value="Write" Text="Write"></asp:ListItem>
                                    <asp:ListItem Value="Execute" Text="Execute"></asp:ListItem>
                                    <asp:ListItem Value="Modify" Text="Modify"></asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </div>
                    </asp:Panel>

                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= txtReason.ClientID %>"><asp:Label ID="lblReasonLabel" runat="server"></asp:Label></label>
                        </div>
                        <div class="col-md-4">
                            <asp:TextBox ID="txtReason" runat="server" CssClass="form-control multiline" TextMode="MultiLine"></asp:TextBox>
                        </div>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlApproval" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= txtApprovalComment.ClientID %>">Comment</label>
                        </div>
                        <div class="col-md-4">
                            <asp:TextBox ID="txtApprovalComment" runat="server" CssClass="form-control multiline" TextMode="MultiLine"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-12">
                            <asp:ImageButton ID="btnApprove" runat="server" Visible="false" AlternateText="Approve" OnClick="btnApprove_Click" ImageUrl="Images/Approve_Yellow.png" />
                            <asp:ImageButton ID="btnReject" runat="server" Visible="false" AlternateText="Reject" OnClick="btnReject_Click" ImageUrl="Images/Reject_Yellow.png" />
                            <asp:ImageButton ID="btnComplete" runat="server" Visible="false" AlternateText="Complete" OnClick="btnComplete_Click" ImageUrl="Images/Complete1.png" />
                        </div>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlApproval1" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblApproval1Comment.ClientID %>">First Approval</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblApproval1Comment" runat="server"></asp:Label>
                        </div>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlApproval2" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblApproval2Comment.ClientID %>">Second Approval</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblApproval2Comment" runat="server"></asp:Label>
                        </div>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlApproval3" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblApproval3Comment.ClientID %>">Third Approval</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblApproval3Comment" runat="server"></asp:Label>
                        </div>
                    </div>
                </asp:Panel>
                 <asp:Panel ID="pnlApprovalArmIS" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblApprovalISArmeniaComment.ClientID %>">IS Armenia Approval</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblApprovalISArmeniaComment" runat="server"></asp:Label>
                        </div>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlApprovalIS" runat="server" Visible="false">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="<%= lblApprovalISComment.ClientID %>">IS Approval</label>
                        </div>
                        <div class="col-md-4">
                            <asp:Label ID="lblApprovalISComment" runat="server"></asp:Label>
                        </div>
                    </div>
                </asp:Panel>
            </div>
            <div class="form-group row">
                        <div class="col-md-2"></div>
                        <div class="col-md-10">
                            <asp:Label ID="lblValidation" runat="server" ForeColor="Red" Visible="false"></asp:Label>
                        </div>
                    </div>
            <script type="text/javascript">
                 
                   if ($("#<%= ddlPeriod.ClientID %>").val() == "Temporary")
                    {
                        $("#pnlFromTo").show();

                    }
                    else
                    {
                        $("#pnlFromTo").hide();
                    }
                

            
               
                function ShowHidePeriod()
                {
                    $("#<%= txtFromDate.ClientID %>").datepicker({ dateFormat: "dd/mm/yy" }).val();
                    $("#<%= txtToDate.ClientID %>").datepicker({ dateFormat: "dd/mm/yy" }).val();

                    if ($("#<%= ddlPeriod.ClientID %>").val() == "Temporary")
                    {
                        $("#pnlFromTo").show();
                        return;
                    }
                    else
                    {
                        $("#pnlFromTo").hide();
                    }
                }
          </script>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="form-group row">
                    <div class="col-md-2">
                        &nbsp;
                    </div>
                    <div class="col-md-10">
                        <asp:ImageButton ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" ImageUrl="Images/Submit_Yellow.png" />
                        <asp:ImageButton ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" ImageUrl="Images/Cancel_Yellow.png" CausesValidation="false" />
                    </div>
                </div>
    <asp:Panel id="pnlError" runat="server" Visible="false">
            <div class="alert alert-danger">
                <strong>Error!</strong> <asp:Label ID="lblError" runat="server"></asp:Label>
            </div>
        </asp:Panel>
    <asp:Label ID="lblAccountName" runat="server" Visible="false"></asp:Label>
        <asp:Label ID="lblTaskId" runat="server" Visible="false"></asp:Label>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Miscellaneous Access
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
<a href="<%= ListUrl %>">Miscellaneous Access</a> > <%= ItemName %>
</asp:Content>
Leave a Comment