<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Spreadsheet.aspx.cs" Inherits="Axium.Web.iForms.Spreadsheet" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="Head1" runat="server">
    <title>iForm - Spreadsheet</title>
    
    <!-- css styles -->
    <link href="../Includes/Css/spinner.css" rel="stylesheet" type="text/css" />

    <!-- plug in -->
    <script src="../Includes/JQueryUI/js/jquery-3.5.1.min.js" type="text/javascript"></script>
    <script src="../Includes/JQueryUI/js/jquery-migrate-3.3.2.min.js" type="text/javascript"></script>
    <script src="../Includes/JQueryUI/js/jquery-ui-1.13.2.custom.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery.numeric.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery.maxlength.230520.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/ui.datepicker.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/spin.min.js" type="text/javascript"></script>
    
    <!-- custom -->
    <script src="../Includes/Scripts/general.240530.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/iframe.231520.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/iform.240530.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/iformSpreadsheetValidation.240.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        function initPage() {
            initSpreadsheetCell();
            resizeParentIframe('spreadsheetPage', window);

            //Incase it does not get resized, trigger after 0.5 seconds later
            setTimeout(function () {
                resizeParentIframe('spreadsheetPage', window);
            }, 500);
        }
    </script>

    <link rel='stylesheet' type='text/css' href='../Includes/Css/popup.231520.css' />
    <style type="text/css" runat="server" ID="logicCss"></style>
</head>
<body id="spreadsheetPage" onload="initPage();">
    <form id="form1" runat="server">
        <div class="windowPage">
            <div class="windowHeader">
                <asp:Panel runat="server" ID="TitlePanel" CssClass="title">
                    <asp:Label runat="server" ID="TitleLabel"></asp:Label>
                </asp:Panel>
                <asp:Panel runat="server" ID="InstructionPanel" CssClass="instructionsPanel"></asp:Panel>   
                <asp:Panel runat="server" ID="SubHeader" CssClass="subHeader">
                    <asp:Panel runat="server" ID="PaginationPanel" CssClass="paginationPanel">
                        <asp:Panel runat="server" ID="PaginationControl" CssClass="controls">
                            <asp:Button ID="FirstButton" runat="server" Text="<< First" OnClick="FirstClick" OnClientClick="return validateNav('ignoreModFirstButton')" />
                            <asp:Button ID="PrevButton" runat="server" Text="< Prev" OnClick="PrevClick" OnClientClick="return validateNav('ignoreModPrevButton')" />
                            <asp:Button ID="NextButton" runat="server" Text="Next >" OnClick="NextClick" OnClientClick="return validateNav('ignoreModNextButton')" />
                            <asp:Button ID="LastButton" runat="server" Text="Last >>" OnClick="LastClick" OnClientClick="return validateNav('ignoreModLastButton')" />
                            <asp:HiddenField runat="server" ID="CurrentPageField" Value="1" />
                        </asp:Panel>
                        <asp:Label runat="server" ID="PaginationLabel" CssClass="label"></asp:Label>
                    </asp:Panel>
                </asp:Panel>
            </div>
            
            <asp:Panel runat="server" ID="SubmitMessage" CssClass="successMessage" Visible="False"></asp:Panel>
            
            <asp:Panel runat="server" ID="SubControl" CssClass="subControlPanel">
                <table>
                    <tr>
                        <td>
                            <asp:Button ID="AddColButton" runat="server" CssClass="add" />
                            <asp:Label runat="server" ID="MaxColumnAllowedLabel" CssClass="maxColumnLabel"></asp:Label>
                        </td>
                        <td class="inputColumn"><asp:Button runat="server" ID="DeleteColButton1" CssClass="delete" Visible="False" /></td>
                        <td class="inputColumn"><asp:Button runat="server" ID="DeleteColButton2" CssClass="delete" Visible="False" /></td>
                        <td class="inputColumn"><asp:Button runat="server" ID="DeleteColButton3" CssClass="delete" Visible="False" /></td>
                        <td class="inputColumn"><asp:Button runat="server" ID="DeleteColButton4" CssClass="delete" Visible="False" /></td>
                    </tr>
                </table>
            </asp:Panel>

            <asp:Panel runat="server" ID="SpreadsheetQuestions" CssClass="spreadsheetTable"></asp:Panel>
            
            <asp:Panel runat="server" ID="MainControl" CssClass="mainControl">
                <asp:HiddenField runat="server" ID="DeleteFormColumnId" />
                <asp:HiddenField runat="server" ID="DeletePatientColumnId" />
                <asp:Button runat="server" ID="IgnoreModFirstButton" OnClick="FirstClick" CssClass="ignoreModFirstButton" />
                <asp:Button runat="server" ID="IgnoreModPrevButton" OnClick="PrevClick" CssClass="ignoreModPrevButton" />
                <asp:Button runat="server" ID="IgnoreModNextButton" OnClick="NextClick" CssClass="ignoreModNextButton" />
                <asp:Button runat="server" ID="IngoreModLastButton" OnClick="LastClick" CssClass="ignoreModLastButton" />
                <asp:Button runat="server" ID="SaveAddColumnButton" OnClick="AddColClick" CssClass="addColumnButton"/>
                <asp:Button runat="server" ID="DeleteColumnButton" OnClick="DeleteColClick" CssClass="deleteColumnButton" />
                <asp:Button runat="server" ID="ResetSpreadsheetButton" OnClick="ResetClick" CssClass="resetSpreadsheetButton" />
                <asp:Button runat="server" ID="RefreshButton" OnClick="RefreshClick" CssClass="refreshButton" />
                <asp:Button runat="server" ID="IgnoreBlankSaveButton" OnClick="SaveClick" OnClientClick="validateSave(true)" CssClass="ignoreBlankSaveButton" />
                
                <asp:Button runat="server" ID="ResetButton" CssClass="reset" OnClientClick="validateReset(); return false;" />
                <asp:Button runat="server" ID="CloseButton" CssClass="close" OnClientClick="validateClose(); return false;" />
                <asp:Button runat="server" ID="SaveButton" OnClick="SaveClick" OnClientClick="return validateSave(false)" />
                <asp:Button runat="server" ID="ContButton" OnClick="NextClick"  />
            </asp:Panel>
            
            <asp:Panel runat="server" ID="FormData"></asp:Panel>
            <asp:Panel runat="server" ID="FormPopup"></asp:Panel>
        </div>
    </form>
</body>
</html>
