-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.jade
More file actions
53 lines (44 loc) · 1.71 KB
/
Copy pathform.jade
File metadata and controls
53 lines (44 loc) · 1.71 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
extends layout
block context
block preamble
- var action = '/ops'
if (!operation.isNew)
- action += '/' + operation.id
if (typeof errors !== 'undefined')
.fade.in.alert.alert-block.alert-error
a.close(data-dismiss="alert", href="javascript:void(0)") x
ul
each error in errors
li= error.type
form.form-horizontal(method="post", action=action, enctype="multipart/form-data")
if (!operation.isNew)
input(type="hidden", name="id", value=operation.id)
input(type="hidden", name="_method", value="PUT")
.control-group
label.control-label(for='system') Solar System
.controls
input#system(type='text', name="system", value=operation.system, placeholder='Enter the solar system', autocomplete='off')
span.help-block What system is this operation taking place in?
:coffeescript
populateSystems = ->
$.getJSON "/data/systems.json", (systems) ->
system_names = []
for name of systems
system_names.push systems[name]
$('#system').typeahead
source: system_names
items: 8
$ ->
populateSystems()
.control-group
label.control-label(for='starts_at') Start Time
.controls
span.input-append.date.starts_at
input#starts_at(type='text', name="starts_at", value=formatDatetime(operation.starts_at), size='16', data-format='MM/dd/yy hh:mm', data-pickSeconds=false)
span.add-on
i(data-time-icon='icon-time', form-date-icon='icon-calendar')
:coffeescript
$ ->
$('.date.starts_at').datetimepicker()
.form-actions
button.btn.btn-primary(type='submit') Save changes