Skip to content

Commit

Permalink
Added select box to event view
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciaan committed Jun 5, 2017
1 parent 64eb841 commit 4235b99
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/application/_form_collection_select.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%# To pass options to the collection_select, add {options} as the last argument %>
<div class="form-group">
<%= f.label args.first %>:
<%= f.collection_select *args, {class: 'form-control'} %>
<%= f.collection_select *args, {class: 'form-control select'} %>
</div>
18 changes: 14 additions & 4 deletions app/views/registrations/_basic.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@
<% if @registration.event.can_add_club%>
<p><%= t('event.registration.club.info')%></p>
<%= form_collection_select f, :club_id, Club.ordered_clubs, :id, :name %>
<%= stylesheet_link_tag '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css' %>
<%= stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/select2-bootstrap-css/1.4.6/select2-bootstrap.min.css' %>
<%= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js' %>
<%= javascript_tag do %>
$('#registration_club_id').select2({
'sorter': function(results) {
return results.sort();
}
});
<% end %>
<%end%>
<%= f.submit t('event.register', default: 'Register'), class: 'btn btn-group btn-primary' %>
<%= f.submit t('event.register', default: 'Register'), class: 'btn btn-primary' %>
<% end %>

<!--<div class="well well-sm">
Payments can only be done by bank transfer, <strong>not by credit card</strong>.
</div>-->
<div class="well well-sm">
<%= raw t('event.payments') %>
</div>

</div>

Expand Down
3 changes: 3 additions & 0 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ nl:
phone_number: Telefoonnummer
register: Registreer
title: Aanspreking
firstname: Voornaam
lastname: Achternaam
has_plus_one: Vergezeld door partner?
plus_one_title: Partner aanspreking
plus_one_firstname: Partner voornaam
Expand Down Expand Up @@ -44,6 +46,7 @@ nl:
registration:
club:
info: Tim schrijft hier een mini tekstje voor!
payments: Betalingen kunnen enkel via bank overschrijvingen gebeuren, <strong>niet via bankkaarten</strong>.
flash:
succes: Registratie succesvol. Uw ticket zou nu in uw mailbox toegekomen moeten zijn.
forms:
Expand Down

0 comments on commit 4235b99

Please sign in to comment.