-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add BS4 view to flash partial * updates flash partial for bs4, updates progress and bs4 layouts to render new flash * fix underscore on close button * close icon work * white space fix * map legacy alert type to bs4, update flash layout to work well with larger messages, accessibility updates * add success case, more whitespace cleanup * update alert-error to use correct border and add error icon * move container out of layout, update padding on header to match footer * update padding and margins on flash * simplify flash in progress layout now that we have flash in its own container * unrelated fix for failed validations, replace old alert style, add missing legacy style in BS4 flash style map, add new alert style, update flash margin, * adds @bs4 arguments for render_flash calls and restores horizontal status in bs4 layout * rename flash type helper method * update info step 1 banner (#3860) * adds warning option to DOB error, updates error_messages partial to handle error option and use new UI * remove left padding for list in alert * remove unneeded classes * remove padding style * updates classes for error banner to match mockups * move flash into content column for progress layout, remove mt class from flash to allow layouts to drive top margin
- Loading branch information
1 parent
be75a76
commit 0dff652
Showing
9 changed files
with
104 additions
and
28 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
<div class="row flash module"> | ||
<div class="alert alert-<%= type %>" style="width: 100%; margin-top: 0px !important;"> | ||
<div class="container"> | ||
<div class="col-xs-12" style="width: 100%; max-width: 1170px; margin: auto;"> | ||
<a class="close" data-dismiss="alert" href="#">×</a> | ||
<% if @bs4 %> | ||
<div class="container mb-0 px-0"> | ||
<div class="alert alert-<%= type %> d-flex flash" role="alert"> | ||
<div class="pl-1"> | ||
<div class="<%= type %>-icon icon" alt=<%= type %>> </div> | ||
</div> | ||
<div class="col my-1 mr-auto p-0 align-self-center"> | ||
<%= raw message %> | ||
</div> | ||
<a class="close-icon icon pr-1 align-self-start" alt="Close" href="#"> </a> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="row flash module"> | ||
<div class="alert alert-<%= type %>" style="width: 100%; margin-top: 0px !important;"> | ||
<div class="container"> | ||
<div class="col-xs-12" style="width: 100%; max-width: 1170px; margin: auto;"> | ||
<a class="close" data-dismiss="alert" href="#">×</a> | ||
<%= raw message %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
<% if object.errors.any? %> | ||
<div class="alert alert-danger"> | ||
<h4>You need to correct the following errors:</h4> | ||
<ul> | ||
<% object.errors.each do |attr, msg| %> | ||
<% if attr == :base %> | ||
<li><%= "#{msg}" %></li> | ||
<% else %> | ||
<% attr = (attr == :gender && EnrollRegistry.feature_enabled?(:gender_to_sex)) ? "sex" : attr %> | ||
<li><%= attr.to_s.titleize %>: <%= raw(msg) %></li> | ||
<% if @bs4 %> | ||
<% is_only_warning = object.errors.details.values.all? {|error_type| error_type.all? {|details| details[:level] == :warning}} %> | ||
<% type = is_only_warning ? "warning" : "severe" %> | ||
<div class="mt-2 mb-0 px-0"> | ||
<div class="alert alert-<%= type %> d-flex flash" role="alert"> | ||
<div class="pl-1"> | ||
<div class="<%= type %>-icon icon" alt=<%= type %>> </div> | ||
</div> | ||
<div class="mt-2 p-0 align-self-center"> | ||
<label class="weight-n">You need to correct the following errors:</label> | ||
<ul class="list-unstyled"> | ||
<% object.errors.each do |attr, msg| %> | ||
<% if attr == :base %> | ||
<li><%= "#{msg}" %></li> | ||
<% else %> | ||
<% attr = (attr == :gender && EnrollRegistry.feature_enabled?(:gender_to_sex)) ? "sex" : attr %> | ||
<li><%= attr.to_s.titleize %>: <%= raw(msg) %></li> | ||
<% end %> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="alert alert-danger"> | ||
<h4>You need to correct the following errors:</h4> | ||
<ul> | ||
<% object.errors.each do |attr, msg| %> | ||
<% if attr == :base %> | ||
<li><%= "#{msg}" %></li> | ||
<% else %> | ||
<% attr = (attr == :gender && EnrollRegistry.feature_enabled?(:gender_to_sex)) ? "sex" : attr %> | ||
<li><%= attr.to_s.titleize %>: <%= raw(msg) %></li> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<% end %> |
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