Skip to content

Commit

Permalink
Use same "presence" icons in form as on index page
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Aug 15, 2023
1 parent 5574692 commit 9179df9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ module ApplicationHelper
ICONS = {
started: { icon: 'fa-hourglass-half', message: 'This event has already started' },
expired: { icon: 'fa-hourglass-end', message: 'This event has finished' },
online: { icon: 'fa-desktop', message: 'This is an online event' },
onsite: { icon: 'fa-users', message: 'This is a physical event' },
hybrid: { icon: 'fa-camera', message: 'This is a hybrid event' },
scraped_today: { icon: 'fa-check-circle-o', message: 'This record was updated today' },
not_scraped_recently: { icon: 'fa-exclamation-circle', message: 'This record has not been updated since %SUB%' },
event: { icon: 'fa-calendar', message: 'This is a training event' },
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<div class="btn-group" data-toggle="buttons">
<% [:onsite, :hybrid, :online].each do |presence| %>
<% active = @event.send("#{presence}?") %>
<label class="btn btn-default <%= 'active' if active %>">
<label class="btn btn-lg btn-secondary <%= 'active' if active %>">
<%= f.radio_button 'online', presence, class: 'location', data: { role: 'online-switch' },
checked: active, autocomplete: 'off' %>
<%= icon_for(presence, :small) %> <%= t("activerecord.attributes.event.presence.#{presence}") %>
<i class="icon icon-lg <%= presence %>-event-icon"></i> <%= t("activerecord.attributes.event.presence.#{presence}") %>
</label>
<% end %>
</div>
Expand Down

0 comments on commit 9179df9

Please sign in to comment.