Leonardo Vannucci
2018-09-17 8b5a0e6b856f4b18785a98996dc383143b3f2f1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
   <head>
       <meta charset="utf-8"/>
       <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
       <meta name="viewport" content="width=device-width, initial-scale=1"/>
       
       <link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/3.3.7/css/bootstrap.min.css}"/>
       
       <title>Avvia istanza URP</title>
       <script src='https://www.google.com/recaptcha/api.js'></script>
   </head>
   <body>
       <div class="container">
           <div class="row">
               <div class="col-md-4 col-md-offset-4">
                   <div class="panel panel-default">
                       <div class="panel-body">
                           <div class="text-center">
                               <h3><i class="glyphicon glyphicon-inbox" style="font-size:2em;"></i></h3>
                               <h2 class="text-center" style="word-wrap: break-word;" th:text="'Avvia istanza URP'"></h2>
                               <div class="panel-body">
                                   <form data-toggle="validator" action="#"
                                       th:action="@{/sendStartRequest}" th:object="${startURPForm}"
                                       method="post" role="form"
                                       enctype="multipart/form-data" >
                                       <div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"></div>
                                       <div class="form-group">
                                           <label for="mittente" class="control-label">Mittente*</label>
                                           <input type="email" class="form-control" th:field="*{mittente}" required placeholder="Email mittente" />
                                           <p th:if="${#fields.hasErrors('mittente')}">Email mittente mancante</p>
                                       </div>
                                       <div class="form-group">
                                           <label for="oggetto" class="control-label">Oggetto*</label>
                                           <input type="text" class="form-control" th:field="*{oggetto}" required />
                                           <p th:if="${#fields.hasErrors('oggetto')}">Compilare l'oggetto della richiesta</p>
                                       </div>
                                       <div class="form-group">
                                           <label for="oggetto" class="control-label">Richiesta*</label>
                                           <textarea rows="5" class="form-control" th:field="*{corpo}" required ></textarea>
                                           <p th:if="${#fields.hasErrors('corpo')}">Scrivere il corpo della richiesta</p>
                                       </div>
                                       <div class="form-group">
                                           <label for="allegato" class="control-label">Allegato richiesta*</label>
                                           <input type="file" class="form-control" th:field="*{allegato}" required ></input>
                                           <p th:if="${#fields.hasErrors('allegato')}">Inserire un allegato</p>
                                           <p class="error-message"
                                               th:each="error: ${#fields.errors('allegato')}"
                                               th:text="${error}"></p>
                                       </div>
                                       <div class="form-group">
                                           <div class="g-recaptcha" th:attr="data-sitekey=${@captchaSettings.getKey()}"></div>
                                           <p class="error-message"
                                               th:each="error: ${#fields.errors('reCaptchaResponse')}"
                                               th:text="'Errore validazione reCaptcha'"></p>
                                       </div>
                                       <div class="form-group">
                                           <button name="Invia richiesta" type="submit" th:text="'Invia richiesta'"></button>
                                       </div>
                                   </form>
                               </div>
                           </div>
                       </div>
                   </div>
               </div>
           </div>
       </div>
       <script type="text/javascript" th:src="@{/webjars/jquery/3.2.1/jquery.min.js/}"></script>
       <script type="text/javascript" th:src="@{/webjars/bootstrap/3.3.7/js/bootstrap.min.js}"></script>
   </body>
</html>