<!--
- Copyright 2019 Jason H House
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>Gaps</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="shortcut icon" href="images/gaps.ico"/>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/input.min.css">

    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
    <a class="navbar-brand" href="/">Gaps</a>
    <div class="collapse navbar-collapse" id="navbarColor01">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item">
                <a class="nav-link" href="/recommended">Recommended</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/rssCheck">RSS</a>
            </li>
        </ul>
    </div>
</nav>
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/">Home</a></li>
        <li class="breadcrumb-item active" aria-current="page"><a href="/plexConfiguration">Plex</a></li>
    </ol>
</nav>

<div class="container">
    <h2 class="top-margin">Plex Configuration</h2>

    <form class="needs-validation" method="POST" action="/plexLibraries" novalidate th:object="${plexSearch}">
        <div class="form-group">
            <label for="address">Plex IP Address</label>
            <input type="text" class="form-control" id="address" required aria-describedby="addressHelp"
                   th:field="*{address}">
            <small id="addressHelp" class="form-text text-muted">Use your network IP address. localhost and
                127.0.0.1 will not work for Plex and Gaps in Docker. Use ifconfig/ipconfig to find that in a
                terminal or command window.</small>
        </div>

        <div class="form-group">
            <label for="port">Plex Port</label>
            <input type="text" class="form-control" id="port" required aria-describedby="portHelp" th:field="*{port}">
            <small id="portHelp" class="form-text text-muted">Defaults to 32400</small>
        </div>

        <div class="form-group">
            <label for="plexToken">Plex Token</label>
            <input type="text" class="form-control" id="plexToken" required aria-describedby="tokenHelp"
                   th:field="*{plexToken}">
            <small id="tokenHelp" class="form-text text-muted">You can learn how to find your Plex Token
                <a href="https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/">here</a>
                .</small>
        </div>

        <button type="button" class="btn btn-secondary" onclick="back()">Back</button>
        <button type="submit" class="btn btn-primary">Next</button>
    </form>
</div>

<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="js/plexConfiguration.js"></script>
</body>
</html>