Leonardo Vannucci
2019-04-03 84d99d0f0700b2a19f504b21b1747275251305d8
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!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 style="background-color: #114681">
       <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><img th:src="@{/images/Logo-Estar Trasparente.png}" /></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"
                                       onsubmit="$('#modalWait').modal('toggle')">
                                       <div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"></div>
                                       <div th:if="${appIdentifier}">
                                           <div th:text="${'Protocollo ' + appIdentifier + ' del ' + appIdentifierDate}" th:class="${'alert alert-info'}"></div>
                                           <div>
                                               <p><a th:href="@{/startURP}" class="btn btn-link"><span th:text="${'Effettua una nuova richiesta'}"></span></a></p>
                                           </div>
                                       </div>
                                       <div th:unless="${appIdentifier}">
                                           <div class="form-group">
                                               <label for="nome" class="control-label">Nome*</label>
                                               <input type="text" class="form-control" th:field="*{nome}" required placeholder="Inserire il proprio nome" />
                                               <p th:if="${#fields.hasErrors('nome')}">Compilare il nome</p>
                                           </div>
                                           <div class="form-group">
                                               <label for="cognome" class="control-label">Cognome*</label>
                                               <input type="text" class="form-control" th:field="*{cognome}" required placeholder="Inserire il proprio cognome" />
                                               <p th:if="${#fields.hasErrors('cognome')}">Compilare il cognome</p>
                                           </div>
                                           <div class="form-group">
                                               <label for="email" class="control-label">Email*</label>
                                               <input type="email" class="form-control" th:field="*{email}" required placeholder="Inserire l'email" />
                                               <p th:if="${#fields.hasErrors('email')}">Email 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 placeholder="Inserire l'oggetto della richiesta" />
                                               <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 placeholder="Specificare il dettaglio della richiesta" ></textarea>
                                               <p th:if="${#fields.hasErrors('corpo')}">Scrivere il corpo della richiesta</p>
                                           </div>
                                           <div class="form-group">
                                               <label for="allegati" class="control-label">Allegato richiesta</label>
                                               <input type="file" class="form-control" th:field="*{allegati}" multiple="multiple"></input>
                                               <p th:if="${#fields.hasErrors('allegati')}">Inserire un allegato</p>
                                               <p class="error-message"
                                                   th:each="error: ${#fields.errors('allegati')}"
                                                   th:text="${error}"></p>
                                           </div>
                                           <div class="form-group">
                                               <div th:if="${#fields.hasErrors('reCaptchaResponse')}" th:text="'Errore validazione reCAPTCHA'" th:class="${'alert ' + alertClass}"></div>
                                               <div class="g-recaptcha" th:attr="data-sitekey=${@captchaSettings.getKey()}"></div>
                                           </div>
                                           <div class="form-group">
                                               <button name="Invia richiesta" type="submit" th:text="'Invia richiesta'"></button>
                                           </div>
                                       </div>
                                   </form>
                               </div>
                           </div>
                       </div>
                   </div>
               </div>
           </div>
       </div>
 
       <!-- Modal -->
       <div class="modal fade" id="modalWait" tabindex="-1" role="dialog" aria-labelledby="modalWaitLabel" data-backdrop="false">
           <div class="modal-dialog modal-sm" role="document">
               <div class="modal-content">
                   <div class="modal-header">
                       <h4 class="modal-title" id="modalWait">Richiesta inviata, attendere prego...</h4>
                   </div>
                   <div class="modal-body">
                       <div class="progress">
                           <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></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>