Larger subject field.
This commit is contained in:
parent
e11f5d9345
commit
048180dd8b
3 changed files with 17 additions and 6 deletions
|
|
@ -171,10 +171,10 @@
|
||||||
#else:
|
#else:
|
||||||
${FieldValid(c, "subject", "Subject:")}
|
${FieldValid(c, "subject", "Subject:")}
|
||||||
${TextWidget(c, "subject", title, maxlength=100)}
|
${TextWidget(c, "subject", title, maxlength=100)}
|
||||||
|
<br />
|
||||||
#end if
|
#end if
|
||||||
<br />
|
|
||||||
${FieldValid(c, "content", "Content:")}<br />
|
${FieldValid(c, "content", "Content:")}<br />
|
||||||
${TextAreaWidget(c, "content", content, width=100, height=20)}<br />
|
${TextAreaWidget(c, "content", content)}<br />
|
||||||
${FormSession(c, action)}
|
${FormSession(c, action)}
|
||||||
|
|
||||||
# if isEdit:
|
# if isEdit:
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,11 @@ proc TextWidget(c: TForumData, name, defaultText: string,
|
||||||
return """<input type="text" name="$1" maxlength="$2" value="$3" $4/>""" % [
|
return """<input type="text" name="$1" maxlength="$2" value="$3" $4/>""" % [
|
||||||
name, $maxlength, x, if size != -1: "size=\"" & $size & "\"" else: ""]
|
name, $maxlength, x, if size != -1: "size=\"" & $size & "\"" else: ""]
|
||||||
|
|
||||||
proc TextAreaWidget(c: TForumData, name, defaultText: string,
|
proc TextAreaWidget(c: TForumData, name, defaultText: string): string =
|
||||||
width = 80, height = 20): string =
|
|
||||||
let x = if defaultText != reuseText: defaultText
|
let x = if defaultText != reuseText: defaultText
|
||||||
else: xmlEncode(c.req.params[name])
|
else: xmlEncode(c.req.params[name])
|
||||||
return """<textarea name="$1" cols="$2" rows="$3">$4</textarea>""" % [
|
return """<textarea name="$1">$2</textarea>""" % [
|
||||||
name, $width, $height, x]
|
name, x]
|
||||||
|
|
||||||
proc FieldValid(c: TForumData, name, text: string): string =
|
proc FieldValid(c: TForumData, name, text: string): string =
|
||||||
if name == c.invalidField:
|
if name == c.invalidField:
|
||||||
|
|
|
||||||
|
|
@ -521,6 +521,18 @@ article#content form > input, article#content form > textarea
|
||||||
border: 1px solid #6D6D6D;
|
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
|
article#content form > input:focus, article#content form > textarea:focus
|
||||||
{
|
{
|
||||||
border: 1px solid #1cb3ec;
|
border: 1px solid #1cb3ec;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue