Leonardo Vannucci
2018-09-19 c4cb974be197acfe06dc06359c25d04611fa47f2
dg1cloud-core/src/main/resources/templates/startURP.html
....@@ -23,7 +23,8 @@
2323 <form data-toggle="validator" action="#"
2424 th:action="@{/sendStartRequest}" th:object="${startURPForm}"
2525 method="post" role="form"
26
- enctype="multipart/form-data" >
26
+ enctype="multipart/form-data"
27
+ onsubmit="$('#modalWait').modal('toggle')">
2728 <div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"></div>
2829 <div th:if="${appIdentifier}">
2930 <div th:text="${'Protocollo ' + appIdentifier + ' del ' + appIdentifierDate}" th:class="${'alert alert-info'}"></div>
....@@ -33,26 +34,36 @@
3334 </div>
3435 <div th:unless="${appIdentifier}">
3536 <div class="form-group">
36
- <label for="mittente" class="control-label">Mittente*</label>
37
- <input type="email" class="form-control" th:field="*{mittente}" required placeholder="Email mittente" />
38
- <p th:if="${#fields.hasErrors('mittente')}">Email mittente mancante</p>
37
+ <label for="nome" class="control-label">Nome*</label>
38
+ <input type="text" class="form-control" th:field="*{nome}" required placeholder="Inserire il proprio nome" />
39
+ <p th:if="${#fields.hasErrors('nome')}">Compilare il nome</p>
40
+ </div>
41
+ <div class="form-group">
42
+ <label for="cognome" class="control-label">Cognome*</label>
43
+ <input type="text" class="form-control" th:field="*{cognome}" required placeholder="Inserire il proprio cognome" />
44
+ <p th:if="${#fields.hasErrors('cognome')}">Compilare il cognome</p>
45
+ </div>
46
+ <div class="form-group">
47
+ <label for="email" class="control-label">Email*</label>
48
+ <input type="email" class="form-control" th:field="*{email}" required placeholder="Inserire l'email" />
49
+ <p th:if="${#fields.hasErrors('email')}">Email mancante</p>
3950 </div>
4051 <div class="form-group">
4152 <label for="oggetto" class="control-label">Oggetto*</label>
42
- <input type="text" class="form-control" th:field="*{oggetto}" required />
53
+ <input type="text" class="form-control" th:field="*{oggetto}" required placeholder="Inserire l'oggetto della richiesta" />
4354 <p th:if="${#fields.hasErrors('oggetto')}">Compilare l'oggetto della richiesta</p>
4455 </div>
4556 <div class="form-group">
4657 <label for="oggetto" class="control-label">Richiesta*</label>
47
- <textarea rows="5" class="form-control" th:field="*{corpo}" required ></textarea>
58
+ <textarea rows="5" class="form-control" th:field="*{corpo}" required placeholder="Specificare il dettaglio della richiesta" ></textarea>
4859 <p th:if="${#fields.hasErrors('corpo')}">Scrivere il corpo della richiesta</p>
4960 </div>
5061 <div class="form-group">
51
- <label for="allegato" class="control-label">Allegato richiesta*</label>
52
- <input type="file" class="form-control" th:field="*{allegato}" required ></input>
53
- <p th:if="${#fields.hasErrors('allegato')}">Inserire un allegato</p>
62
+ <label for="allegati" class="control-label">Allegato richiesta</label>
63
+ <input type="file" class="form-control" th:field="*{allegati}" multiple="multiple"></input>
64
+ <p th:if="${#fields.hasErrors('allegati')}">Inserire un allegato</p>
5465 <p class="error-message"
55
- th:each="error: ${#fields.errors('allegato')}"
66
+ th:each="error: ${#fields.errors('allegati')}"
5667 th:text="${error}"></p>
5768 </div>
5869 <div class="form-group">
....@@ -73,6 +84,22 @@
7384 </div>
7485 </div>
7586 </div>
87
+
88
+ <!-- Modal -->
89
+ <div class="modal fade" id="modalWait" tabindex="-1" role="dialog" aria-labelledby="modalWaitLabel" data-backdrop="false">
90
+ <div class="modal-dialog modal-sm" role="document">
91
+ <div class="modal-content">
92
+ <div class="modal-header">
93
+ <h4 class="modal-title" id="modalWait">Richiesta inviata, attendere prego...</h4>
94
+ </div>
95
+ <div class="modal-body">
96
+ <div class="progress">
97
+ <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>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
76103 <script type="text/javascript" th:src="@{/webjars/jquery/3.2.1/jquery.min.js/}"></script>
77104 <script type="text/javascript" th:src="@{/webjars/bootstrap/3.3.7/js/bootstrap.min.js}"></script>
78105 </body>