Wiki source code of AddProduct
Last modified by Ilie Andriuta on 2023/07/06 11:31
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #set($productName = $request.productName) | ||
3 | #set($productVersion = $request.productVersion) | ||
4 | #if(("$!productName" != '' || $productName == '') && ("$!productVersion" != '' || $productVersion == '')) | ||
5 | #set($targetDocName = "${productName} ${productVersion}") | ||
6 | #set($documentReference = $services.model.createDocumentReference($xcontext.getDatabase(), 'QA', "$targetDocName")) | ||
7 | #set($redirectReference = $services.model.createDocumentReference($xcontext.getDatabase(), 'QA', 'Management')) | ||
8 | $response.sendRedirect($xwiki.getURL($documentReference, 'save', "QA.ProductClass_0_name=$escapetool.url($productName)&QA.ProductClass_0_version=$escapetool.url($productVersion)&template=QA.ProductTemplate&parent=QA.WebHome&title=$escapetool.url($targetDocName)&form_token=${services.csrf.getToken()}&xredirect=$escapetool.url($xwiki.getURL($redirectReference))")) | ||
9 | #end | ||
10 | |||
11 | {{html wiki="true"}} | ||
12 | <form action="" class="xform third" id="addProductForm"> | ||
13 | ((( | ||
14 | ; <label for="productName">$services.localization.render('qaapp.AddProduct.productName.label')</label> | ||
15 | : <input type="text" id="productName" name="productName"> | ||
16 | |||
17 | ; <label for="productVersion">$services.localization.render('qaapp.AddProduct.productVersion.label')</label> | ||
18 | : <input type="text" id="productVersion" name="productVersion"> | ||
19 | |||
20 | <div class="xform buttons"> | ||
21 | <span class="buttonwrapper"><input type="submit" value="$services.localization.render('qaapp.AddProduct.button')" class="button"/></span> | ||
22 | </div> | ||
23 | ))) | ||
24 | </form> | ||
25 | {{/html}} | ||
26 | {{/velocity}} |