Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Hide Communication options #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tea-n-biccies
Copy link
Contributor

Replace tick boxes and individual comms choices with a link to sign up for single e-newsletter

Replace tick boxes and individual comms choices with a link to sign up for single e-newsletter
Copy link
Member

@Montana Montana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed:

- if params[:welcome]
  h1 Welcome!

  p Please <strong>check your email address</strong> and fill all required fields to complete signing up.
    Not saving your profile may cause strange behaviour while using the app!
- else
  nav.page
    .back-nav
      ul
        li = icon('chevron-left')
        li = link_to 'Back', @user, class: 'back'
  nav.actions
    ul.list-inline
      li = link_to 'Cancel', @user, class: 'btn btn-default btn-sm'
      li = link_to 'Delete Profile', @user, data: {confirm: 'This action cannot be undone. Are you sure?'}, method: :delete, class: 'btn btn-default btn-sm destroy'

  h1.page-header Edit your profile

  - unless @user.valid?
    .has-error
      .help-block
        p Please fill out all required fields below to complete and verify your profile.

= simple_nested_form_for @user do |f|
  - if @user.errors.any?
    #error_explanation
      h2 = "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:"
      ul
        - @user.errors.full_messages.each do |message|
          li = message

  = hidden_field_tag :welcome, params[:welcome]
  = hidden_field_tag :redirect_to, params[:redirect_to]

  = f.input :name, wrapper_html: {class: 'col-md-6'}
  = f.input :email, required: true, wrapper_html: {class: 'col-md-6'}
  - if current_user.unconfirmed_email
    .help-block
      p
        ' Check your email on
        = current_user.unconfirmed_email
        '  to confirm your new email address. Until confirmed all messages will go to your current email address.

  = f.input :github_handle, required: false, disabled: true, wrapper_html: {class: 'col-md-6'}
  = f.input :twitter_handle, wrapper_html: {class: 'col-md-6'}
  = f.input :irc_handle, wrapper_html: {class: 'col-md-6'}
  = f.input :homepage, as: :url, wrapper_html: {class: 'col-md-6'}
  = f.input :country, required: true, as: :country, label: "Country", prompt: "Select your country", wrapper_html: {class: 'col-md-6'}
  = f.input :timezone, as: :select, collection: list_all_timezones, label: "Timezone", prompt: "Select your timezone", wrapper_html: {class: 'col-md-6'}
  = f.input :location, required: true, wrapper_html: {class: 'col-md-6'}
  div.clearfix

  = f.input :hide_email, label: 'Never show my email address', hint: 'Only signed-in users will see your email address anyway. People will have trouble contacting you.'

  = f.input :is_company, label: "I represent a company"

  = f.input :company_name, label: 'Company name'
  = f.input :company_info, label: 'Company info', hint: 'Where is the office, how much space can you provide, etc.'
  = f.input :bio, label: 'About you', hint: 'You can use basic <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">Markdown</a> here.'.html_safe
  h3.page-header Communication

| If you would like to receive important RGSoC announcements and updates straight to your inbox, you can <a href="http://eepurl.com/gJ7D4r" target="_blank">sign up here for our newsletter.</a>
|  You'll get all the latest program info, including: opening of the open source project submission stage, commencement of student applications, crowdfunding campaign launch, and announcements such as team selection, program kick-off and season wrap-up .

/  .checkbox
    //label
      //= f.check_box :opted_in_newsletter
      //| Newsletter Opt In
    //p.help-block
      //| RGSoC Newsletter Opt In Invitation (this is still in progress, but we promise you that when we make a newsletter, it will be worth reading!)
  //.checkbox
    //label
      //= f.check_box :opted_in_announcements
      //| Announcements
    //p.help-block
      //| Important announcements and updates (that’s 5 emails per year: Opening of our Scholarship Applications, Opening of our Open Source Project Submissions, Crowdfunding Campaign Launch, Selected Teams Announcement and RGSoC Kick-off, RGSoC Wrap Up)
  //.checkbox
    //label
      //= f.check_box :opted_in_marketing_announcements
      //| Marketing Incentives
    //p.help-block
      //| Marketing and Communication initiatives (such as the #ThankfulForRGSoC stories and Alumna Interviews)
  //.checkbox
    //label
      //= f.check_box :opted_in_surveys
      //| Surveys
    //p.help-block
      //| Surveys to get feedback about the program and/or for marketing related purposes (i.e., “The number of scholars who are still working in tech and open source projects after RGSoC”)
  //.checkbox
    //label
      //= f.check_box :opted_in_sponsorships
      //| Sponsorship and Coaching Companies ONLY
    //p.help-block
      //| I just want to be notified about sponsorship and coaching companies opportunities related to RGSoC
  //.checkbox
    //label
      //= f.check_box :opted_in_applications_open
      //| Applications are Open Announcement ONLY
    //p.help-block
      //| Opening of our Scholarship Applications announcement
  //h3.page-header I am interested in:

  //= f.collection_check_boxes :interested_in, User::INTERESTS.to_a, :first, :last, item_wrapper_tag: 'div', item_wrapper_class: 'interested_in'

  h3.page-header Technologies

  = f.input :tech_expertise_list, placeholder: 'Programming Languages, Frameworks, Technologies, etc. I am experienced with', label: 'Technologies of expertise', hint: 'Separate with comma.'
  = f.input :tech_interest_list, placeholder: 'Other Languages, Technologies, etc. I am interested in', label: 'Technologies of interest', hint: 'Separate with comma.'

  h3.page-header Private information
  p.help-block This information will only be visible to yourself and the organizers.
  = f.input :tshirt_size, as: :select, collection: User::TSHIRT_SIZES.map { |k| [k, k] }, label: 'T-Shirt size', blank: false, required: false, hint: 'For sponsor T-Shirts, in case they send some.'
  = f.input :tshirt_cut, as: :select, collection: User::TSHIRT_CUTS.map { |s| [s, s] }, label: 'T-Shirt cut', include_blank: true
  = f.input :postal_address, hint: "Please give your postal address, including your full name, so we can send things we've received from our sponsors for you :)"

  - if admin?
    h3.page-header Roles
    = f.simple_fields_for :roles do |r|
        = r.input :team_id, as: :select, collection: teams, required: false
        = r.input :name, as: :select, collection: Role::ROLES
        = r.link_to_remove 'Remove', class: 'btn btn-default'
    = f.link_to_add 'Add another role', :roles, class: 'btn btn-primary form-btn-group'

  .actions
    ul.list-inline
      li = f.submit 'Save', class: 'btn btn-success'
      li = link_to 'Cancel', @user, class: 'btn btn-default'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants