Larger subject field.

This commit is contained in:
Dominik Picheta 2014-12-07 01:05:16 +00:00
commit 048180dd8b
3 changed files with 17 additions and 6 deletions

View file

@ -171,10 +171,10 @@
#else:
${FieldValid(c, "subject", "Subject:")}
${TextWidget(c, "subject", title, maxlength=100)}
<br />
#end if
<br />
${FieldValid(c, "content", "Content:")}<br />
${TextAreaWidget(c, "content", content, width=100, height=20)}<br />
${TextAreaWidget(c, "content", content)}<br />
${FormSession(c, action)}
# if isEdit:

View file

@ -99,12 +99,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 TextAreaWidget(c: TForumData, name, defaultText: string,
width = 80, height = 20): string =
proc TextAreaWidget(c: TForumData, name, defaultText: string): string =
let x = if defaultText != reuseText: defaultText
else: xmlEncode(c.req.params[name])
return """<textarea name="$1" cols="$2" rows="$3">$4</textarea>""" % [
name, $width, $height, x]
return """<textarea name="$1">$2</textarea>""" % [
name, x]
proc FieldValid(c: TForumData, name, text: string): string =
if name == c.invalidField:

View file

@ -521,6 +521,18 @@ article#content form > input, article#content form > textarea
border: 1px solid #6D6D6D;
}
article#content form > input[type=text]
{
width: 70%;
min-width: 500px;
}
article#content form > textarea
{
width: 100%;
height: 200px;
}
article#content form > input:focus, article#content form > textarea:focus
{
border: 1px solid #1cb3ec;