| .. | .. |
|---|
| 23 | 23 | <form data-toggle="validator" action="#" |
|---|
| 24 | 24 | th:action="@{/sendStartRequest}" th:object="${startURPForm}" |
|---|
| 25 | 25 | method="post" role="form" |
|---|
| 26 | | - enctype="multipart/form-data" > |
|---|
| 26 | + enctype="multipart/form-data" |
|---|
| 27 | + onsubmit="$('#modalWait').modal('toggle')"> |
|---|
| 27 | 28 | <div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"></div> |
|---|
| 28 | 29 | <div th:if="${appIdentifier}"> |
|---|
| 29 | 30 | <div th:text="${'Protocollo ' + appIdentifier + ' del ' + appIdentifierDate}" th:class="${'alert alert-info'}"></div> |
|---|
| .. | .. |
|---|
| 33 | 34 | </div> |
|---|
| 34 | 35 | <div th:unless="${appIdentifier}"> |
|---|
| 35 | 36 | <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> |
|---|
| 39 | 50 | </div> |
|---|
| 40 | 51 | <div class="form-group"> |
|---|
| 41 | 52 | <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" /> |
|---|
| 43 | 54 | <p th:if="${#fields.hasErrors('oggetto')}">Compilare l'oggetto della richiesta</p> |
|---|
| 44 | 55 | </div> |
|---|
| 45 | 56 | <div class="form-group"> |
|---|
| 46 | 57 | <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> |
|---|
| 48 | 59 | <p th:if="${#fields.hasErrors('corpo')}">Scrivere il corpo della richiesta</p> |
|---|
| 49 | 60 | </div> |
|---|
| 50 | 61 | <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> |
|---|
| 54 | 65 | <p class="error-message" |
|---|
| 55 | | - th:each="error: ${#fields.errors('allegato')}" |
|---|
| 66 | + th:each="error: ${#fields.errors('allegati')}" |
|---|
| 56 | 67 | th:text="${error}"></p> |
|---|
| 57 | 68 | </div> |
|---|
| 58 | 69 | <div class="form-group"> |
|---|
| .. | .. |
|---|
| 73 | 84 | </div> |
|---|
| 74 | 85 | </div> |
|---|
| 75 | 86 | </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> |
|---|
| 76 | 103 | <script type="text/javascript" th:src="@{/webjars/jquery/3.2.1/jquery.min.js/}"></script> |
|---|
| 77 | 104 | <script type="text/javascript" th:src="@{/webjars/bootstrap/3.3.7/js/bootstrap.min.js}"></script> |
|---|
| 78 | 105 | </body> |
|---|