Skip to content
formHelpProposition.html 3.03 KiB
Newer Older
roxane.carraux's avatar
roxane.carraux committed
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="ISO-8859-1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
ourfbht's avatar
ourfbht committed
        <script type = "text/javascript" src = "https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <script src = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css" />
        <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.js"></script>
        <title>Form HelpProposition</title>
    </head>
roxane.carraux's avatar
roxane.carraux committed

ourfbht's avatar
ourfbht committed
        <header th:insert="fragments/nav.html :: nav"> </header>
        <div class="container">
            <h1 class="teal-text text-darken-4">Create a help proposition</h1>
            <div class="card-panel red lighten-4 red-text text-darken-4" th:if="${(bindingResult != null && bindingResult.getAllErrors() != null)}">
                <span th:utext="${registerMessage}"></span>
                <ul th:each="data : ${bindingResult.getAllErrors()}">
                    <li th:text="${data.getDefaultMessage()}"></li>
                </ul>
            </div>
            <form action="#" th:action="@{/insertHelpProposition}" th:object="${helpProposition}" method="post">
                <p><strong>Branch <input type="text" th:field="*{branch}" name="branch" pattern=".{2,32}" required title="2 to 32 characters" /></strong></p>
                <p><strong>DateBegin <input type="datetime-local" class="datepicker" th:field="*{{dateBegin}}" name="dateBegin" /> </strong></p>
ourfbht's avatar
ourfbht committed
                <p><strong>TimeBegin <input type="text" class="timepicker" th:field="*{timeBegin}" name="timeBegin" required /></strong></p>
                <p><strong>DateEnd <input type="datetime-local" class="datepicker" th:field="*{{dateEnd}}" /></strong> </p>
ourfbht's avatar
ourfbht committed
                <p><strong>TimeBegin <input type="text" class="timepicker" th:field="*{timeEnd}" name="timeEnd" required /></strong></p>
                <p><strong>Comment <input type="text" th:field="*{comment}" /></strong></p>
                <p><input type="submit" value="Submit"  class="waves-effect waves-light btn right teal darken-2"/></p>
            </form>
        </div>
roxane.carraux's avatar
roxane.carraux committed

ourfbht's avatar
ourfbht committed
            document.addEventListener('DOMContentLoaded', function() {
                var elems = document.querySelectorAll('.dropdown-trigger');
                var instances = M.Dropdown.init(elems, {});
            });
            jQuery(document).ready(function(){
                jQuery('.timepicker').timepicker({
                    twelveHour: false
                }); 
            });
        $('.datepicker').pickadate({
                format: 'yyyy-mm-dd'
            }).on('mousedown',function(event){
                event.preventDefault();
            });
roxane.carraux's avatar
roxane.carraux committed
</html>