...
  View open merge request
......@@ -52,9 +52,8 @@
.col-xs-12.col-md-6
= f.input :nationality, as: :country, input_html: { tabindex: 9 }
= f.input :birth_year,
as: :select,
collection: Volunteer.year_collection,
include_blank: true, input_html: { tabindex: 10 }
as: :date_picker,
collection: Volunteer.year_collection
.col-xs-12.col-md-6
= f.input :additional_nationality, as: :country
= f.input :avatar, as: :file
......
......@@ -22,7 +22,7 @@
td = volunteer.contact.city
td = volunteer.contact.postal_code
td = volunteer.contact.primary_email
td = volunteer.birth_year.year if volunteer.birth_year?
td = l(volunteer.birth_year) if volunteer.birth_year?
td = volunteer.native_language&.language_name
td = render 'language_skills/show_inline',
language_skills: volunteer.foreign_languages
......
......@@ -40,7 +40,7 @@ tr id=(dom_id(volunteer))
td = volunteer.contact.city
td = volunteer.contact.postal_code
td = mail_to volunteer.contact.primary_email
td = volunteer.birth_year.year if volunteer.birth_year?
td = l(volunteer.birth_year) if volunteer.birth_year.present?
td.language-skill-index
- [volunteer.native_language, volunteer.foreign_languages].flatten.each do |language|
span= language.full_language_skills
......
......@@ -36,11 +36,11 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
cell_types = Array.new(header_row.size).map { :string }
cell_types[0] = :integer
cell_types[11] = :integer
cell_styles = Array.new(header_row.size).map { nil }
cell_styles[6] = postal_code
@volunteers.each do |volunteer|
contact = volunteer.contact
birth_year = l(volunteer.birth_year) if volunteer.birth_year.present?
sheet.add_row [
volunteer.id,
t("salutation.#{volunteer.salutation}"),
......@@ -53,7 +53,7 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
contact.primary_phone,
contact.secondary_phone,
contact.primary_email,
volunteer.birth_year&.year,
birth_year,
nationality_name(volunteer.nationality),
volunteer.profession,
t(".acceptance.#{volunteer.acceptance}"),
......
......@@ -31,7 +31,7 @@ h2.small Persönlicher Hintergrund
= render 'contacts/show', contact: @volunteer.contact
tr
td= t_attr(:birth_year)
td= @volunteer.birth_year.try(:year)
td= l(@volunteer.birth_year) if @volunteer.birth_year.present?
tr
td= t_attr(:avatar)
td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
......
......@@ -29,9 +29,10 @@ class VolunteerApplicationsTest < ApplicationSystemTestCase
assert page.has_text? 'Freiwilligen Anmeldung'
fill_in 'Vorname', with: 'Vorname'
fill_in 'Nachname', with: 'Name'
within '.volunteer_birth_year' do
select('1980', from: 'Jahrgang')
end
#within '.volunteer_birth_year' do
# select('1980', from: 'Jahrgang')
#end
page.execute_script("$('#volunteer_birth_year').val('01/01/1988')")
select('Frau', from: 'Anrede')
select('Syrien, Arabische Republik', from: 'Nationalität')
fill_in 'Strasse', with: 'Sihlstrasse 131'
......
......@@ -21,9 +21,10 @@ class VolunteersTest < ApplicationSystemTestCase
select('Frau', from: 'Anrede')
fill_in 'Vorname', with: 'Volunteer'
fill_in 'Nachname', with: 'aoz'
within '.volunteer_birth_year' do
select('1988', from: 'Jahrgang')
end
#within '.volunteer_birth_year' do
# select('1988', from: 'Jahrgang')
#end
page.execute_script("$('#volunteer_birth_year').val('01/01/1988')")
select('Syrien, Arabische Republik', from: 'Nationalität')
fill_in 'Strasse', with: 'Sihlstrasse 131'
fill_in 'PLZ', with: '8002'
......@@ -525,9 +526,10 @@ class VolunteersTest < ApplicationSystemTestCase
select('Frau', from: 'Anrede')
fill_in 'Vorname', with: 'Volunteer'
fill_in 'Nachname', with: 'aoz'
within '.volunteer_birth_year' do
select('1988', from: 'Jahrgang')
end
#within '.volunteer_birth_year' do
# select('1988', from: 'Jahrgang')
#end
page.execute_script("$('#volunteer_birth_year').val('01/01/1988')")
fill_in 'Strasse', with: 'Sihlstrasse 131'
fill_in 'PLZ', with: '8002'
fill_in 'Ort', with: 'Zürich'
......@@ -552,9 +554,10 @@ class VolunteersTest < ApplicationSystemTestCase
select('Frau', from: 'Anrede')
fill_in 'Vorname', with: 'Volunteer'
fill_in 'Nachname', with: 'aoz'
within '.volunteer_birth_year' do
select('1988', from: 'Jahrgang')
end
#within '.volunteer_birth_year' do
# select('1988', from: 'Jahrgang')
#end
page.execute_script("$('#volunteer_birth_year').val('01/01/1988')")
fill_in 'Strasse', with: 'Sihlstrasse 131'
fill_in 'PLZ', with: '8002'
fill_in 'Ort', with: 'Zürich'
......