forked from rubyforgood/casa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rubyforgood#5777] Solve bug around validation when navigating backwards
- Loading branch information
1 parent
07a5b1b
commit f627948
Showing
7 changed files
with
23 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
<div> | ||
<%# Back navigation %> | ||
<%= button_tag type: @submit_back ? "submit" : "button", class: "btn btn-link", title: "Back step", aria: { label: "Back step" } do %> | ||
<% if @submit_back %> | ||
<%= button_tag type: @submit_back ? :submit : :button, | ||
name: :nav_step, | ||
value: @nav_back, | ||
class: "btn btn-link", | ||
title: "Back step", | ||
aria: { label: "Back step" }, | ||
disabled: !@nav_back do %> | ||
<%= link_to @nav_back, title: "Back step", aria: { label: "Back step" } do %> | ||
<i class="lni lni-chevron-left", alt: "Chevron icon left"></i> | ||
<% else %> | ||
<%= link_to @nav_back, title: "Back step", aria: { label: "Back step" } do %> | ||
<i class="lni lni-chevron-left", alt: "Chevron icon left"></i> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<%# Next navigation %> | ||
<%= button_tag type: @submit_next ? "submit" : "button", class: "btn btn-link", title: "Next step", aria: { label: "Next step" } do %> | ||
<% if @submit_next %> | ||
<%= button_tag type: @submit_next ? :submit : :button, | ||
name: :nav_step, | ||
value: @nav_forward, | ||
class: "btn btn-link", | ||
title: "Next step", | ||
aria: { label: "Next step" }, | ||
disabled: !@nav_next do %> | ||
<%= link_to @nav_next, title: "Next step", aria: { label: "Next step" } do %> | ||
<i class="lni lni-chevron-right", alt: "Chevron icon right"></i> | ||
<% else %> | ||
<%= link_to @nav_next, title: "Next step", aria: { label: "Next step" } do %> | ||
<i class="lni lni-chevron-right", alt: "Chevron icon right"></i> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</div> |
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
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