-
Notifications
You must be signed in to change notification settings - Fork 314
/
contact.pug
61 lines (59 loc) · 2.7 KB
/
contact.pug
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
extends ../layouts/default
block content
if enquirySubmitted
.jumbotron.text-center
h1 Success!
if user
p Head over to the Admin UI to see your enquiry:
a(href='/keystone/enquiries').btn.btn-lg.btn-primary Admin UI
else
p(style="margin-left: 10vw; margin-right: 10vw;") To see your enquiry, sign in with the username
code demo@keystonejs.com
| and the password
code demo
| then go to the enquiries list.
a(href='/keystone/signin').btn.btn-lg.btn-primary Sign In
else
.page-header
a(href='/keystone/enquiries').btn.btn-default.pull-right= user ? 'View Enquiries' : 'Sign in to View Enquiries'
h1 Contact
.row
.col-sm-8
form(method='post').form-horizontal
input(type='hidden', name='action', value='contact')
.form-group(class=validationErrors.name ? 'has-error' : null)
label.col-sm-2.text-left.control-label Name
.col-sm-10
input(type='text' name='name.full' value=formData['name.full'] required placeholder="First Last").form-control
.form-group(class=validationErrors.email ? 'has-error' : null)
label.col-sm-2.control-label Email
.col-sm-10
input(type='email' name='email' value=formData.email required placeholder="name@domain.com").form-control
.form-group
label.col-sm-2.control-label Phone
.col-sm-10
input(type='text' name='phone' value=formData.phone placeholder='(optional)').form-control
.form-group(class=validationErrors.enquiryType ? 'has-error' : null required)
label.col-sm-2.control-label Regarding
.col-sm-10
select(name='enquiryType').form-control
option(value='') (required)
each type in enquiryTypes
option(value=type.value selected=formData.enquiryType === type.value)= type.label
.form-group(class=validationErrors.message ? 'has-error' : null)
label.col-sm-2.control-label Message
.col-sm-10
textarea(name='message' placeholder='Leave us a message...' rows=4 required).form-control= formData.message
.form-group
.col-sm-10.col-sm-offset-2
p.help-block Note: others can see your enquiry in the <a href='/keystone/enquiries'>Admin UI</a>
button(type='submit').btn.btn-primary Submit
.col-sm-4
.panel.panel-default
.panel-heading
h3.panel-title Resources
.panel-body Well that's it for the demo, but you can find out more from these links:
.list-group
a(href='http://github.com/KeystoneJS/keystone-demo', target='_blank').list-group-item GitHub Repo
a(href='https://v4.keystonejs.com/getting-started', target='_blank').list-group-item Documentation
a(href='http://community.keystonejs.com', target='_blank').list-group-item KeystoneJS Community Slack