-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Your household interview led - User journey built to the household su…
…mmary page
- Loading branch information
Showing
15 changed files
with
1,152 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
_prototypes/your-household-interview-led/does-anyone-else-live-here.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
title: Census Coverage Survey | ||
project: your-household | ||
globalcss: false | ||
layout: eq-default-extras | ||
cdn: v1.8.4 | ||
hideSaveLater: true | ||
footer: minimal | ||
--- | ||
|
||
<link rel="stylesheet" href="../style.css"/> | ||
<div class="page__subheader"> | ||
<div class="container"> | ||
<a class="js-previous-link mars" href="../do-you-live-here">Previous</a> | ||
</div> | ||
</div> | ||
|
||
<div class="page__container container"> | ||
<div class="grid grid--reverse"> | ||
<div class="grid__col col-4@m"> | ||
{% include navigation.html | ||
title="Your household" | ||
items=site.data.your-household-interview-led.navigationItemsHousehold | ||
%} | ||
</div> | ||
<div class="grid__col col-7@m pull-1@m"> | ||
<main role="main" id="main" class="page__main"> | ||
<form id="form" name="trav" class="form qa-questionnaire-form" | ||
role="form" autocomplete="off" novalidate=""> | ||
<input type="hidden" name="previous" | ||
value="does-anyone-else-live-here"/> | ||
<div class="group" id="rsi"> | ||
<div class="block" id="total-retail-turnover"> | ||
<section class="section"> | ||
<div class="question u-mb-s"> | ||
<h1 id="question-title" | ||
class="question__title saturn"> | ||
Does anybody else live at <span | ||
class="address-text"></span>? | ||
</h1> | ||
</div> | ||
|
||
<div id="member-list"></div> | ||
|
||
<div class="answer__fields js-fields"> | ||
<div class="field field--radio field--multiplechoice "> | ||
<fieldset class="u-mb-xl"> | ||
<div class="field__item js-focusable-box"> | ||
<input class="input input--radio js-focusable" | ||
type="radio" | ||
name="does-anyone-else-live-here" | ||
id="yes-someone-else" | ||
value="yes"> | ||
<label class="label label--inline venus" | ||
for="yes-someone-else" | ||
id="yes-someone-else-label"> | ||
<span | ||
class="yes-answer">Yes, I need to | ||
add | ||
another person</span> | ||
<span | ||
class="pluto u-db label--negative">Include partners, children, babies born on or before 19th August 2018, housemates, tenants and lodgers, students and schoolchildren who live away from home during term time</span> | ||
</label> | ||
</div> | ||
|
||
<div class="field__item js-focusable-box"> | ||
<input class="input input--radio js-focusable" | ||
type="radio" | ||
name="does-anyone-else-live-here" | ||
id="no" value="no"> | ||
<label class="label label--inline venus" | ||
for="no">No, this is | ||
everyone</label> | ||
</div> | ||
</fieldset> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
<button class="btn btn--primary btn--lg qa-btn-submit venus" | ||
type="submit" name="">Save and continue | ||
</button> | ||
</form> | ||
</main> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src='/js/compiled/your-household-interview-led/bundle.js'></script> | ||
|
||
<script> | ||
var yesbox = document.getElementById("yes-someone-else"), | ||
storageAPI = window.ONS.storage; | ||
$('.qa-btn-submit').click(function(e) { | ||
|
||
/** | ||
* Routing | ||
*/ | ||
if (!yesbox.checked) { | ||
if (window.location.search.match(/journey=visitors/)) { | ||
document.trav.action = "../summary"; | ||
} | ||
else { | ||
document.trav.action = "../temp-types-living-away"; | ||
} | ||
|
||
} else { | ||
document.trav.action = "../who-else-to-add"; | ||
} | ||
}); | ||
|
||
$(function() { | ||
var addressLines = (sessionStorage.getItem('address') || '').split(','), | ||
addressLine1 = addressLines[0], | ||
addressLine2 = addressLines[1], | ||
householdMembers = storageAPI | ||
.getAllHouseholdMembers().filter(storageAPI.isHouseholdMember), | ||
nextPosition = householdMembers.length + 1; | ||
|
||
if (window.location.search.match(/journey=visitors/)) { | ||
$('#form') | ||
.prepend('<input type="hidden" name="journey" value="visitors" />'); | ||
$('#question-title') | ||
.html('Was there anyone else staying on ' + window.ONS.utils.getSignificant() + ' ' + | ||
addressLine1 + | ||
', ' + addressLine2 + '?'); | ||
$('#member-list').html('<ul id="visitors-list"></ul>'); | ||
$('#yes-someone-else-label').html('Yes, I need to add another visitor'); | ||
window.ONS.helpers.populateVisitorList(); | ||
} | ||
else { | ||
$('#member-list').html('<ul id="household-members"></ul>'); | ||
window.ONS.helpers.populateHouseholdList(); | ||
} | ||
|
||
if ((nextPosition) > 1) { | ||
$('.yes-answer').html( | ||
'Yes, I need to add a ' + | ||
window.ONS.utils.numberToPositionWord(nextPosition) + | ||
' person' | ||
); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
_prototypes/your-household-interview-led/is-anyone-related.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
title: Census Coverage Survey | ||
project: your-household | ||
globalcss: false | ||
layout: eq-default-extras | ||
cdn: v1.8.4 | ||
hideSaveLater: true | ||
footer: minimal | ||
--- | ||
|
||
<link rel="stylesheet" href="../style.css"/> | ||
<div class="page__subheader"> | ||
<div class="container"> | ||
<a class="js-previous-link mars" | ||
href="../does-anyone-else-live-here">Previous</a> | ||
</div> | ||
</div> | ||
|
||
<div class="page__container container"> | ||
<div class="grid grid--reverse"> | ||
<div class="grid__col col-4@m"> | ||
{% include navigation.html | ||
title="Your household" | ||
items=site.data.your-household-interview-led.navigationItemsHousehold | ||
%} | ||
</div> | ||
<div class="grid__col col-7@m pull-1@m"> | ||
<main role="main" id="main" class="page__main"> | ||
<form name="trav" class="form qa-questionnaire-form" role="form" | ||
autocomplete="off" novalidate=""> | ||
<input type="hidden" name="away-journeys" | ||
value=""/> | ||
<div class="group"> | ||
<div class="block"> | ||
<section class="section"> | ||
<div class="question u-mb-s" | ||
id="total-retail-turnover-question"> | ||
<h1 class="question__title saturn js-heading"> | ||
Are any of these people related to | ||
each other? | ||
</h1> | ||
</div> | ||
|
||
<ul id="household-members" class="u-mb-l"></ul> | ||
|
||
<div class="answer__fields js-fields"> | ||
<div class="field field--radio field--multiplechoice "> | ||
<fieldset class="u-mb-xl"> | ||
<div class="field__item js-focusable-box"> | ||
<input class="input input--radio js-focusable" | ||
type="radio" | ||
name="is-this-everyone" | ||
id="yes-someone-else" | ||
value="yes"> | ||
<label class="label label--inline venus" | ||
for="yes-someone-else" | ||
id="yes-someone-else-label">Yes, some or all are related | ||
</label> | ||
</div> | ||
|
||
<div class="field__item js-focusable-box"> | ||
<input class="input input--radio js-focusable" | ||
type="radio" | ||
name="is-this-everyone" | ||
id="no" value="no"> | ||
<label class="label label--inline venus" | ||
for="no">No, all | ||
household members | ||
are unrelated</label> | ||
</div> | ||
</fieldset> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
<button class="btn btn--primary btn--lg qa-btn-submit venus" | ||
type="submit" name="">Save and continue | ||
</button> | ||
</form> | ||
</main> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src='/js/compiled/your-household-interview-led/bundle.js'></script> | ||
|
||
<div style="display:none"> | ||
<div id="question-list-item-template" class="field__item js-focusable-box"> | ||
<input class="input input--checkbox js-focusable js-exclusive-checkbox-group js-answer-field" name="away-type" value="" id="" type="checkbox" /> | ||
<label class="label label--inline venus js-answer-label"></label> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
$('.qa-btn-submit').on('click', function (e) { | ||
e.preventDefault(); | ||
window.location.href = '../visitors'; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.