Skip to content

Commit

Permalink
FIX fieldset without a legend shouldn't be a fieldset
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Springveldt committed Jul 13, 2017
1 parent 17fe85b commit c98fa0b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
19 changes: 11 additions & 8 deletions templates/Includes/UserForm.ss
@@ -1,5 +1,5 @@
<form $AttributesHTML>

<% include UserFormProgress %>
<% include UserFormStepErrors %>

Expand All @@ -9,13 +9,16 @@
<p id="{$FormName}_error" class="message $MessageType" aria-hidden="true" style="display: none;"></p>
<% end_if %>

<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
<% if $Legend %>
<fieldset>
<legend>$Legend</legend>
<% include UserFormFields %>
</fieldset>
<% else %>
<div class="userform-fields">
<% include UserFormFields %>
</div>
<% end_if %>

<% if $Steps.Count > 1 %>
<% include UserFormStepNav %>
Expand Down
5 changes: 5 additions & 0 deletions templates/Includes/UserFormFields.ss
@@ -0,0 +1,5 @@
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>

10 changes: 4 additions & 6 deletions templates/Includes/UserFormStepErrors.ss
@@ -1,8 +1,6 @@
<% if $Steps.Count > 1 %>
<fieldset class="error-container form-wide-errors" aria-hidden="true" style="display: none;">
<div>
<h4></h4>
<ul class="error-list"></ul>
</div>
</fieldset>
<div class="error-container form-wide-errors" aria-hidden="true" style="display: none;">
<h4></h4>
<ul class="error-list"></ul>
</div>
<% end_if %>
8 changes: 4 additions & 4 deletions templates/forms/UserFormsStepField.ss
@@ -1,15 +1,15 @@
<fieldset id="$Name" class="form-step $extraClass" data-title="$Title">
<div id="$Name" class="form-step $extraClass" data-title="$Title">
<% if $Form.DisplayErrorMessagesAtTop %>
<fieldset class="error-container" aria-hidden="true" style="display: none;">
<div class="error-container" aria-hidden="true" style="display: none;">
<div>
<h4></h4>
<ul class="error-list"></ul>
</div>
</fieldset>
</div>
<% end_if %>

<% loop $Children %>
$FieldHolder
<% end_loop %>

</fieldset>
</div>

0 comments on commit c98fa0b

Please sign in to comment.