Changes for page Download Version
Last modified by Simon Urli on 2023/10/10
From version 2.1
edited by Ecaterina Moraru (Valica)
on 2016/05/24
on 2016/05/24
Change comment:
Imported from XAR
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,36 +1,18 @@ 1 1 {{velocity}} 2 2 $xwiki.ssx.use("Download.WebHome") 3 3 ## Parameters: 4 -## - download URL:URLtothedownload4 +## - downloadLink: link used to download the selected project version from the mirror site 5 5 ## - projectVersion: specifies the project version 6 -## - email: passed in the request when submitting the form 7 7 ## 8 -#set ($downloadURL = $request.downloadURL) 9 -#set ($projectVersion = $request.projectVersion) 10 -#set ($userEmail = $request.userEmail) 11 -## If email is in the request then send the user's email by mail and redirect to the download 12 -#if ("$!userEmail" != '') 13 - ## Send the mail asynchronously 14 - #set ($message = $services.mailsender.createMessage("[email protected]", "New user registration")) 15 - #set ($discard = $message.addPart("text/plain", "$userEmail")) 16 - #set ($discard = $services.mailsender.sendAsynchronously([$message], 'database')) 17 - ## Perform the redirect 18 - #if ("$!downloadURL" != '') 19 - #set ($discard = $response.sendRedirect($downloadURL)) 20 - #else 21 - ## Redirect to the Download home 22 - $set ($discard = $response.sendRedirect($xwiki.getURL('Download.WebHome'))) 23 - #end 24 -#else 7 +#set ($downloadLink = $request.get('downloadLink')) 8 +#set ($projectVersion = $request.get('projectVersion')) 25 25 {{html}} 26 26 <div class="row"> 27 27 <div class="col-xs-12"> 28 - #if ( "$!downloadURL"!= ''&&"$!projectVersion" != '')12 + #if ($downloadLink && $projectVersion) 29 29 <div class="download-container border-green subscribe-area"> 30 30 <h3 class="subscribe">Join the Community!</h3> 31 31 <form action="" class="xform"> 32 - <input type="hidden" name="downloadURL" value="$downloadURL"/> 33 - <input type="hidden" name="projectVersion" value="$projectVersion"/> 34 34 <dl> 35 35 <dt> 36 36 <label for="user_email" class="hidden">Email</label> ... ... @@ -37,12 +37,12 @@ 37 37 <span class="xHint">Enter your email address to receive news and updates about XWiki (new releases, security alerts, offers from <a href="#benefitsFromCompanies">top sponsoring companies</a>, tips and tricks, etc.)</span> 38 38 </dt> 39 39 <dd> 40 - <input type="email" placeholder="Email" autocomplete="off" name="user Email" id="userEmail" tabindex="1" autofocus/>22 + <input type="email" placeholder="Email" autocomplete="off" name="user[email]" id="user_email" tabindex="1" autofocus/> 41 41 </dd> 42 42 </dl> 43 43 <div class="buttons"> 44 - <input type="submit" value="Download" class="btn btn-success" tabindex="2"> 45 - <a class="btn btn-link btn-xs" href="$escapetool.xml($download URL)" tabindex="3" >Skip this form</a>26 + <input type="submit" value="Download" class="btn btn-success" tabindex="2" disabled > 27 + <a class="btn btn-link btn-xs" href="$escapetool.xml($downloadLink)" tabindex="3" >Skip this form</a> 46 46 </span> 47 47 </div> 48 48 </form> ... ... @@ -51,7 +51,6 @@ 51 51 </div> 52 52 </div> 53 53 {{/html}} 54 -#end 55 55 {{/velocity}} 56 56 57 57 {{html clean='false'}}