|
15 | 15 | = f.input :about_you, as: :text, label: t('member.details.edit.coach.about_you'), input_html: { rows: 3 }, required: true
|
16 | 16 | - else
|
17 | 17 | = f.input :about_you, as: :text, label: t('member.details.edit.student.about_you'), input_html: { rows: 3 }, required: true
|
18 |
| - - if @member.errors.any? |
19 |
| - #error_explanation |
20 |
| - %h2= "#{pluralize(@member.errors.count, 'error')} prohibited this member from being saved:" |
21 |
| - %ul |
22 |
| - - @member.errors.full_messages.each do |msg| |
23 |
| - %li= msg |
| 18 | + - if @member.errors[:how_you_found_us].any? |
| 19 | + %span.text-danger= @member.errors[:how_you_found_us].first |
24 | 20 | .col-12.mb-3
|
25 | 21 | %label{ for: 'how_you_found_us' }= t('member.details.edit.how_you_found_us')
|
| 22 | + %span * |
26 | 23 | - options = ['From a friend', 'Search engine (Google etc.)', 'Social Media', "One of Codebar's hosts or partners"]
|
27 | 24 | - options.each do |option|
|
28 | 25 | .form-check
|
29 | 26 | = check_box_tag 'member[how_you_found_us][]', option, false, id: "how_you_found_us_#{option.parameterize}", class: 'form-check-input'
|
30 | 27 | = label_tag "how_you_found_us_#{option.parameterize}", option, class: 'form-check-label', style: 'margin-left: 8px;'
|
31 | 28 | = label_tag :other_reason, t('member.details.edit.other_reason'), class: 'my-1'
|
32 |
| - = text_field_tag :other_reason, nil, placeholder: "Please specify", style: 'width: 500px;' |
| 29 | + = text_field_tag :other_reason, nil, placeholder: "Please specify how you heard about us", class: 'form-control w-100;' |
33 | 30 | = f.input :newsletter, as: :boolean, checked_value: true, unchecked_value: false
|
34 | 31 | .text-right.mb-4
|
35 | 32 | = hidden_field_tag :next_page, step2_member_path(member_type: @type)
|
|
0 commit comments