Skip to content
Snippets Groups Projects
Commit ac21a021 authored by Jeff Sturek's avatar Jeff Sturek
Browse files

Implement DCF Notices

parent 3a46239c
No related branches found
No related tags found
1 merge request!24Implement DCF Notices
This commit is part of merge request !24. Comments created here will be created in the context of that merge request.
...@@ -131,26 +131,21 @@ ...@@ -131,26 +131,21 @@
<% unless session["notice"].nil? %> <% unless session["notice"].nil? %>
<% notices = session.delete("notice") %> <% notices = session.delete("notice") %>
<% notices.each do |notice| %> <% notices.each do |notice| %>
<% notice_class = '' %> <% notice_class = 'dcf-notice-info' %>
<% case notice[:type] <% case notice[:type]
when 'success', :success when 'success', :success
notice_class = 'affirm' notice_class = 'dcf-notice-success'
when 'failure', :failure when 'failure', :failure
notice_class = 'negate' notice_class = 'dcf-notice-warning'
when 'alert', 'danger', 'error', :error, :alert, :danger when 'alert', 'danger', 'error', :error, :alert, :danger
notice_class = 'alert' %> notice_class = 'dcf-notice-warning' %>
<% end %> <% end %>
<div id="notice" class="wdn_notice <%= notice_class %>"> <div id="notice" class="dcf-notice <%= notice_class %>" hidden>
<div class="close"> <h2><%= notice[:header] %></h2>
<a href="#" title="Close this notice">Close this notice</a>
</div>
<div class="message">
<h4><%= notice[:header] %></h4>
<div class="message-content"> <div class="message-content">
<%= notice[:message] %> <%= notice[:message] %>
</div> </div>
</div> </div>
</div>
<% end %> <% end %>
<% else %> <% else %>
<% session.delete(:notice) %> <% session.delete(:notice) %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment