Fixes #33
This commit is contained in:
parent
dfac36593d
commit
5dc95b27cb
2 changed files with 6 additions and 1 deletions
|
|
@ -181,7 +181,7 @@
|
|||
</div>
|
||||
<form action="${c.req.makeUri(action, false) & "#preview"}" method="POST">
|
||||
#if action == "doreply":
|
||||
<input type="hidden" name="subject" value="${title}"/>
|
||||
${HiddenField(c, "subject", title)}
|
||||
#else:
|
||||
${FieldValid(c, "subject", "Subject:")}
|
||||
${TextWidget(c, "subject", title, maxlength=100)}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,11 @@ proc TextWidget(c: TForumData, name, defaultText: string,
|
|||
return """<input type="text" name="$1" maxlength="$2" value="$3" $4/>""" % [
|
||||
name, $maxlength, x, if size != -1: "size=\"" & $size & "\"" else: ""]
|
||||
|
||||
proc HiddenField(c: TForumData, name, defaultText: string): string =
|
||||
let x = if defaultText != reuseText: defaultText
|
||||
else: xmlEncode(c.req.params[name])
|
||||
return """<input type="hidden" name="$1" value="$2"/>""" % [name, x]
|
||||
|
||||
proc TextAreaWidget(c: TForumData, name, defaultText: string): string =
|
||||
let x = if defaultText != reuseText: defaultText
|
||||
else: xmlEncode(c.req.params[name])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue