rubycentral/cfp-app

View on GitHub
app/views/speakers/_fields.html.haml

Summary

Maintainability
Test Coverage
%fieldset
  %legend.fieldset-legend Speaker Information
  = f.simple_fields_for :speakers, f.object.speakers do |speaker_fields|
    - speaker = speaker_fields.object.decorate

    %p This information is <strong>not visible</strong> during the review process. Name and bio will be used publicly in the program if this proposal is selected.

    = speaker_fields.input :name, disabled: true, tooltip: ["right", "Edit your profile to update"]

    = speaker_fields.input :bio, disabled: speaker.user!=current_user, maxlength: :lookup, input_html: { value: speaker.bio, rows: 4 }, hint: "Your bio should be short, no longer than 500 characters. It's related to why you're speaking about this topic."#, popover_icon: { content: bio_tooltip }

    %p
      These demographic fields are optional and are intended to help us achieve a better understanding of our speaker demographic as we aim to diversify our program. These details will not be shared with the program committee and will only be available to us after talks are selected.

    %p
    = speaker_fields.input :first_time_speaker, as: :select

    %p
    = speaker_fields.input :age_range, collection: Speaker::AGE_RANGES, label: "How old are you?"

    %p
    = speaker_fields.input :pronouns, collection: Speaker::GENDER_PRONOUNS, label: "What are your pronouns?"

    %p
    = speaker_fields.input :ethnicity, collection: Speaker::RACIAL_CATEGORIES, label: "What is your ethnicity?"