Browse Source

Pronoun question and a few fixes

development
Godwin 8 years ago
parent
commit
2ecda2bc74
  1. 1
      .gitignore
  2. 18
      app/assets/stylesheets/_application.scss
  3. 18
      app/controllers/application_controller.rb
  4. 2
      app/controllers/conferences_controller.rb
  5. 5
      app/helpers/form_helper.rb
  6. 2
      app/mailers/user_mailer.rb
  7. 2
      app/views/application/_policy.html.haml
  8. 7
      app/views/registration_steps/_name.html.haml
  9. 7
      app/views/registration_steps/_review.html.haml
  10. 29
      config/environments/development.rb
  11. 17
      config/environments/preview.rb
  12. 17
      config/environments/production.rb
  13. 9
      config/locales/en.yml
  14. 4
      db/schema.rb
  15. 2
      features/registration.feature

1
.gitignore

@ -79,3 +79,4 @@ brakeman.html
/config/settings/local.rb /config/settings/local.rb
/nbproject/private/ /nbproject/private/
/config/database.yml /config/database.yml
/config/app_config.yml

18
app/assets/stylesheets/_application.scss

@ -62,6 +62,10 @@ p {
&.center { &.center {
text-align: center; text-align: center;
} }
&.small {
font-size: 3.5vw;
}
} }
u { u {
@ -101,6 +105,12 @@ a {
} }
} }
.target:target {
text-decoration: underline;
text-decoration-color: $yellow;
text-decoration-style: wavy;
}
.screen-reader-text { .screen-reader-text {
clip: rect(1px, 1px, 1px, 1px); clip: rect(1px, 1px, 1px, 1px);
height: 1px; height: 1px;
@ -1768,6 +1778,10 @@ ul.warnings {
&.make-room { &.make-room {
margin-bottom: 2em; margin-bottom: 2em;
} }
.text-field & {
margin: 0 0 1em 0;
}
} }
.success-info { .success-info {
@ -3435,6 +3449,10 @@ body.policy .policy-agreement ul {
p { p {
font-size: 1.25em; font-size: 1.25em;
&.small {
font-size: 1.125em;
}
} }
fieldset { fieldset {

18
app/controllers/application_controller.rb

@ -97,9 +97,9 @@ class ApplicationController < BaseController
if Rails.env.preview? || Rails.env.production? if Rails.env.preview? || Rails.env.production?
request_info = { request_info = {
'remote_ip' => arg.remote_ip, 'remote_ip' => request.remote_ip,
'uuid' => arg.uuid, 'uuid' => request.uuid,
'original_url' => arg.original_url, 'original_url' => request.original_url,
'env' => Hash.new 'env' => Hash.new
} }
request.env.each do |key, value| request.env.each do |key, value|
@ -173,9 +173,9 @@ class ApplicationController < BaseController
if Rails.env.preview? || Rails.env.production? if Rails.env.preview? || Rails.env.production?
suppress(Exception) do suppress(Exception) do
request_info = { request_info = {
'remote_ip' => arg.remote_ip, 'remote_ip' => request.remote_ip,
'uuid' => arg.uuid, 'uuid' => request.uuid,
'original_url' => arg.original_url, 'original_url' => request.original_url,
'env' => Hash.new 'env' => Hash.new
} }
request.env.each do |key, value| request.env.each do |key, value|
@ -349,9 +349,9 @@ class ApplicationController < BaseController
if Rails.env.preview? || Rails.env.production? if Rails.env.preview? || Rails.env.production?
begin begin
request_info = { request_info = {
'remote_ip' => arg.remote_ip, 'remote_ip' => request.remote_ip,
'uuid' => arg.uuid, 'uuid' => request.uuid,
'original_url' => arg.original_url, 'original_url' => request.original_url,
'env' => Hash.new 'env' => Hash.new
} }
request.env.each do |key, value| request.env.each do |key, value|

2
app/controllers/conferences_controller.rb

@ -65,7 +65,7 @@ class ConferencesController < ApplicationController
# pass any data on to the view # pass any data on to the view
data_to_instance_variables(result[:data]) data_to_instance_variables(result[:data])
raise result[:exception] if result[:exception].present? && Rails.env.development? handle_exception(result[:exception]) if result[:exception].present?
if @update_status == :paypal_redirect if @update_status == :paypal_redirect
pp_response = @request.setup( pp_response = @request.setup(

5
app/helpers/form_helper.rb

@ -285,6 +285,11 @@ module FormHelper
html += show_errors name, value html += show_errors name, value
if options[:warning].present?
description_id ||= "#{id}-desc"
html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info')
end
inside_label = '' inside_label = ''
if options[:type] == :file if options[:type] == :file

2
app/mailers/user_mailer.rb

@ -6,7 +6,7 @@ class UserMailer < ActionMailer::Base
before_filter :set_host before_filter :set_host
default from: "Bike!Bike! <godwin@bikebike.org>" default from: "Bike!Bike! <info@bikebike.org>"
def email_confirmation(confirmation) def email_confirmation(confirmation)
@confirmation = EmailConfirmation.find(confirmation) if confirmation.present? @confirmation = EmailConfirmation.find(confirmation) if confirmation.present?

2
app/views/application/_policy.html.haml

@ -7,7 +7,7 @@
%h3=_'articles.policy.headings.The_Agreement' %h3=_'articles.policy.headings.The_Agreement'
%ul %ul
- policies.each do |term| - policies.each do |term|
%li %li{id: checkboxes ? nil : term, class: checkboxes ? nil : :target}
- if checkboxes - if checkboxes
= check_box_tag(term, 1, false, required: true) = check_box_tag(term, 1, false, required: true)
.term=_"articles.policy.term.#{term.to_s}", :s, 2 .term=_"articles.policy.term.#{term.to_s}", :s, 2

7
app/views/registration_steps/_name.html.haml

@ -1,5 +1,10 @@
= registration_step_header = registration_step_header
= row do = row do
= columns(medium: 12) do
= save_registration_step do = save_registration_step do
= columns(medium: 12) do
= textfield :name, @name, required: true, big: true = textfield :name, @name, required: true, big: true
%h3=_'articles.conference_registration.headings.pronoun'
= columns(medium: 6) do
%p.small=_'articles.conference_registration.paragraphs.pronoun', :p
= columns(medium: 6) do
= textfield :pronoun, @pronoun, required: false, big: true, warning: 'articles.conference_registration.paragraphs.pronoun_optional'

7
app/views/registration_steps/_review.html.haml

@ -26,10 +26,11 @@
- when :html - when :html
.scroller= richtext(data[:value].html_safe) .scroller= richtext(data[:value].html_safe)
- else - else
- if data[:key].present? - value = data[:key].present? ? (_"#{data[:key]}.#{data[:value]}") : data[:value].to_s
=_"#{data[:key]}.#{data[:value]}" - if data[:supplementary].present?
= (_'string_formats.data_with_supplementary_value', vars: { value: value, supplementary_value: data[:supplementary] }).html_safe
- else - else
= data[:value].to_s.html_safe = value.html_safe
- else - else
%p.centered=_'articles.conference_registration.paragraphs.registration_cancelled', :p %p.centered=_'articles.conference_registration.paragraphs.registration_cancelled', :p
- if @allow_cancel_attendance - if @allow_cancel_attendance

29
config/environments/development.rb

@ -33,17 +33,19 @@ BikeBike::Application.configure do
config.assets.digest = true config.assets.digest = true
config.assets.compile = true config.assets.compile = true
config.action_mailer.delivery_method = :smtp # to deliver to the browser instead of email
config.action_mailer.smtp_settings = { config.action_mailer.delivery_method = :letter_opener
:address => 'mail.bikebike.org', # config.action_mailer.delivery_method = :smtp
:domain => 'preview.bikebike.org', # config.action_mailer.smtp_settings = {
:port => 587, # address: 'smtp.gmail.com',
:authentication => :plain, # domain: 'bikebike.org',
:enable_starttls_auto => true, # port: 587,
:openssl_verify_mode => 'none', # authentication: :plain,
:user_name => 'info@preview.bikebike.org', # enable_starttls_auto: true,
:password => 'test' # openssl_verify_mode: 'none',
} # user_name: 'info@bikebike.org',
# password: config.app_config['email_password']
# }
config.action_mailer.raise_delivery_errors = true config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true
@ -52,11 +54,6 @@ BikeBike::Application.configure do
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
# to be appraised of mailing errors
config.action_mailer.raise_delivery_errors = true
# to deliver to the browser instead of email
config.action_mailer.delivery_method = :letter_opener
Paypal.sandbox! Paypal.sandbox!
config.action_controller.default_url_options = { trailing_slash: true } config.action_controller.default_url_options = { trailing_slash: true }
end end

17
config/environments/preview.rb

@ -1,4 +1,5 @@
BikeBike::Application.configure do BikeBike::Application.configure do
config.app_config = config_for(:app_config)
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests. # Code is not reloaded between requests.
@ -87,14 +88,14 @@ BikeBike::Application.configure do
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com', address: 'smtp.gmail.com',
:domain => 'bikebike.org', domain: 'bikebike.org',
:port => 587, port: 587,
:authentication => :plain, authentication: :plain,
:enable_starttls_auto => true, enable_starttls_auto: true,
:openssl_verify_mode => 'none', openssl_verify_mode: 'none',
:user_name => '', user_name: 'info@bikebike.org',
:password => '' password: config.app_config['email_password']
} }
config.action_mailer.raise_delivery_errors = true config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true

17
config/environments/production.rb

@ -1,4 +1,5 @@
BikeBike::Application.configure do BikeBike::Application.configure do
config.app_config = config_for(:app_config)
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests. # Code is not reloaded between requests.
@ -88,14 +89,14 @@ BikeBike::Application.configure do
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com', address: 'smtp.gmail.com',
:domain => 'bikebike.org', domain: 'bikebike.org',
:port => 587, port: 587,
:authentication => :plain, authentication: :plain,
:enable_starttls_auto => true, enable_starttls_auto: true,
:openssl_verify_mode => 'none', openssl_verify_mode: 'none',
:user_name => '', user_name: 'info@bikebike.org',
:password => '' password: config.app_config['email_password']
} }
config.action_mailer.raise_delivery_errors = true config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true

9
config/locales/en.yml

@ -1159,6 +1159,8 @@ en:
other: "%{count} seconds" other: "%{count} seconds"
x_and_y: "%{x} %{y}" x_and_y: "%{x} %{y}"
time_ago: "%{time} ago" time_ago: "%{time} ago"
string_formats:
data_with_supplementary_value: '%{value} (%{supplementary_value})'
errors: errors:
format: "%{attribute} %{message}" format: "%{attribute} %{message}"
messages: messages:
@ -1620,8 +1622,9 @@ en:
peaceful: We are peaceful and honest. peaceful: We are peaceful and honest.
conference_registration: conference_registration:
complete: complete:
payment_processed: Thank you for your payment! payment_processed: Thank you for your payment! Your registration is now complete
companion_registered: Your companion has completed their registration, we will do our best to keep you together companion_registered: Your companion has completed their registration, we will do our best to keep you together
registration_complete: Thank you, your registration is now complete
error: error:
generic: An unexpected error occurred generic: An unexpected error occurred
payment_cancelled: Your payment was cancelled payment_cancelled: Your payment was cancelled
@ -1688,6 +1691,7 @@ en:
name: Name name: Name
languages: Languages spoken languages: Languages spoken
headings: headings:
pronoun: Pronoun (he/she/they)
Back_to: 'Back to:' Back_to: 'Back to:'
group_ride: Do you plan to attend the group ride? group_ride: Do you plan to attend the group ride?
hosting_other: Information for organizers hosting_other: Information for organizers
@ -1797,6 +1801,8 @@ en:
additional_details: Additional details additional_details: Additional details
companion: Companion companion: Companion
paragraphs: paragraphs:
pronoun: It is important that communications with you and about you are as respectful as possible. If you do not provide a pronoun organizers may assume he, she, or they based on your name or visual identity.
pronoun_optional: Providing your pronoun is optional
group_ride: There will be a group ride after or before the conference, do you plan to attend? group_ride: There will be a group ride after or before the conference, do you plan to attend?
registration_cancelled: You have cancelled your registration. If you reconsider, please re-open your registration using the button below but keep in mind that you may lose out of your housing or bike if you wait too long. registration_cancelled: You have cancelled your registration. If you reconsider, please re-open your registration using the button below but keep in mind that you may lose out of your housing or bike if you wait too long.
hosting_other: Please enter any information you would like organizers to consider when selecting guests. If you have restrictions on guests that you would lke to stay at your home or if you have pets or other factors that might cause guests to be uncomfortable or not able to stay at your home, please list them here. hosting_other: Please enter any information you would like organizers to consider when selecting guests. If you have restrictions on guests that you would lke to stay at your home or if you have pets or other factors that might cause guests to be uncomfortable or not able to stay at your home, please list them here.
@ -2166,6 +2172,7 @@ en:
forms: forms:
labels: labels:
generic: generic:
pronoun: Pronoun
territory: State/Province territory: State/Province
payment_type: payment_type:
paypal: Online paypal: Online

4
db/schema.rb

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170609030149) do ActiveRecord::Schema.define(version: 20170613022506) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -110,6 +110,7 @@ ActiveRecord::Schema.define(version: 20170609030149) do
t.boolean "is_participant" t.boolean "is_participant"
t.boolean "is_volunteer" t.boolean "is_volunteer"
t.string "confirmation_token" t.string "confirmation_token"
t.binary "data_old"
t.string "email" t.string "email"
t.boolean "complete" t.boolean "complete"
t.boolean "completed" t.boolean "completed"
@ -436,6 +437,7 @@ ActiveRecord::Schema.define(version: 20170609030149) do
t.boolean "has_workbench_access" t.boolean "has_workbench_access"
t.datetime "workbench_access_request_date" t.datetime "workbench_access_request_date"
t.text "workbench_access_request_message" t.text "workbench_access_request_message"
t.string "pronoun"
end end
add_index "users", ["activation_token"], name: "index_users_on_activation_token", using: :btree add_index "users", ["activation_token"], name: "index_users_on_activation_token", using: :btree

2
features/registration.feature

@ -35,6 +35,7 @@ Feature: Registration
Then I should see 'What is your name?' Then I should see 'What is your name?'
When I enter my name When I enter my name
And enter my pronoun as 'They'
And click the 'Next' button And click the 'Next' button
Then I should see 'Which languages do you speak?' Then I should see 'Which languages do you speak?'
@ -93,6 +94,7 @@ Feature: Registration
Then I should get a 'Thank you for registering' email Then I should get a 'Thank you for registering' email
And I should see 'Your registration is complete' And I should see 'Your registration is complete'
And I should see 'Seattle' And I should see 'Seattle'
And see 'They'
And see 'Bike Works' And see 'Bike Works'
And see 'Yes, I would like to place to stay' And see 'Yes, I would like to place to stay'
And see 'I eat meat and dairy' And see 'I eat meat and dairy'

Loading…
Cancel
Save