<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>

<head>
    <title>Praktikum OOP</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- CSS only -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <link rel="stylesheet" href="css/proposal.css">
    <link rel="stylesheet" type="text/css" href="css/avatar.css">

    <!-- Multiple Select Plugin -->
    <link rel="stylesheet" href="css/multiple-select.css" />
</head>

<body>

    <nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark" aria-label="Eighth navbar example">
        <div class="container">
            <a class="navbar-brand" href="/">Praktikum OOP</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample07"
                aria-controls="navbarsExample07" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarsExample07">
                <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                    <li class="nav-item" th:utext="${dodajOglas}"/>
                    <li class="nav-item">
                        <a class="nav-link" href="/">Nadji posao</a>
                    </li>
                    <li class="nav-item" th:utext="${inbox}"/>
                    <li class="nav-item" th:utext="${user}"/>
                </ul>
            </div>
        </div>
    </nav>

    <!-- main container -->
    <div id="main" class="container justify-content-center ">
        <h1 class="display-2" th:text="${naziv}"/>
        <form id="forms" method="POST" class="needs-validation" novalidate th:action="${akcija}" >
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="korisnikIme">*Ime</label>
                    <input type="txt" class="form-control" id="korisnikIme" name="korisnikIme" placeholder="Ime"
                        required th:value="${korisnikIme}">
                    <div class="invalid-feedback">Molimo Vas, unesite ime. Polje ne može biti prazno.</div>
                    <div class="valid-feedback">Odlično!</div>
                </div>
                <div class="form-group col-md-4">
                    <label for="korisnikPrezime">*Prezime</label>
                    <input type="txt" class="form-control" id="korisnikPrezime" name="korisnikPrezime"
                        placeholder="Prezime" required th:value="${korisnikPrezime}">
                    <div class="invalid-feedback">Molimo Vas, unesite prezime. Polje ne može biti prazno.</div>
                    <div class="valid-feedback">Odlično!</div>
                </div>
                <div class="form-group col-md-4">
                    <label for="korisnikRodjen">*Datum rođenja</label>
                    <input type="txt" class="form-control" id="korisnikRodjen" name="korisnikRodjen"
                        placeholder="Datum rođenja" required th:value="${korisnikRodjen}">
                    <div class="invalid-feedback">Molimo Vas, unesite validan datum u validnom formatu!</div>
                    <div class="valid-feedback">Odlično!</div>
                </div>
            </div>
            <br>
            <div class="form-check form-check-inline col-md-1">
                <input class="form-check-input" type="radio" name="pol" id="polM" value="1" th:checked="${musko}">
                <label class="form-check-label" for="polM">Muško</label>
            </div>
            <div class="form-check form-check-inline col-md-1">
                <input class="form-check-input" type="radio" name="pol" id="polZ" value="0" th:checked="${zensko}">
                <label class="form-check-label" for="polZ">Žensko</label>
            </div>
            <br>
            <div class="row">
                <div class="form-group col-md-6">
                    <label for="username">*Username</label>
                    <input type="txt" class="form-control" id="username" name="username" placeholder="Username" required
                        th:value="${username}">
                    <div class="invalid-feedback">Molimo Vas, unesite validno korisničko ime.</div>
                    <div class="valid-feedback">Odlično!</div>
                    <small id="passowrdHelpp" class="form-text text-muted">Username može imati od 4 do 20 karaktera,
                        dozvoljena su slova i brojevi, nisu dozvoljeni specijalni karakteri kao i razmak. </small>
                </div>
                <div class="form-group col-md-6">
                    <label for="password">*Password</label>
                    <input type="password" class="form-control" id="password" name="password" placeholder="Password"
                        required>
                    <div class="invalid-feedback">Molimo Vas, unesite validnu lozinku.</div>
                    <div class="valid-feedback">Odlično!</div>
                    <small id="passowrdHelp" class="form-text text-muted">Lozinka mora imati najmanje 8 karaktera, 1
                        veliko slovo, 1 malo slovo
                        i 1 broj, može da sadrži specijalne karaktere. Nije dozvoljen razmak.</small>
                </div>
            </div>
            <br>
            <div class="row">
                <div class="form-group col-md-6">
                    <label for="email">*Email</label>
                    <input type="email" class="form-control" id="email" name="email" placeholder="no-face@example.com"
                        required th:value="${email}">
                    <div class="invalid-feedback">Molimo Vas, unesite validnu email adresu.</div>
                    <div class="valid-feedback">Odlično!</div>
                </div>
                <div class="form-group col-md-6">
                    <label for="korisnikMob">*Mobilni</label>
                    <input type="txt" class="form-control" id="korisnikMob" name="korisnikMob"
                        placeholder="(381) 66281781" required th:value="${korisnikMob}">
                    <div class="invalid-feedback">Molimo Vas, unesite validan mobilni broj u formatu, (381) 66281781.
                    </div>
                    <div class="valid-feedback">Odlično!</div>
                </div>
            </div>
            <br>
            <div class="row">
                <div class="form-group col-md-6">
                    <label for="lokacija">*Lokacija</label>
                    <select class="form-control" id="lokacija" name="lokacija" th:utext="${lokacija}"/>
                </div>
                <div class="form-group col-md-6">
                    <label for="ms">Edukacija</label>
                    <select name="edukacija" multiple="multiple" class="form-control ms" th:utext="${edukacija}"/>
                </div>
            </div>
            <br>
            <div class="form-group">
                <label for="korisnikBio">*Bio</label>
                <textarea class="form-control" id="korisnikBio" name="korisnikBio"
                    placeholder="Biografija, do 2000 karaktera" rows=4 required th:text="${korisnikBio}"></textarea>
                <div class="invalid-feedback">>Molimo Vas, unesite Vašu biografiju. Polje ne može biti prazno.</div>
                <div class="valid-feedback">Odlično!</div>
            </div>
            <br>
            <div class="row">
                <div class="form-group col-md-6">
                    <label for="ms">Vestine</label>
                    <select name="skills" multiple="multiple" class="form-control ms" th:utext="${skills}"/>
                </div>
            </div>
            <br>
            <div class="row">
                <div th:utext="${tipKorisnika}"/>
                <div class="form-group">
                    <label for="korisnikSlika">Profil Slika</label>
                    <div class="form-group col-md-3">

                        <input type="radio" name="korisnikSlika" value="avatars/1.png" id="avatar1" class="input-hidden" />
                        <label for="avatar1">
                            <img src="avatars/1.png" alt="avatar1" />
                        </label>

                        <input type="radio" name="korisnikSlika" value="avatars/2.png" id="avatar2" class="input-hidden" />
                        <label for="avatar2">
                            <img src="avatars/2.png" alt="avatar2" />
                        </label>

                        <input type="radio" name="korisnikSlika" value="avatars/3.png" id="avatar3" class="input-hidden" />
                        <label for="avatar3">
                            <img src="avatars/3.png" alt="avatar3" />
                        </label>

                        <input type="radio" name="korisnikSlika" value="avatars/4.png" id="avatar4" class="input-hidden" />
                        <label for="avatar4">
                            <img src="avatars/4.png" alt="avatar4" />
                        </label>

                        <input type="radio" name="korisnikSlika" value="avatars/5.png" id="avatar5" class="input-hidden" />
                        <label for="avatar5">
                            <img src="avatars/5.png" alt="avatar5" />
                        </label>

                        <input type="radio" name="korisnikSlika" value="avatars/6.png" id="avatar6" class="input-hidden" />
                        <label for="avatar6">
                            <img src="avatars/6.png" alt="avatar6" />
                        </label>
                    </div>
                </div>
            </div>
            <br>
            <button type="submit" class="btn btn-success col-md-3" th:text="${dugme}"/>
            <div th:utext="${odustani}"/>
        </form>
        <br>
        <br>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
        integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
        integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
        crossorigin="anonymous"></script>
    <script src="jss/app.js"></script>

    <!-- Multiple Select -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"
        integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ"
        crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"
        integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm"
        crossorigin="anonymous"></script>
    <script src="jss/multiple-select.js"></script>
    <script>
        $(function () {
            $('.ms').change(function () {
                console.log($(this).val());
            }).multipleSelect({
                width: '100%'
            });
        });
    </script>
</body>

</html>