0 Votes

Changes for page SubmitForm

Last modified by Ryan C on 2025/06/08 17:13

From version 2.1
edited by Ryan C
on 2025/06/08 17:06
Change comment: There is no comment for this version
To version 3.1
edited by Ryan C
on 2025/06/08 17:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,15 +1,16 @@
1 1  {{velocity}}
2 -#set($class = 'Help.Applications.Anti White Incidents.Code.Class')
3 -#set($doc = $xwiki.getDocument($class))
4 -$doc.display('image', 'edit')
5 -$doc.display('headline', 'edit')
6 -$doc.display('description', 'edit')
7 -$doc.display('url', 'edit')
8 -$doc.display('tags', 'edit')
9 -{{html clean="false"}}
10 -<form method="post" action="$xwiki.getURL('Help.Applications.Anti White Incidents.WebHome', 'save')">
11 - <input type="submit" value="Submit Report"/>
2 +#set ($template = "Help.Applications.AntiWhiteIncidents.Code.TemplateProvider")
3 +#set ($targetSpace = "Help.Applications.AntiWhiteIncidents")
4 +#set ($title = "Report - $xcontext.date") ## optional default
5 +#set ($redirect = $doc.getURL())
6 +
7 +<form action="$xwiki.getURL($template, 'createfromtemplate')">
8 + <input type="hidden" name="space" value="$targetSpace"/>
9 + <input type="hidden" name="template" value="$template"/>
10 + <input type="hidden" name="parent" value="$doc.fullName"/>
11 + <input type="hidden" name="title" value="$title"/>
12 + <input type="hidden" name="xredirect" value="$redirect"/>
13 + <input type="submit" value="Submit an Incident"/>
12 12  </form>
13 -{{/html}}
14 14  {{/velocity}}
15 15