From c4cb974be197acfe06dc06359c25d04611fa47f2 Mon Sep 17 00:00:00 2001
From: Leonardo Vannucci <leonardo.vannucci@grupposistematica.it>
Date: Wed, 19 Sep 2018 12:33:21 +0200
Subject: [PATCH] Aggiunti campi nome e cognome, gestito limite allegati
---
dg1cloud-core/src/main/resources/templates/startURP.html | 47 +++++++++++++++++++++++++++++++++++++----------
1 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/dg1cloud-core/src/main/resources/templates/startURP.html b/dg1cloud-core/src/main/resources/templates/startURP.html
index ad63972..d7b85b3 100644
--- a/dg1cloud-core/src/main/resources/templates/startURP.html
+++ b/dg1cloud-core/src/main/resources/templates/startURP.html
@@ -23,7 +23,8 @@
<form data-toggle="validator" action="#"
th:action="@{/sendStartRequest}" th:object="${startURPForm}"
method="post" role="form"
- enctype="multipart/form-data" >
+ 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>
@@ -33,26 +34,36 @@
</div>
<div th:unless="${appIdentifier}">
<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>
+ <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 />
+ <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 ></textarea>
+ <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="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>
+ <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('allegato')}"
+ th:each="error: ${#fields.errors('allegati')}"
th:text="${error}"></p>
</div>
<div class="form-group">
@@ -73,6 +84,22 @@
</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>
--
Gitblit v1.6.2