-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomputer.pug
More file actions
executable file
·29 lines (27 loc) · 1.04 KB
/
computer.pug
File metadata and controls
executable file
·29 lines (27 loc) · 1.04 KB
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
form(id="computerForm")
p Name:
input(type="text", disabled="true", name="name", size=50, value=(computer.name || ""))
p Dir:
input(type="text" size=50 name="dir" value=(computer.dir||""))
p OS:
select(name="os")
if(computer.os === "mac")
option(value="mac" selected) Mac
else
option(value="mac") Mac
if(computer.os === "pc")
option(value="pc" selected) PC
else
option(value="pc") PC
if(computer.os === "linux")
option(value="linux" selected) Linux
else
option(value="linux") Linux
p Options:
each name in Object.keys(data.sourceports)
- const sourceport = data.sourceports[name]
- if( !computer.options ) computer.options={};
p(style="margin-left:30px;")= name
input( type="text" name="options"+name value=computer.options[name]||"" size=70 )
button(name="save" type="submit" formaction="javascript:computerForm(document.getElementById('computerForm'));") Save
button(name="cancel" formaction="javascript:changeContext(contexts.computers);") Cancel