<%@ page title="" language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="RCC_MimeCast_APISettings, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Content" runat="Server">

    <div class="col-xs-12">
        <div class="card">
            <%--<div class="header">
                <h3>
                    <%= Resources.Content.L0086%>                   
                </h3>
            </div>--%>
            <div class="body">

                <EM:TabContainer ID="TC_MimeCast" runat="server" OnClientActiveTabChanged="loadTabPanel">

                    <EM:TabPanel ID="Tab_APISettings" runat="server" HeaderText='<%$ Resources:Content,strMimeCastAPISettings%>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="card">
                                            <div class="header">
                                                <h3><%= Resources.Content.USM0013%>  </h3>
                                            </div>
                                            <div class="body">

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,GN000909%>" />
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_APIURL" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RequiredFieldValidator3' runat='server' ControlToValidate='TxBx_APIURL'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='API URL is mandatory'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Ltrl_APILogin" runat="server" Text="<%$ Resources:Content,DGN1110548%>" />
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_APILogin" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RFV_APILogin' runat='server' ControlToValidate='TxBx_APILogin'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='API Login is mandatory'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Ltrl_APIPassword" runat="server" Text="<%$ Resources:Content,GN000922%>" />
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_APIPassword" MaxLength="200" runat="server" TextMode='Password'
                                                                    ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RFV_APIPassword' runat='server' ControlToValidate='TxBx_APIPassword'
                                                                    Display='None' ErrorMessage='API Password is mandatory' SetFocusOnError='true'
                                                                    ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-5 col-xs-12">
                                                        <asp:Literal ID="Ltl_PasswordNotice" runat="server" Text="<%$ Resources:Content,GN00001530%>"
                                                            EnableViewState="false" Visible="false"></asp:Literal>
                                                    </div>
                                                </div>


                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,strApplicationID%>" />
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_ApplicationID" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RequiredFieldValidator4' runat='server' ControlToValidate='TxBx_ApplicationID'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='Application Id is mandatory.'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content,strApplicationKey%>" />
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_ApplicationKey" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RequiredFieldValidator5' runat='server' ControlToValidate='TxBx_ApplicationKey'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='Application key is mandatory.'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,FAM00118%>" />
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_AccessKey" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RequiredFieldValidator1' runat='server' ControlToValidate='TxBx_AccessKey'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='Access Key is mandatory'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                          <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,SPT002024%>" />
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_SecretKey" MaxLength="200" runat="server" ValidationGroup='apisettings'></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID='RequiredFieldValidator2' runat='server' ControlToValidate='TxBx_SecretKey'
                                                                    EnableClientScript='true' Display='None' ErrorMessage='Secret Key is mandatory'
                                                                    SetFocusOnError='true' ValidationGroup='apisettings'></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <br />
                                                        <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Content,accessKeyNoticeMimeCast%>"
                                                            EnableViewState="false"></asp:Literal><br />
                                                        <hr />
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:Button CssClass="btn btn-primary waves-effect btnAction" ID="Btn_Save" runat="server" Text='<%$ Resources:Content,GN0000281 %>'
                                                            ValidationGroup='apisettings' CausesValidation='true' />
                                                        <asp:ValidationSummary ID='vs_apisettings' runat="server" ShowMessageBox='true' ShowSummary='false'
                                                            ValidationGroup='apisettings' />
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_TechnicalContacts" runat="server" HeaderText="<%$ Resources:Content, strTechnicalContacts %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">

                                <div class="row">
                                    <div class="col-xs-12">

                                        <div class="card">
                                            <div class="header">
                                                <h2><%= Resources.Content.strTechnicalContacts %></h2>
                                            </div>
                                            <div class="body">
                                                <asp:Panel ID="Pnl_add" runat="server" DefaultButton="btnSaveContact">
                                                    <div class="row">
                                                        <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">
                                                            <div class="card" id="tblOperation" runat="server">
                                                                <div class="header" id="trOperations" runat="server">
                                                                    <h3><%= Resources.Content.GN00001320%></h3>
                                                                </div>
                                                                <div class="body" id="trOperationsButtons" runat="server">
                                                                    <asp:Button ID="btnAddContact" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,String1001 %>' />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="col-xs-12" id="tblContactListing" runat="server">
                                                            <EM:MPGridView ID="GV_TechnicalContact" CurrentSortExpression="ContactName" CurrentSortDirection="Asc"
                                                                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="true" AllowSorting="false" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                                                                AutoGenerateColumns="false" DataKeyNames='ContactID'>

                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="<%$ Resources:Content, String1002 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblContactName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ContactName")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="<%$ Resources:Content, strContactEmail %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblContactEmail" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ContactEmail")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,strDefaultContact %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblDefaultContact" runat="server" Text='<%# IIf(DataBinder.Eval(Container, "DataItem.IsDefault"), "Yes", "No")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                   <%-- <asp:TemplateField HeaderText="<%$ Resources:Content,strContactCode %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblContactCode" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ContactCode")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>--%>
                                                                      
                                                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                        <ItemTemplate>
                                                                            <ul class="option-menu">
                                                                                <li class="dropdown">
                                                                                    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                                                                        <i class="material-icons">menu</i>
                                                                                    </a>
                                                                                    <ul class="dropdown-menu pull-right">
                                                                                        <li>
                                                                                            <asp:LinkButton CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ContactID")%>' ID="LB_Edit" CommandName="EditContact" runat="server" Text="<%$ Resources:Content,GN0000276%>" CausesValidation="false" /></li>
                                                                                        <li>
                                                                                            <asp:LinkButton CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ContactID")%>' ID="LB_Remove" CssClass="btnAction" CommandName="Remove" runat="server" Text="<%$ Resources:Content,GN0000278%>" CausesValidation="false" /></li>
                                                                                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,String1040%>" TargetControlID="LB_Remove" runat="server">
                                                                                        </EM:ConfirmButtonExtender>
                                                                                    </ul>
                                                                                </li>
                                                                            </ul>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <%--PagerTemplate Start--%>
                                                                <PagerTemplate>
                                                                    <EM:Pager ID="Pager" runat="server" />
                                                                </PagerTemplate>
                                                                <%--PagerTemplate End--%>
                                                            </EM:MPGridView>
                                                        </div>
                                                        <div id="tblAddContact" class="col-xs-12" runat="server" visible="false">
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <label>
                                                                        *
                                                                        <asp:Literal ID="Literal41" runat="server" Text="<%$ Resources:Content,String1002%>" />:</label>
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtContactName"
                                                                                Display="None" SetFocusOnError="True" ValidationGroup="ContactValidation"></asp:RequiredFieldValidator>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <label>
                                                                        *
                                                                        <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content,strContactEmail%>" />:</label>
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="txtContactEmail" runat="server"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtContactEmail"
                                                                                Display="None" SetFocusOnError="True" ValidationGroup="ContactValidation"></asp:RequiredFieldValidator>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                              <div  class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <label>                                                                         
                                                                        <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content,strDefaultContact%>" />:</label>
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <asp:CheckBox ID="chk_IsDefault" runat="server" Text=" " />
                                                                    </div>
                                                                </div>
                                                            <div class="row" runat="server" visible="false">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <label>
                                                                        *
                                                                        <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,strMimeCastContactCode%>" />:</label>
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="txtContactCode" runat="server"></asp:TextBox>
                                                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtContactCode"
                                                                                Display="None" SetFocusOnError="True" ValidationGroup="ContactValidation"></asp:RequiredFieldValidator>--%>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-xs-12">
                                                                    <asp:ValidationSummary ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false"
                                                                        ValidationGroup="ContactValidation" HeaderText="<%$ Resources:Content,EM000001%>" />
                                                                    <asp:Button ID="btnSaveContact" ValidationGroup="ContactValidation" CausesValidation="true"
                                                                        class="btn btn-primary waves-effect btnAction" runat="server" Text="<%$ Resources:Content,GN0000281%>" />
                                                                    <asp:Button ID="BtnCancel" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>' class="btn btn-primary waves-effect" />
                                                                </div>
                                                            </div>
                                </div>
                                </div>
                                                </asp:Panel>
                                            </div>


                                        </div>
                                    </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                </EM:TabContainer>

            </div>

        </div>
    </div>
</asp:Content>

