Question
Hello,
I am running TWiki 4.2. I would like to integrate the Return Comment (seen at
CommentPluginTemplate with our Action Tracker Comment box.
I think that I am 90% of the way to the results that I want. Currently, the comment box appears in the original topic. Filling in and submitting the comment box adds an Action to the secondary topic and redirects back to the original topic.
However, the Action added to the secondary topic has empty values for the attributes - even though the form was filled out.
This is what our (working) Action Tracker Comment box looks like now:
%TMPL:DEF{PROMPT:action_custom}%
%TABLE{databg="#ffffff" tableborder="0" cellborder="0"}%
---+ Add Item
| <label for="action_filename">Filename(s):</label>| <input class="twikiInputField" name="action_filename" id="action_filename" type="text" size="50" value="%URLPARAM{"who"}%" /> |
| <label for="action_comment">Issue(s):</label>| <textarea %DISABLED% rows="%rows|3%" cols="%cols|50%" name="action_comment" id="action_comment" class="twikiInputField" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea> |
| <label for="action_creator">Added by</label>| <input class="twikiInputField" name="action_creator" id="action_creator" type="text" size="25" value="%WIKIUSERNAME%" /> |
| <label for="action_created">Added date</label>| <input class="twikiInputField" name="action_created" id="action_created" type="date" size="12" value="%SERVERTIME{$year/$mo/$day}%" /> |
| <label for="action_priority">Priority:</label>| <input class="twikiInputField" type="radio" value="High" name="action_priority" /> High <input type="radio" value="Normal" name="action_priority" checked="checked"/> Normal <input type="radio" value="Low" name="action_priority" /> Low |
|| <input %DISABLED% type="submit" class="twikiButton" value="Add action" /> |
%TMPL:END%
This is what I have so far with combining the two:
%TMPL:DEF{returnpromptbox}%
<input type="hidden" name="redirectto" value="Sandbox.TestActionTrackerTWikiTables" />
%TMPL:P{PROMPT:testreturn}%
%TABLE{ valign="top" }%
| <b>Add new Labeling Issue</b> ||||
| Filename(s): | <input %DISABLED% type="text" size="80" name="textgrid" value="" /> <br> Note: Separate multiple filenames with a space. |||
| Issue(s): | <input %DISABLED% type="text" size="80" name="issue" value="" /> |||
| Added by: | <input %DISABLED% type="text" size="25" name="addedby" value="%MAINWEB%.%WIKINAME%" /> | Added date: <input %DISABLED% type="text" size="12" name="addeddate" value="%SERVERTIME{$year/$mo/$day}%" /> | <input type="hidden" name="status" value="open" /> |
| Priority: | <input type="radio" value="High" name="priority" /> High <input type="radio" value="Normal" name="priority" checked="checked"/> Normal <input type="radio" value="Low" name="priority" /> Low | <input %DISABLED% type="submit" value="%button|Add%" /> |
%TMPL:END%
%TMPL:DEF{PROMPT:return}%%TMPL:P{returnpromptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:return}%%POS:BEFORE%%TMPL:P{OUTPUT:testreturn}%%POS:BEFORE%%ACTION{filename="%URLPARAM{"action_filename"}%" priority="%URLPARAM{"action_priority"}%" creator="%URLPARAM{"action_creator"}%" created="%URLPARAM{"action_created"}%" state="open"}% %URLPARAM{"action_comment"}%
%TMPL:END%
And this is the output that is generated in the secondary topic:
%ACTION{ created="2008-06-25" creator="" due="" filename="" priority="" state="open" uid="000057" who="Main.NinaGlatt" }% %ENDACTION%
Could someone please show me what I'm doing wrong? Thank you!
Environment
--
NinaGlatt - 25 Jun 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Silly me! I was working with an outdated version of the table. If the Return+Action Tracker comment is the following, it works fine!
%TMPL:DEF{returnpromptbox}%
<input type="hidden" name="redirectto" value="Sandbox.TestActionTrackerTWikiTables" />
%TMPL:P{PROMPT:testreturn}%
%TABLE{databg="#ffffff" tableborder="0" cellborder="0"}%
---+ Add Item
| <label for="action_filename">Filename(s):</label>| <input class="twikiInputField" name="action_filename" id="action_filename" type="text" size="50" value="%URLPARAM{"who"}%" /> |
| <label for="action_comment">Issue(s):</label>| <textarea %DISABLED% rows="%rows|3%" cols="%cols|50%" name="action_comment" id="action_comment" class="twikiInputField" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea> |
| <label for="action_creator">Added by</label>| <input class="twikiInputField" name="action_creator" id="action_creator" type="text" size="25" value="%WIKIUSERNAME%" /> |
| <label for="action_created">Added date</label>| <input class="twikiInputField" name="action_created" id="action_created" type="date" size="12" value="%SERVERTIME{$year/$mo/$day}%" /> |
| <label for="action_priority">Priority:</label>| <input class="twikiInputField" type="radio" value="High" name="action_priority" /> High <input type="radio" value="Normal" name="action_priority" checked="checked"/> Normal <input type="radio" value="Low" name="action_priority" /> Low |
|| <input %DISABLED% type="submit" class="twikiButton" value="Add action" /> |
%TMPL:END%
%TMPL:DEF{PROMPT:return}%%TMPL:P{returnpromptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:return}%%POS:BEFORE%%TMPL:P{OUTPUT:testreturn}%%POS:BEFORE%%ACTION{filename="%URLPARAM{"action_filename"}%" priority="%URLPARAM{"action_priority"}%" creator="%URLPARAM{"action_creator"}%" created="%URLPARAM{"action_created"}%" state="open"}% %URLPARAM{"action_comment"}%
%TMPL:END%
--
NinaGlatt - 25 Jun 2008