Comment Plugin Template for Support Question Comments

This page defines a custom CommentPlugin template to add comments to WebHome pages.

Supports changing status on comment

%TMPL:DEF{PROMPT:supportquery}%%TMPL:P{promptbox}%Change status to: <select %DISABLED% name="SupportStatus">
<option %IF{"'%FORMFIELD{SupportStatus}%'='AskedQuestions'" then="selected='selected'"}%>AskedQuestions</option>
<option %IF{"'%FORMFIELD{SupportStatus}%'='AssignedQuestions'" then="selected='selected'"}%>AssignedQuestions</option>
<option %IF{"'%FORMFIELD{SupportStatus}%'='AnsweredQuestions'" then="selected='selected'"}%>AnsweredQuestions</option>
<option %IF{"'%FORMFIELD{SupportStatus}%'='ClosedUnanswered'" then="selected='selected'"}%>ClosedUnanswered</option>
</select>%TMPL:END%

Output format definition: (specify encode="off" to preserve special characters, use encode="safe" to escape special characters (e.g. for verbatim text))

%TMPL:DEF{OUTPUT:supportquery}%%POS:BEFORE%
%URLPARAM{ "comment" encode="safe" }%

-- %WIKIUSERNAME% - %DATE%

%TMPL:END%

Input form definition:

%TMPL:DEF{PROMPT:support_comment}%<div class="commentPlugin commentPluginPromptBox">
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><textarea %DISABLED% rows="%rows|14%" cols="%cols|80%" name="comment" class="twikiInputField" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea></td></tr>
<tr><td>Change status to: <select %DISABLED% name="Status">
<option %IF{"'%FORMFIELD{Status}%'='Asked'" then="selected='selected'"}% value="Asked">Asked question</option>
<option %IF{"'%FORMFIELD{Status}%'='Assigned'" then="selected='selected'"}% value="Assigned">Assigned question</option>
<option %IF{"'%FORMFIELD{Status}%'='Answered'" then="selected='selected'"}% value="Answered">Answered question</option>
<option %IF{"'%FORMFIELD{Status}%'='Unanswered'" then="selected='selected'"}% value="Unanswered">Closed unanswered</option>
</select></td>
<td align="right"><input %DISABLED% type="submit" value="%button|Add comment%" class="twikiButton" /></td></tr></table>
</div><!--/commentPlugin-->
%BR%%TMPL:END%

Output format definition: (specify encode="off" to preserve special characters, use encode="safe" to escape special characters (e.g. for verbatim text))

%TMPL:DEF{OUTPUT:support_comment}%%POS:BEFORE%
%URLPARAM{ "comment" encode="safe" }%

-- %WIKIUSERNAME% - %DATE%

%TMPL:END%

Include generic comment templates:

%TMPL:INCLUDE{"%TWIKIWEB%.CommentPlugin"}%

Related: SupportForumMaintenance, SupportForum, AskSupportQuestion, WebTopicEditTemplate, SupportHeader, CommentPlugin

WebForm
SupportStatus Select one...

This topic: Support > WebHome > SupportCommentTemplate
Topic revision: r1 - 2009-09-17 - PeterJones
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback