Skip to content

Commit

Permalink
Significant Copy Update
Browse files Browse the repository at this point in the history
Major changes to the en.json file and questions-1 page to reflect changes in the copy from the working group - changes to agreement page tbc
  • Loading branch information
Gorpalicious committed Jul 22, 2020
1 parent 369774d commit 350525a
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 236 deletions.
202 changes: 93 additions & 109 deletions locales/en.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@
"request": "^2.88.2"
},
"devDependencies": {
"commander": "^3.0.2",
"commander": "^5.0.0",
"acorn": "^7.1.1",
"cheerio": "^1.0.0-rc.3",
"commander": "^5.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-standard": "^14.1.1",
Expand Down
1 change: 1 addition & 0 deletions public/js/toggle-area.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function toggleArea(event) {
}
if ((toggleState.indexOf('on') >= 0) & (checked == true)) {
target.style.display = 'block'
target.style.marginTop = '0px'
} else {
target.style.display = 'none'
}
Expand Down
239 changes: 119 additions & 120 deletions routes/questions-1/questions-1.njk

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions views/macros/checkboxes.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<fieldset class="fieldset">
<legend class="fieldset__legend">{{ __(question) }}</legend>
<div class="multiple-choice multiple-choice--checkboxes" id="{{ key }}">

{% if attributes.hint %}
<span class="form-message">{{ __(attributes.hint) }}</span>
{% endif %}

{% if errors and errors[key] %}
{{ validationMessage(errors[key].msg, key) }}
{% endif %}
Expand Down
30 changes: 30 additions & 0 deletions views/macros/double-input-text.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{#
- `name`: field name
- `label`: text for the label
- `attributes`: object of optional attributes: class, hint, divClasses, autocomplete
#}
{% if errors %}
{% set firstError = errors[errors.keys()[0]] %}
{% endif %}

{% macro textInput(name, label, attributes, interpolation={}) %}
<div style="margin-bottom:0px" class="{{ 'has-error' if errors and errors[name] }} {{ attributes.divClasses }}">

<label for="{{ name }}" id="{{ name }}__label">{{ __(label, interpolation) }}</label>

{% if attributes.hint %}
<span class="form-message">{{ __(attributes.hint) }}</span>
{% endif %}

{% if attributes.hint2 %}
<span style="margin-bottom: 0px" class="form-message">{{ __(attributes.hint2) }}</span>
{% endif %}

{% if errors and errors[name] %}
{{ validationMessage(errors[name].msg, name) }}
{% endif %}

<input style="margin-bottom:0px" class="{{ attributes.class if attributes.class else "w-3-4" }}" {% if attributes.autocomplete %}autocomplete="{{ attributes.autocomplete }}" {% endif %} type="text" id="{{ attributes.id if attributes.id else name }}" {% if errors and errors[name] %} aria-describedby="{{ name + '-error' }}" aria-invalid="true" {% endif %} {% if errors and firstError.param === name %} autofocus="true" {% endif %} name="{{ name }}" value="{{ data[name] }}"/>

</div>
{% endmacro %}
9 changes: 7 additions & 2 deletions views/macros/input-text.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
{% endif %}

{% macro textInput(name, label, attributes, interpolation={}) %}
<div class="{{ 'has-error' if errors and errors[name] }} {{ attributes.divClasses }}">
<div class="{{ 'has-error' if errors and errors[name] }} {{ attributes.divClasses }}">
<label for="{{ name }}" id="{{ name }}__label">{{ __(label, interpolation) }}</label>

{% if attributes.hint %}
<span class="form-message">{{ __(attributes.hint) }}</span>
{% endif %}

{% if errors and errors[name] %}
{{ validationMessage(errors[name].msg, name) }}
{% endif %}
<input class="{{ attributes.class if attributes.class else "w-3-4" }}" {% if attributes.autocomplete %}autocomplete="{{ attributes.autocomplete }}" {% endif %} type="text" id="{{ attributes.id if attributes.id else name }}" {% if errors and errors[name] %} aria-describedby="{{ name + '-error' }}" aria-invalid="true" {% endif %} {% if errors and firstError.param === name %} autofocus="true" {% endif %} name="{{ name }}" value="{{ data[name] }}"/>

<input class="{{ attributes.class if attributes.class else "w-3-4" }}" {% if attributes.autocomplete %}autocomplete="{{ attributes.autocomplete }}" {% endif %} type="text" id="{{ attributes.id if attributes.id else name }}" {% if errors and errors[name] %} aria-describedby="{{ name + '-error' }}" aria-invalid="true" {% endif %} {% if errors and firstError.param === name %} autofocus="true" {% endif %} name="{{ name }}" value="{{ data[name] }}" placeholder="{{ attributes.hint2 }}"/>

</div>
{% endmacro %}

0 comments on commit 350525a

Please sign in to comment.