<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <link rel='icon' href='/favicon.ico' type='image/x-icon'/>
    <title> <%= settings["WebsiteName"].Value %> || <%= title %></title>

    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="/plugins/fontawesome-free/css/all.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/dist/css/adminlte.min.css">
    <!-- Tempus Dominus Styles -->
    <link href="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@master/dist/css/tempus-dominus.css"
          rel="stylesheet" crossorigin="anonymous">
    <!-- Google Font: Source Sans Pro -->
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <!-- Custom CSS Block -->
    <style>
        .bootstrap-switch {
            height: fit-content !important;
        }
    </style>
    <%- block('css').toString() %>

</head>
<body class="hold-transition sidebar-mini">
<!-- Google Tag Manager (noscript) -->

<!-- End Google Tag Manager (noscript) -->
<div class="wrapper">

    <!-- Navbar -->
    <% include ../partials/navbar.ejs %>
    <!-- /.navbar -->

    <!-- Sidebar -->
    <% include ../partials/sidebar.ejs %>
    <!-- /.sidebar -->

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark"><%= title %></h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>

                            <li class="breadcrumb-item active"><%= title %></li>

                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->

        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-secondary">
                    <div class="card-header">
                        <h3 class="card-title">Settings</h3>
                    </div>
                    <div class="card-body">
                        <form method="post">
                            <div class="form-group row">
                                <label class="col-lg-3" for="RecruitmentOpen">Enable Recruitment: </label>
                                <input type="checkbox" class="form-control" name="RecruitmentOpen" id="RecruitmentOpen"
                                       <% if (settings["RecruitmentOpen"].Value === "1") { %>checked
                                        <% } %>
                                       data-bootstrap-switch data-off-color="danger" data-on-color="success">
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-3" for="EnableOvertime">Enable Form Overtime: </label>
                                <input type="checkbox" class="form-control" name="EnableOvertime"
                                       <% if (settings["EnableOvertime"].Value === "1") { %>checked
                                        <% } %>
                                       id="EnableOvertime" data-bootstrap-switch data-off-color="danger"
                                       data-on-color="success">
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-3" for="SendAllToSheet">Automatically Send All New Applicants To
                                    Sheet: </label>
                                <input type="checkbox" class="form-control" name="SendAllToSheet"
                                       <% if (settings["SendAllToSheet"].Value === "1") { %>checked
                                        <% } %>
                                       id="SendAllToSheet" data-bootstrap-switch data-off-color="danger"
                                       data-on-color="success">
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-3" for="Season">Current Season: </label>
                                <input type="number" min="2020" class="form-control" name="Season" id="Season"
                                       value="<%= settings["CurrentSeason"].Value %>">
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-3" for="SheetID">SheetID: </label>
                                <input type="text" name="SheetID" id="SheetID" class="form-control"
                                       value="<%= settings['SheetID'].Value %>">
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-3" for="FormTime">Form Time (in seconds): </label>
                                <input type="number" class="form-control" name="FormTime" id="FormTime"
                                       value="<%= settings['FormTime'].Value %>">
                            </div>
                            <div class="form-group row">
                                <div class="col-sm-12" id="htmlTarget">
                                    <label for="datetimepicker1Input" class="form-label">Form Start Date</label>
                                    <div class="input-group log-event" id="datetimepicker1"
                                         data-td-target-input="nearest" data-td-target-toggle="nearest">
                                        <input id="datetimepicker1Input" type="text" class="form-control"
                                               data-td-target="#datetimepicker1" name="FormStartDate"
                                               value="<% if (settings["FormStartDate"]) { %><%= settings["FormStartDate"].Value %><% } %>">
                                        <span class="input-group-text" data-td-target="#datetimepicker1"
                                              data-td-toggle="datetimepicker">
                                          <i class="fas fa-calendar"></i>
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <div class="col-sm-12" id="htmlTarget">
                                    <label for="datetimepicker2Input" class="form-label">Form End Date</label>
                                    <div class="input-group log-event" id="datetimepicker2"
                                         data-td-target-input="nearest" data-td-target-toggle="nearest">
                                        <input id="datetimepicker2Input" type="text" class="form-control"
                                               data-td-target="#datetimepicker2" name="FormEndDate"
                                               value="<% if (settings["FormEndDate"]) { %><%= settings["FormEndDate"].Value %><% } %>">
                                        <span class="input-group-text" data-td-target="#datetimepicker2"
                                              data-td-toggle="datetimepicker">
                                          <i class="fas fa-calendar"></i>
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-primary">Save</button>
                        </form>

                    </div>
                </div>

                <!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
    </div>

    <!-- /.content-wrapper -->
    <!--    Footer-->
    <% include ../partials/footer.ejs %>

    <!-- Toasts -->
    <% include ../partials/toasts.ejs %>
    <!-- Custom JS Block -->
    <%- block('js').toString() %>
    <!-- Bootstrap Switch -->
    <script src="/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
    <!-- Popperjs -->
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
            crossorigin="anonymous"></script>
    <!-- Tempus Dominus JavaScript -->
    <script src="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@master/dist/js/tempus-dominus.js"
            crossorigin="anonymous"></script>
    <script>
        $("input[data-bootstrap-switch]").each(function () {
            $(this).bootstrapSwitch();
        });
        new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'), {});
    </script>
</body>
</html>

