Skip to content

Commit 8dc7589

Browse files
committed
Test existence of autofocus-var
1 parent adbfee3 commit 8dc7589

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/consentform.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
{% endif %}
2020

2121
<input type="hidden" name="StateId" value="{{ stateId }}" />
22-
<button type="submit" name="yes" class="btn" id="yesbutton"{%- if autofocus == 'yesbutton' %} autofocus{% endif -%}>{{ '{consent:consent:yes}'|trans }}</button>
22+
<button type="submit" name="yes" class="btn" id="yesbutton"{%- if autofocus is defined and autofocus == 'yesbutton' %} autofocus{% endif -%}>{{ '{consent:consent:yes}'|trans }}</button>
2323
</form>
2424

2525
<form id="consent_no" action="{{ noTarget }}">
2626
<input type="hidden" name="StateId" value="{{ stateId }}" />
27-
<button type="submit" class="btn" name="no" id="nobutton"{%- if autofocus == 'nobutton' %} autofocus{% endif -%}>{{ '{consent:consent:no}'|trans }}</button>
27+
<button type="submit" class="btn" name="no" id="nobutton"{%- if autofocus is defined and autofocus == 'nobutton' %} autofocus{% endif -%}>{{ '{consent:consent:no}'|trans }}</button>
2828
</form>
2929

3030
{% if sppp != false %}

0 commit comments

Comments
 (0)