Leonardo Vannucci
2018-08-10 09740e77ea352852ff90b738787f7f6aa657b604
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
<!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}"/>
       <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>
       
       <title>Link download file</title>
       <script src='https://www.google.com/recaptcha/api.js'></script>
   </head>
   <body>
       <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><i class="glyphicon glyphicon-lock" style="font-size:2em;"></i></h3>
                               <h2 class="text-center" style="word-wrap: break-word;" th:text="*{downloadFileCaptchaForm.fileName}"></h2>
                               <div class="panel-body">
                                   <form action="#" th:action="@{/downloadFileCaptcha}" th:object="${downloadFileCaptchaForm}" method="post">
                                       <input type="hidden" th:field="*{id}" />
                                       <input type="hidden" th:field="*{fileName}" />
                                       <input type="hidden" th:field="*{secretKey}" />
                                       <div class="form-group">
                                           <div class="g-recaptcha" th:attr="data-sitekey=${@captchaSettings.getKey()}"></div>
                                           <p class="error-message"
                                               th:each="error: ${#fields.errors('reCaptchaResponse')}"
                                               th:text="${error}">Errore validazione reCaptcha</p>
                                       </div>
                                       <div class="form-group">
                                           <button name="downloadFile" type="submit" th:text="'Scarica il file ' + *{fileName} "></button>
                                       </div>
                                   </form>
                               </div>
                           </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>