parent
29d3775f8c
commit
b6c294c5bd
@ -1,3 +0,0 @@ |
||||
* The qmgr needs to actually manage the queue, currently it's just a little testing tool. |
||||
* Probably also need an email testing tool that can send sample emails off the cli. |
||||
* Try to remove code.js and either bring the functionality to jzed.js or not use it. |
||||
@ -1,30 +1,64 @@ |
||||
<h1>Sample Survey</h1> |
||||
<script> |
||||
const Survey = { |
||||
"Title": "Sample Survey", |
||||
"Description": "The description.", |
||||
"Questions": [ |
||||
{ |
||||
"Id": 1, |
||||
"Question": "Do you like HTML?" |
||||
}, |
||||
{ |
||||
"Id": 2, |
||||
"Question": "Do you like CSS?" |
||||
}, |
||||
{ |
||||
"Id": 3, |
||||
"Question": "Do you like JavaScript?" |
||||
}, |
||||
{ |
||||
"Id": 4, |
||||
"Question": "Are you a programmer?" |
||||
}, |
||||
] |
||||
}; |
||||
|
||||
<p>Solarpunk moka pot ceramics jean shorts. Cold-pressed fashion axe normcore four tet bandcamp ascot dad shoes bitters try-hard. Brooklyn slugging marxism XOXO gorpcore granny square humblebrag live-edge, fitzcarraldo mercury retrograde sound bath kickstarter van life freegan. Tilde tacos mlkshk bell hooks. Selvage deep v jawn, akerman breathwork direct trade etsy blackbird spyplane danish modern woke.</p> |
||||
$boot(async () => { |
||||
const items = Survey.Questions; |
||||
const list = $id('question-list'); |
||||
const tmpl = $id('question-row'); |
||||
|
||||
<form> |
||||
<grid style="font-size: 1.1em; grid-template-columns: 1fr 60px; gap: 10px;"> |
||||
<label for="q1">Question 1: Do you like HTML?</label> |
||||
<input id="q1" type="checkbox" /> |
||||
for(let i in items) { |
||||
$append(list, $render(tmpl, {i, item: items[i]})); |
||||
} |
||||
}); |
||||
|
||||
<label for="q2">Tilde tacos mlkshk bell hooks. Selvage deep v jawn, akerman breathwork direct trade etsy blackbird spyplane danish modern woke.</label> |
||||
<input id="q2" type="checkbox" /> |
||||
const resetForm = () => { |
||||
$id('survey-form').reset(); |
||||
} |
||||
</script> |
||||
|
||||
<label for="q3">Question 1: Do you like HTML?</label> |
||||
<input id="q3" type="checkbox" /> |
||||
<style> |
||||
#question-list { |
||||
font-size: 1.1em; |
||||
grid-template-columns: 1fr 60px; |
||||
gap: 10px; |
||||
} |
||||
</style> |
||||
|
||||
<label for="q4">Question 1: Do you like HTML?</label> |
||||
<input id="q4" type="checkbox" /> |
||||
<h1>Sample Survey</h1> |
||||
|
||||
<label for="q5">Question 1: Do you like HTML?</label> |
||||
<input id="q5" type="checkbox" /> |
||||
<p>Solarpunk moka pot ceramics jean shorts. Cold-pressed fashion axe normcore four tet bandcamp ascot dad shoes bitters try-hard. Brooklyn slugging marxism XOXO gorpcore granny square humblebrag live-edge, fitzcarraldo mercury retrograde sound bath kickstarter van life freegan. Tilde tacos mlkshk bell hooks. Selvage deep v jawn, akerman breathwork direct trade etsy blackbird spyplane danish modern woke.</p> |
||||
|
||||
<label for="q6">Question 1: Do you like HTML?</label> |
||||
<input id="q6" type="checkbox" /> |
||||
<form id="survey-form" action="/survey/submit"> |
||||
<grid id="question-list"> |
||||
<template id="question-row"> |
||||
<label for="question-${item.Id}">${item.Question}</label> |
||||
<input id="question-${item.Id}" type="checkbox" /> |
||||
</template> |
||||
</grid> |
||||
|
||||
<button-group> |
||||
<button type="button">Reset</button> |
||||
<button type="button"><a href="/survey/submit">Submit</a></button> |
||||
<button type="button" onClick="resetForm()">Reset</button> |
||||
<button type="submit">Submit</button> |
||||
</button-group> |
||||
</form> |
||||
|
||||
@ -1,28 +1,65 @@ |
||||
<h1>Verify Your Answers</h1> |
||||
|
||||
<p>Please verify your answers are what you would like to say on this survey.</p> |
||||
<script> |
||||
const Survey = { |
||||
"Title": "Sample Survey", |
||||
"Description": "The description.", |
||||
"Questions": [ |
||||
{ |
||||
"Id": 1, |
||||
"Question": "Do you like HTML?", |
||||
"Answer": true, |
||||
}, |
||||
{ |
||||
"Id": 2, |
||||
"Question": "Do you like CSS?", |
||||
"Answer": true |
||||
}, |
||||
{ |
||||
"Id": 3, |
||||
"Question": "Do you like JavaScript?", |
||||
"Answer": true |
||||
}, |
||||
{ |
||||
"Id": 4, |
||||
"Question": "Are you a programmer?", |
||||
"Answer": true |
||||
}, |
||||
] |
||||
}; |
||||
|
||||
<grid style="font-size: 1.1em; grid-template-columns: 1fr 60px; gap: 10px;"> |
||||
<label for="q1">Question 1: Do you like HTML?</label> |
||||
<span>YES</span> |
||||
$boot(async () => { |
||||
const items = Survey.Questions; |
||||
const list = $id('question-list'); |
||||
const tmpl = $id('question-row'); |
||||
|
||||
<label for="q2">Tilde tacos mlkshk bell hooks. Selvage deep v jawn, akerman breathwork direct trade etsy blackbird spyplane danish modern woke.</label> |
||||
<span>YES</span> |
||||
for(let i in items) { |
||||
const question = items[i]; |
||||
question.Result = question.Answer ? "YES" : "NO"; |
||||
$append(list, $render(tmpl, {i, item: question})); |
||||
} |
||||
}); |
||||
</script> |
||||
|
||||
<label for="q3">Question 1: Do you like HTML?</label> |
||||
<span>YES</span> |
||||
<style> |
||||
#question-list { |
||||
font-size: 1.1em; |
||||
grid-template-columns: 1fr 60px; |
||||
gap: 10px; |
||||
} |
||||
</style> |
||||
|
||||
<label for="q4">Question 1: Do you like HTML?</label> |
||||
<span>NO</span> |
||||
<h1>Verify Your Answers</h1> |
||||
|
||||
<label for="q5">Question 1: Do you like HTML?</label> |
||||
<span>YES</span> |
||||
<p>Please verify your answers are what you would like to say on this survey.</p> |
||||
|
||||
<label for="q6">Question 1: Do you like HTML?</label> |
||||
<span>YES</span> |
||||
<grid id="question-list"> |
||||
<template id="question-row"> |
||||
<label for="${item.Id}">${item.Question}</label> |
||||
<span>${item.Result}</span> |
||||
</template> |
||||
</grid> |
||||
|
||||
<button-group> |
||||
<button type="button"><a href="/survey/">Change My Answers</a></button> |
||||
<button type="button"><a href="/survey/finalize">Submit My Answers</a></button> |
||||
<a href="/survey/"><button type="button">Change My Answers</button></a> |
||||
<a href="/survey/finalize"><button type="button">Submit My Answers</button></a> |
||||
</button-group> |
||||
|
||||
|
||||
Loading…
Reference in new issue