diff --git a/app/assets/stylesheets/forms.css.scss b/app/assets/stylesheets/forms.css.scss index ae801b94..66fbe380 100644 --- a/app/assets/stylesheets/forms.css.scss +++ b/app/assets/stylesheets/forms.css.scss @@ -10,10 +10,10 @@ } .email_valid { - background-color: lighten($c-green, 30%); + background-color: lighten($c-green, 30%) !important; } .email_invalid { - background-color: lighten($c-red, 30%); + background-color: lighten($c-red, 30%) !important; } .menu-heading { diff --git a/app/models/person.rb b/app/models/person.rb index 1b2e40f1..35b6eebe 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -37,14 +37,12 @@ class Person < ActiveRecord::Base scope :in_camp, -> { joins(:camp) } def self.to_csv - humanize = lambda { |x| x ? "Yes" : "No" } CSV.generate(headers: true) do |csv| csv << CSV_ATTRIBUTES.map{ |attr| attr.titleize} Person.includes(:camp, :roles).where(:camps => {:event_id => Rails.application.config.default_event}).each do |p| csv << [ p.email, p.name, p.phone_number, p.roles.pluck(:identifier).join("|"), p.camp.en_name, p.camp.id, - humanize.call(p.needs_early_arrival), humanize.call(p.has_ticket) ] end end diff --git a/app/views/camps/_person_fields.haml b/app/views/camps/_person_fields.haml index d1f070f9..48a46bf7 100644 --- a/app/views/camps/_person_fields.haml +++ b/app/views/camps/_person_fields.haml @@ -4,7 +4,6 @@ const email_field = event.target; if (email_field.value != '') { verify_email(email_field.value, function (valid) { - console.log(`email is valid: ${valid}`); if (!valid) { email_field.classList.remove("email_valid"); email_field.classList.add("email_invalid"); diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index 239d712e..1d22a8e4 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -61,7 +61,7 @@ def person_to_line(p) [p.email, p.name, p.phone_number, p.roles.pluck(:identifier).join('|'), - camp.en_name, camp.id.to_s, "Yes", "No"] + camp.en_name, camp.id.to_s] end describe "#self.to_csv" do