| .. | .. |
|---|
| 193 | 193 | if ( "text/plain".equalsIgnoreCase(allegato.getContentType()) == true ) { |
|---|
| 194 | 194 | dh = new DataHandler(new String(allegato.getBytes()), allegato.getContentType()); |
|---|
| 195 | 195 | } else { |
|---|
| 196 | | - dh = new DataHandler(allegato.getBytes(), allegato.getContentType()); |
|---|
| 196 | + dh = new DataHandler(allegato.getBytes(), "application/octet-stream"); |
|---|
| 197 | 197 | } |
|---|
| 198 | 198 | attachment.setData(dh); |
|---|
| 199 | 199 | } catch (IOException e) { |
|---|
| .. | .. |
|---|
| 67 | 67 | th:text="${error}"></p> |
|---|
| 68 | 68 | </div> |
|---|
| 69 | 69 | <div class="form-group"> |
|---|
| 70 | + <div th:if="${#fields.hasErrors('reCaptchaResponse')}" th:text="'Errore validazione reCAPTCHA'" th:class="${'alert ' + alertClass}"></div> |
|---|
| 70 | 71 | <div class="g-recaptcha" th:attr="data-sitekey=${@captchaSettings.getKey()}"></div> |
|---|
| 71 | | - <p class="error-message" |
|---|
| 72 | | - th:each="error: ${#fields.errors('reCaptchaResponse')}" |
|---|
| 73 | | - th:text="'Errore validazione reCaptcha'"></p> |
|---|
| 74 | 72 | </div> |
|---|
| 75 | 73 | <div class="form-group"> |
|---|
| 76 | 74 | <button name="Invia richiesta" type="submit" th:text="'Invia richiesta'"></button> |
|---|