blob: 48e7b64cf905cabed861c923d4431e7d2400f1d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
//- vim:ts=4:sw=4:
doctype html
html
head
include head
title Send Message
style.
input, textarea { width: min(45rem,100%) }
script.
function next(event,sel) {
if (event.keyCode === 13) {
document.querySelector(sel).focus();
return false;
}
return true;
}
body
include header
article
h1 Send Message
form(method="post" action="/message/send")
p To:
br
input(
id="to"
type="text"
name="to"
required
size=80
maxlength=80
value=to_name
onpress="return next(event,'#subject')"
autofocus=(to_name === "")
list="friends"
)
datalist(id="friends")
each who in friends
option= who
p Subject:
br
input(
id="subject"
type="text"
name="subject"
required
size=80
maxlength=80
pattern=".*\\S+.*"
value=subject
onpress="return next(event,'#body')"
autofocus=(to_name !== "" && subject === "")
)
p Body:
br
textarea(
id="body"
name="body"
required
cols=80
rows=20
maxlength=32000
autofocus=(to_name !== "" && subject !== "")
)
|
| #{body}
p
button(type="submit") Send
|