Changes for page SubmitIncidentMacro
Summary
Details
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,13 +1,40 @@ 1 1 {{velocity}} 2 -#set($headline = "$!wikimacro.parameters.headline") 3 -#set($url = "$!wikimacro.parameters.url") 4 -#set($description = "$!wikimacro.parameters.description") 5 -#set($image = "$!wikimacro.parameters.image") 2 +#set($request = $request) 3 +#if($request.getParameter("submitIncident")) 4 + #set($headline = $request.getParameter("headline")) 5 + #set($url = $request.getParameter("url")) 6 + #set($desc = $request.getParameter("description")) 6 6 7 - (%style="margin-bottom:20px;width:100%"%)8 - |[[image:$image||alt="image"data-xwiki-image-style="thumbnail-clickable" style="border:1pxsolid #cccccc"width="200"]]|9 - ===[$headline>$url]===8 + #set($block = " 9 +(% style=\"margin-bottom:20px; width:100%\" %) 10 +|[[image:PLACEHOLDER.jpg||alt=\"image\" data-xwiki-image-style=\"thumbnail-clickable\" style=\"border:1px solid #cccccc\" width=\"200\"]]| 10 10 11 -**$description** 12 +=== [[${headline}>>${url}]] === 13 + 14 +${desc} 15 +[[Read More>>${url}]] 16 +") 17 + 18 + #set($doc = $xwiki.getDocument($doc.fullName)) 19 + #set($content = $doc.getContent()) 20 + $doc.setContent("${content}\n\n${block}") 21 + $doc.save() 22 + 23 + <div class=\"xwiki-messages xwiki-successmessage\">Incident added to page.</div> 24 +#end 25 + 26 +<form method="post"> 27 + <h3>Add Incident</h3> 28 + <label>Headline:</label><br/> 29 + <input type="text" name="headline" style="width:100%" /><br/><br/> 30 + 31 + <label>URL:</label><br/> 32 + <input type="text" name="url" style="width:100%" /><br/><br/> 33 + 34 + <label>Description:</label><br/> 35 + <textarea name="description" rows="4" style="width:100%"></textarea><br/><br/> 36 + 37 + <input type="submit" name="submitIncident" value="Submit Incident" /> 38 +</form> 12 12 {{/velocity}} 13 13 - Macro content type
-
... ... @@ -1,1 +1,0 @@ 1 -Unknown - Macro content availability
-
... ... @@ -1,1 +1,0 @@ 1 -No content - Macro visibility
-
... ... @@ -1,1 +1,0 @@ 1 -Current Wiki
- XWiki.WikiMacroParameterClass[0]
-
- Parameter deprecated
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -The title of the incident - Parameter group
-
... ... @@ -1,1 +1,0 @@ 1 -Main Info - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -Yes - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -headline - Parameter type
-
... ... @@ -1,1 +1,0 @@ 1 -Unknown
- XWiki.WikiMacroParameterClass[1]
-
- Parameter deprecated
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -The source URL of the incident (link) - Parameter group
-
... ... @@ -1,1 +1,0 @@ 1 -Main Info - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -Yes - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -URL - Parameter type
-
... ... @@ -1,1 +1,0 @@ 1 -Unknown
- XWiki.WikiMacroParameterClass[3]
-
- Parameter deprecated
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -Description of the incident - Parameter group
-
... ... @@ -1,1 +1,0 @@ 1 -Main Info - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -Yes - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -description - Parameter type
-
... ... @@ -1,1 +1,0 @@ 1 -Wiki
- XWiki.WikiMacroParameterClass[4]
-
- Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -Upload or select an image to display with the incident (e.g. myimage.jpg) - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -image - Parameter type
-
... ... @@ -1,1 +1,0 @@ 1 -Unknown