0 Votes

Changes for page PublicSubmission

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

From version 17.1
edited by Ryan C
on 2025/06/08 18:17
Change comment: There is no comment for this version
To version 13.1
edited by Ryan C
on 2025/06/08 18:08
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,38 +1,15 @@
1 -{{html clean="false"}}
2 -<h3>Submit an Incident</h3>
3 -<form method="post" action="/bin/save/Help/Applications/Anti%20White%20Incidents/WebHome">
4 - <!-- Redirect back to the public interface -->
5 - <input type="hidden" name="xredirect" value="/bin/view/Help/Applications/AntiWhiteIncidents/Code/PublicInterface">
6 -
7 - <!-- Object class information -->
8 - <input type="hidden" name="objectPolicy" value="create">
9 - <input type="hidden" name="classname" value="Help.Applications.Anti White Incidents.Code.AntiWhiteIncidentsClass">
10 -
11 - <div class="form-group">
12 - <label>Headline</label>
13 - <input type="text" name="AntiWhiteIncidents_0_headline" class="form-control" required>
14 - </div>
15 -
16 - <div class="form-group">
17 - <label>Description</label>
18 - <textarea name="AntiWhiteIncidents_0_description" class="form-control" rows="4" required></textarea>
19 - </div>
20 -
21 - <div class="form-group">
22 - <label>Source URL</label>
23 - <input type="text" name="AntiWhiteIncidents_0_url" class="form-control">
24 - </div>
25 -
26 - <div class="form-group">
27 - <label>Image URL</label>
28 - <input type="text" name="AntiWhiteIncidents_0_image" class="form-control">
29 - </div>
30 -
31 - <div class="form-group">
32 - <label>Date</label>
33 - <input type="date" name="AntiWhiteIncidents_0_date" class="form-control">
34 - </div>
35 -
36 - <button type="submit" class="btn btn-primary">Submit Incident</button>
37 -</form>
38 -{{/html}}
1 +{{velocity output="yes"}}
2 +<p>Request method: $request.getMethod()</p>
3 +<p>Request parameters: #foreach($p in $request.parameterNames) $p = "$request.getParameter($p)"<br/>#end</p>
4 +
5 +#if($request.headline)
6 + <div style="color:green;font-weight:bold;">Received submission: $request.headline</div>
7 +#else
8 + <form method="post" action="$doc.getURL()">
9 + <input type="hidden" name="form_token" value="$services.csrf.getToken()" />
10 + <label>Headline: <input type="text" name="headline"/></label>
11 + <button type="submit">Submit</button>
12 + </form>
13 +#end
14 +{{/velocity}}
15 +