Skip to content

Commit

Permalink
Merge pull request #610 from open-formulieren/of-task/3651-change-opt…
Browse files Browse the repository at this point in the history
…ional-field-label

[OF#3651] Change "optional" field label to "not required"
  • Loading branch information
sergei-maertens authored Dec 8, 2023
2 parents 0ba181e + 1d9435f commit d546ae9
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 77 deletions.
2 changes: 1 addition & 1 deletion src/components/forms/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const LabelContent = ({id, disabled = false, isRequired = false, type, ch
>
<FormattedMessage
description="Form field label, field possibly optional"
defaultMessage="{withAsterisk, select, true {<label></label>} other {<label></label> (optional)}}"
defaultMessage="{withAsterisk, select, true {<label></label>} other {<label></label> (not required)}}"
values={{
withAsterisk: requiredFieldsWithAsterisk,
label: () => children,
Expand Down
2 changes: 1 addition & 1 deletion src/formio/templates/checkbox.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
for="{{ctx.instance.id}}-{{ctx.component.key}}"
class="utrecht-form-label utrecht-form-label--checkbox {% if (ctx.disabled) { %}utrecht-form-label--disabled{% } %} {{ctx.input.labelClass}} {% if (ctx.component.validate.required && ctx.requiredFieldsWithAsterisk) { %}utrecht-form-label--openforms-required{% } %}"
>
{{ctx.input.label}}{% if (!ctx.component.validate.required && !ctx.requiredFieldsWithAsterisk) { %}&nbsp;{{ ctx.t('(optional)') }} {% } %}
{{ctx.input.label}}{% if (!ctx.component.validate.required && !ctx.requiredFieldsWithAsterisk) { %}&nbsp;{{ ctx.t('(not required)') }} {% } %}
{% if (ctx.component.tooltip) { %}
<i ref="tooltip" class="openforms-tooltip-icon {{ctx.iconClass('question-sign')}}" data-tooltip="{{ ctx.tooltip }}"></i>
{% } %}
Expand Down
2 changes: 1 addition & 1 deletion src/formio/templates/label.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
{{ ctx.t(ctx.component.label, { _userInput: true }) }}
{% if (!ctx.component.validate.required && !ctx.requiredFieldsWithAsterisk) { %}
{{ ctx.t('(optional)') }}
{{ ctx.t('(not required)') }}
{% } %}
{% if (ctx.component.tooltip) { %}
<i ref="tooltip" class="openforms-tooltip-icon {{ctx.iconClass('question-sign')}}" data-tooltip="{{ ctx.tooltip }}"></i>
Expand Down
64 changes: 32 additions & 32 deletions src/i18n/compiled/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1687,38 +1687,6 @@
"value": "Log in to co-sign the form"
}
],
"qf2UCG": [
{
"options": {
"other": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
},
{
"type": 0,
"value": " (optional)"
}
]
},
"true": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
}
]
}
},
"type": 5,
"value": "withAsterisk"
}
],
"r1L6Zj": [
{
"type": 0,
Expand Down Expand Up @@ -1903,6 +1871,38 @@
"value": "Co-sign confirmation"
}
],
"yXbqL6": [
{
"options": {
"other": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
},
{
"type": 0,
"value": " (not required)"
}
]
},
"true": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
}
]
}
},
"type": 5,
"value": "withAsterisk"
}
],
"zQWnFh": [
{
"type": 0,
Expand Down
64 changes: 32 additions & 32 deletions src/i18n/compiled/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1691,38 +1691,6 @@
"value": "Log in om het formulier mede te ondertekenen"
}
],
"qf2UCG": [
{
"options": {
"other": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
},
{
"type": 0,
"value": " (optioneel)"
}
]
},
"true": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
}
]
}
},
"type": 5,
"value": "withAsterisk"
}
],
"r1L6Zj": [
{
"type": 0,
Expand Down Expand Up @@ -1907,6 +1875,38 @@
"value": "Bevestiging mede-ondertekening"
}
],
"yXbqL6": [
{
"options": {
"other": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
},
{
"type": 0,
"value": " (niet verplicht)"
}
]
},
"true": {
"value": [
{
"children": [
],
"type": 8,
"value": "label"
}
]
}
},
"type": 5,
"value": "withAsterisk"
}
],
"zQWnFh": [
{
"type": 0,
Expand Down
10 changes: 5 additions & 5 deletions src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,6 @@
"description": "Log in to co-sign the form title",
"originalDefault": "Log in to co-sign the form"
},
"qf2UCG": {
"defaultMessage": "{withAsterisk, select, true {<label></label>} other {<label></label> (optional)}}",
"description": "Form field label, field possibly optional",
"originalDefault": "{withAsterisk, select, true {<label></label>} other {<label></label> (optional)}}"
},
"r1L6Zj": {
"defaultMessage": "Suspending the form failed, please try again later",
"description": "Modal suspending form failed message",
Expand Down Expand Up @@ -849,6 +844,11 @@
"description": "On succesful completion title",
"originalDefault": "Co-sign confirmation"
},
"yXbqL6": {
"defaultMessage": "{withAsterisk, select, true {<label></label>} other {<label></label> (not required)}}",
"description": "Form field label, field possibly optional",
"originalDefault": "{withAsterisk, select, true {<label></label>} other {<label></label> (not required)}}"
},
"zQWnFh": {
"defaultMessage": "Are you sure that you want to logout and not co-sign the current form submission?",
"description": "log out confirmation prompt on co-sign page",
Expand Down
10 changes: 5 additions & 5 deletions src/i18n/messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,6 @@
"description": "Log in to co-sign the form title",
"originalDefault": "Log in to co-sign the form"
},
"qf2UCG": {
"defaultMessage": "{withAsterisk, select, true {<label></label>} other {<label></label> (optioneel)}}",
"description": "Form field label, field possibly optional",
"originalDefault": "{withAsterisk, select, true {<label></label>} other {<label></label> (optional)}}"
},
"r1L6Zj": {
"defaultMessage": "Het pauzeren van het formulier is mislukt. Probeer het later opnieuw.",
"description": "Modal suspending form failed message",
Expand Down Expand Up @@ -859,6 +854,11 @@
"description": "On succesful completion title",
"originalDefault": "Co-sign confirmation"
},
"yXbqL6": {
"defaultMessage": "{withAsterisk, select, true {<label></label>} other {<label></label> (niet verplicht)}}",
"description": "Form field label, field possibly optional",
"originalDefault": "{withAsterisk, select, true {<label></label>} other {<label></label> (not required)}}"
},
"zQWnFh": {
"defaultMessage": "Bent u zeker dat u wilt uitloggen en hiermee de inzending niet mede-ondertekent?",
"description": "log out confirmation prompt on co-sign page",
Expand Down

0 comments on commit d546ae9

Please sign in to comment.