-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsurvey-app.html
89 lines (83 loc) · 2.49 KB
/
survey-app.html
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<head>
<title>survey-app</title>
</head>
<body>
<nav class="navbar navbar-default">
<ol class="breadcrumb">
<li><h2><a class="homeLink" href="#">Survey App</a></h2></li>
<li><a href="#">About</a></li>
<li> {{> loginButtons }} </li>
{{#if currentUser}}
<li><a class="profileLink" href="#">Profile</a></li>
<li>Score {{score}}</li>
{{/if}}
</ol>
</nav>
{{#if currentUser}}
{{#if isHomeState}}
{{#each questions}}
{{> question}}
{{/each}}
{{/if}}
{{#if isProfileState}}
{{> profile }}
{{/if}}
{{else}}
{{> register}}
{{/if}}
</body>
<template name="register">
<div class = "well">
<h1 class="text-center">Welcome to Survey Tools!</h1><br>
<h2 class = "text-center">Registration Form</h2><br>
<form class= "form-horizontal">
<div class = "form-group">
<div class = "col-sm-10">
<input class = "form-control" type="email" id="register-email" placeholder="Please enter email">
</div>
</div>
<div class = "form-group">
<div class = "col-sm-10">
<input class = "form-control" type="text" id="register-uName" placeholder="Please enter your username">
</div>
</div>
<div class = "form-group">
<div class = "col-sm-10">
<input class = "form-control" type="password" id="register-password" placeholder="Please enter password">
</div>
</div>
<div class = "form-group">
<div class = "col-sm-10">
<input class = "form-control" type="password" id="password-confirm" placeholder="Confirm password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input class="btn btn-primary" id="button" type="submit" value="Register">
</div>
</div>
</form>
</div>
</template>
<template name="profile">
<div class="well">
<h2>{{fname}} {{lname}}'s Profile</h2>
<form id="profileForm" class="form-horizontal">
<input type="email" name="email" placeholder="email"/><br/>
<input type="password" name="pass" placeholder="password"/><br/>
<input type="password" name="passConfirm" placeholder="confirm password"/><br/>
<input type="text" name="first" placeholder="First Name"/><br/>
<input type="text" name="last" placeholder="Last Name"/><br/>
<input type="submit" class="btn btn-primary" value="Submit Changes"/>
</form>
</div>
</template>
<template name="question">
<div class="well">
<p>{{question}}</p>
<form class="form-horizontal">
<input class="answer" type="text"/>
<input type="submit" value="Answer"/>
</form>
</div>
</template>