effective_memberships 0.4.10 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/datatables/effective_applicant_endorsements_datatable.rb +1 -0
  3. data/app/datatables/effective_applicant_equivalences_datatable.rb +23 -0
  4. data/app/datatables/effective_applicant_experiences_datatable.rb +1 -0
  5. data/app/models/concerns/effective_memberships_applicant.rb +61 -10
  6. data/app/models/concerns/effective_memberships_category.rb +2 -0
  7. data/app/models/effective/applicant_endorsement.rb +1 -1
  8. data/app/models/effective/applicant_equivalence.rb +32 -0
  9. data/app/views/admin/applicants/_form.html.haml +4 -0
  10. data/app/views/admin/applicants/_form_transcripts.html.haml +12 -0
  11. data/app/views/admin/categories/_form_applicant_steps.html.haml +6 -0
  12. data/app/views/effective/applicant_endorsements/complete.html.haml +2 -3
  13. data/app/views/effective/applicant_endorsements/edit.html.haml +6 -7
  14. data/app/views/effective/applicant_references/complete.html.haml +2 -3
  15. data/app/views/effective/applicant_references/edit.html.haml +6 -7
  16. data/app/views/effective/applicants/_applicant.html.haml +2 -1
  17. data/app/views/effective/applicants/_course_amounts.html.haml +9 -17
  18. data/app/views/effective/applicants/_declarations.html.haml +9 -16
  19. data/app/views/effective/applicants/_demographics.html.haml +2 -9
  20. data/app/views/effective/applicants/_education.html.haml +6 -13
  21. data/app/views/effective/applicants/_endorsements.html.haml +6 -13
  22. data/app/views/effective/applicants/_equivalences.html.haml +3 -0
  23. data/app/views/effective/applicants/_experience.html.haml +18 -25
  24. data/app/views/effective/applicants/_files.html.haml +16 -23
  25. data/app/views/effective/applicants/_organization.html.haml +2 -9
  26. data/app/views/effective/applicants/_references.html.haml +6 -13
  27. data/app/views/effective/applicants/_stamp.html.haml +23 -30
  28. data/app/views/effective/applicants/_summary.html.haml +5 -0
  29. data/app/views/effective/applicants/_transcripts.html.haml +30 -0
  30. data/app/views/effective/applicants/_transcripts_requirements.html.haml +14 -0
  31. data/app/views/effective/applicants/billing.html.haml +6 -7
  32. data/app/views/effective/applicants/checkout.html.haml +2 -3
  33. data/app/views/effective/applicants/course_amounts.html.haml +48 -47
  34. data/app/views/effective/applicants/declarations.html.haml +10 -9
  35. data/app/views/effective/applicants/demographics.html.haml +6 -7
  36. data/app/views/effective/applicants/education.html.haml +16 -17
  37. data/app/views/effective/applicants/endorsements.html.haml +24 -16
  38. data/app/views/effective/applicants/equivalences.html.haml +24 -0
  39. data/app/views/effective/applicants/experience.html.haml +35 -36
  40. data/app/views/effective/applicants/files.html.haml +9 -8
  41. data/app/views/effective/applicants/organization.html.haml +10 -11
  42. data/app/views/effective/applicants/references.html.haml +17 -16
  43. data/app/views/effective/applicants/select.html.haml +25 -26
  44. data/app/views/effective/applicants/stamp.html.haml +16 -17
  45. data/app/views/effective/applicants/start.html.haml +4 -5
  46. data/app/views/effective/applicants/submitted.html.haml +9 -10
  47. data/app/views/effective/applicants/transcripts.html.haml +13 -0
  48. data/app/views/effective/fee_payments/_declarations.html.haml +9 -16
  49. data/app/views/effective/fee_payments/_demographics.html.haml +2 -9
  50. data/app/views/effective/fee_payments/_fee_payment.html.haml +2 -1
  51. data/app/views/effective/fee_payments/_organization.html.haml +2 -9
  52. data/app/views/effective/fee_payments/billing.html.haml +6 -7
  53. data/app/views/effective/fee_payments/checkout.html.haml +2 -3
  54. data/app/views/effective/fee_payments/declarations.html.haml +8 -9
  55. data/app/views/effective/fee_payments/demographics.html.haml +6 -7
  56. data/app/views/effective/fee_payments/organization.html.haml +10 -11
  57. data/app/views/effective/fee_payments/start.html.haml +23 -24
  58. data/app/views/effective/fee_payments/submitted.html.haml +2 -2
  59. data/db/migrate/01_create_effective_memberships.rb.erb +24 -0
  60. data/lib/effective_memberships/version.rb +1 -1
  61. metadata +10 -2
@@ -31,6 +31,11 @@
31
31
  %th Category
32
32
  %td= [applicant.applicant_type, applicant.category].join(' - ')
33
33
 
34
+ - if applicant.try(:stream).present?
35
+ %tr
36
+ %th Stream
37
+ %td= applicant.stream
38
+
34
39
  - if applicant.orders.present?
35
40
  %tr
36
41
  %th Order#{'s' if applicant.orders.length > 1}
@@ -0,0 +1,30 @@
1
+ = wizard_card(applicant) do
2
+ %table.table
3
+ %tbody
4
+ %tr
5
+ %th Status
6
+ %td
7
+ - if applicant.transcripts_received?
8
+ Received on #{applicant.transcripts_received_on.strftime('%F')}
9
+ - else
10
+ Not yet received
11
+
12
+ - if applicant.transcripts_status.present?
13
+ %tr
14
+ %th Transcripts Status
15
+ %td= applicant.transcripts_status
16
+
17
+ - if applicant.transcripts_details.present?
18
+ %tr
19
+ %th Details
20
+ %td= applicant.transcripts_details
21
+
22
+ - if applicant.transcripts.present?
23
+ %tr
24
+ %th Transcripts Upload
25
+ %td
26
+ - applicant.transcripts.each do |file|
27
+ %p= link_to(file.filename, url_for(file), target: '_blank')
28
+
29
+ - unless applicant.transcripts_received?
30
+ = render('effective/applicants/transcripts_requirements', applicant: applicant)
@@ -0,0 +1,14 @@
1
+ %p
2
+ Official transcripts must be mailed directly from the institution
3
+ where the credential was granted to:
4
+
5
+ %p.text-center
6
+ TODO
7
+ %br
8
+ %br
9
+ %br
10
+
11
+ %p
12
+ = succeed('.') do
13
+ Institutions must send the electronic transcripts to
14
+ = mail_to 'todo@example.com'
@@ -3,12 +3,11 @@
3
3
 
4
4
  - raise('expected owner to respond to billing_address') unless resource.owner.respond_to?(:billing_address)
5
5
 
6
- .card
7
- .card-body
8
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
- = f.hidden_field :id
6
+ = card do
7
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
8
+ = f.hidden_field :id
10
9
 
11
- = f.fields_for(f.object.owner_symbol, f.object.owner) do |fo|
12
- = effective_address_fields(fo, :billing)
10
+ = f.fields_for(f.object.owner_symbol, f.object.owner) do |fo|
11
+ = effective_address_fields(fo, :billing)
13
12
 
14
- = f.save 'Save and Continue'
13
+ = f.save 'Save and Continue'
@@ -1,6 +1,5 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:submitted), deferred_url: wizard_path(:checkout), declined_url: wizard_path(:checkout))
4
+ = card do
5
+ = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:submitted), deferred_url: wizard_path(:checkout), declined_url: wizard_path(:checkout))
@@ -1,50 +1,51 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_courses > 0
7
- .alert.alert-danger You must include #{resource.min_applicant_courses} or more courses.
8
-
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
11
-
12
- .applicant-courses-sum
13
- Total Courses:
14
- %span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
15
-
16
- - f.object.applicant_course_areas_collection.each do |area|
17
- .applicant-course-area.my-4
18
- %h2= area
19
-
20
- - if area.body.present?
21
- %p= area.body
22
-
23
- %table.table.table-sm.table-borderless.table-courses
24
- %tbody
25
- - area.applicant_course_names.each do |applicant_course_name|
26
- - applicant_course = f.object.applicant_course(applicant_course_name: applicant_course_name)
27
-
28
- = f.fields_for(:applicant_courses, applicant_course) do |acf|
29
- %tr
30
- %th.table-courses-course-name= applicant_course_name
31
- %td
32
- = acf.number_field :amount, label: false, required: false, 'data-applicant-courses-amount': true, class: 'col-3'
33
- = acf.hidden_field :applicant_course_name_id, value: applicant_course_name.id
34
-
35
- %tfoot
36
- %tr
37
- %th.table-courses-course-name Total #{area}
38
- %td
39
- %span{'data-applicant-course-area-sum': true}= f.object.applicant_course_area_sum(applicant_course_area: area)
40
-
41
- .applicant-courses-sum.my-2
42
- %h2 Total
43
- .row
44
- .col
45
- %p Total Courses:
46
- %span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
47
- .col
48
- = f.static_field :min_applicant_courses, label: 'Required Courses'
49
-
50
- = f.save 'Save and Continue'
4
+ = card do
5
+ - if resource.min_applicant_courses > 0
6
+ .alert.alert-danger You must include #{resource.min_applicant_courses} or more courses.
7
+
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
10
+
11
+ .applicant-courses-sum
12
+ Total Courses:
13
+ %span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
14
+
15
+ - f.object.applicant_course_areas_collection.each do |area|
16
+ .applicant-course-area.my-4
17
+ %h2= area
18
+
19
+ - if area.body.present?
20
+ %p= area.body
21
+
22
+ %table.table.table-sm.table-borderless.table-courses
23
+ %tbody
24
+ - area.applicant_course_names.each do |applicant_course_name|
25
+ - applicant_course = f.object.applicant_course(applicant_course_name: applicant_course_name)
26
+
27
+ = f.fields_for(:applicant_courses, applicant_course) do |acf|
28
+ %tr
29
+ %th.table-courses-course-name= applicant_course_name
30
+ %td
31
+ = acf.number_field :amount, label: false, required: false, 'data-applicant-courses-amount': true, class: 'col-3'
32
+ = acf.hidden_field :applicant_course_name_id, value: applicant_course_name.id
33
+
34
+ %tfoot
35
+ %tr
36
+ %th.table-courses-course-name Total #{area}
37
+ %td
38
+ %span{'data-applicant-course-area-sum': true}= f.object.applicant_course_area_sum(applicant_course_area: area)
39
+
40
+ .applicant-courses-sum.my-2
41
+ %h2 Total
42
+ .row
43
+ .col
44
+ %p Total Courses:
45
+ %span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
46
+ .col
47
+ = f.static_field :min_applicant_courses, label: 'Required Courses'
48
+
49
+ = render_if_exists("effective/applicants/course_amounts_fields", f: f)
50
+
51
+ = f.save 'Save and Continue'
@@ -5,15 +5,16 @@
5
5
  - resource.declare_code_of_ethics = completed
6
6
  - resource.declare_truth = completed
7
7
 
8
- .card
9
- .card-body
10
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
11
- = f.hidden_field :id
8
+ = card do
9
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
+ = f.hidden_field :id
12
11
 
13
- = f.check_box :declare_code_of_ethics,
14
- label: 'Yes, I hereby certify that I have read and will adhere to the Code of Ethics'
12
+ = f.check_box :declare_code_of_ethics,
13
+ label: 'Yes, I hereby certify that I have read and will adhere to the Code of Ethics'
15
14
 
16
- = f.check_box :declare_truth,
17
- label: 'Yes, I hereby certify that the statements and information contained herein are correct'
15
+ = f.check_box :declare_truth,
16
+ label: 'Yes, I hereby certify that the statements and information contained herein are correct'
18
17
 
19
- = f.save 'Save and Continue'
18
+ = render_if_exists("effective/applicants/declarations_fields", f: f)
19
+
20
+ = f.save 'Save and Continue'
@@ -1,12 +1,11 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
7
- = f.hidden_field :id
4
+ = card do
5
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
6
+ = f.hidden_field :id
8
7
 
9
- = f.fields_for(:user, f.object.user) do |fu|
10
- = render 'users/fields_demographics', f: fu, user: f.object.user, parent: resource
8
+ = f.fields_for(:user, f.object.user) do |fu|
9
+ = render 'users/fields_demographics', f: fu, user: f.object.user, parent: resource
11
10
 
12
- = f.save 'Save and Continue'
11
+ = f.save 'Save and Continue'
@@ -1,27 +1,26 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_educations > 0
7
- .alert.alert-danger You must include #{resource.min_applicant_educations} or more post-secondary educations.
4
+ = card do
5
+ - if resource.min_applicant_educations > 0
6
+ .alert.alert-danger You must include #{resource.min_applicant_educations} or more post-secondary educations.
8
7
 
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
11
10
 
12
- = f.has_many(:applicant_educations, cards: true) do |aef|
13
- %h4.mb-4 Post-Secondary Education
11
+ = f.has_many(:applicant_educations, cards: true) do |aef|
12
+ %h4.mb-4 Post-Secondary Education
14
13
 
15
- .row
16
- .col= aef.text_field :institution
17
- .col= aef.text_field :location
14
+ = aef.text_field :degree_obtained, label: 'Degree, diploma or program'
18
15
 
19
- .row
20
- .col= aef.date_field :start_on, label: 'Start Date'
21
- .col= aef.date_field :end_on, label: 'End Date'
16
+ .row
17
+ .col= aef.text_field :institution
18
+ .col= aef.text_field :location
22
19
 
23
- = aef.text_field :degree_obtained, label: 'Degree, diploma or program'
20
+ .row
21
+ .col= aef.date_field :start_on, label: 'Start Date'
22
+ .col= aef.date_field :end_on, label: 'End Date'
24
23
 
25
- /= f.text_area :applicant_educations_details, label: 'Additional Education Details'
24
+ = render_if_exists("effective/applicants/education_fields", f: f)
26
25
 
27
- = f.save 'Save and Continue'
26
+ = f.save 'Save and Continue'
@@ -1,25 +1,33 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_endorsements > 0
7
- %p You must include #{resource.min_applicant_endorsements} or more endorsements.
4
+ = card do
5
+ - if resource.min_applicant_endorsements > 0
6
+ %p You must include #{resource.min_applicant_endorsements} or more endorsements.
8
7
 
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
11
10
 
12
- = f.has_many(:applicant_endorsements, cards: true) do |aef|
13
- %h4 Endorsement
11
+ - endorders_collection = Effective::ApplicantEndorsement.endorser_collection(resource)
14
12
 
15
- = aef.select :endorser, Effective::ApplicantEndorsement.endorser_collection(resource), required: false,
16
- ajax_url: effective_memberships.select2_ajax_endorser_applicant_endorsement_path(applicant_id: resource)
13
+ = f.has_many(:applicant_endorsements, cards: true) do |aef|
14
+ - aef.object.endorser_type ||= endorders_collection.klass.name
17
15
 
18
- = aef.check_box :unknown_member, label: 'I cant find my endorser in the above list'
16
+ %h4 Endorsement
19
17
 
20
- = aef.show_if(:unknown_member, true) do
21
- = aef.email_field :endorser_email, required: true
22
- = aef.text_field :name, required: true
23
- = aef.phone_field :phone, required: true
18
+ = aef.hidden_field :endorser_id
19
+ = aef.hidden_field :endorser_type
24
20
 
25
- = f.save 'Save and Continue'
21
+ = aef.select :endorser_id, endorders_collection, required: false,
22
+ ajax_url: effective_memberships.select2_ajax_endorser_applicant_endorsement_path(applicant_id: resource)
23
+
24
+ = aef.check_box :unknown_member, label: 'I cant find my endorser in the above list'
25
+
26
+ = aef.show_if(:unknown_member, true) do
27
+ = aef.text_field :name, label: 'Endorser name', required: true
28
+ = aef.email_field :endorser_email, label: 'Email', required: true
29
+ = aef.phone_field :phone, required: true
30
+
31
+ = render_if_exists("effective/applicants/endorsements_fields", f: f)
32
+
33
+ = f.save 'Save and Continue'
@@ -0,0 +1,24 @@
1
+ = render 'layout' do
2
+ = render 'effective/applicants/content', resource: resource
3
+
4
+ = card do
5
+ - if resource.min_applicant_equivalences > 0
6
+ .alert.alert-danger You must include #{resource.min_applicant_equivalences} or more equivalent memberships.
7
+
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
10
+
11
+ = f.has_many(:applicant_equivalences, cards: true) do |aef|
12
+ %h4.mb-4 Equivalent Membership
13
+
14
+ = aef.text_field :name
15
+
16
+ .row
17
+ .col= aef.date_field :start_on, label: 'Start Date'
18
+ .col= aef.date_field :end_on, label: 'End Date'
19
+
20
+ = aef.text_area :notes
21
+
22
+ = render_if_exists("effective/applicants/equivalences_fields", f: f)
23
+
24
+ = f.save 'Save and Continue'
@@ -1,51 +1,50 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_educations > 0
7
- %p You must include #{resource.min_applicant_experiences_months} or more months of experience.
4
+ = card do
5
+ - if resource.min_applicant_educations > 0
6
+ %p You must include #{resource.min_applicant_experiences_months} or more months of experience.
8
7
 
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
11
- = f.error :applicant_experiences
12
- = f.error :applicant_experiences_months
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
10
+ = f.error :applicant_experiences
11
+ = f.error :applicant_experiences_months
13
12
 
14
- = f.has_many(:applicant_experiences, cards: true) do |aef|
15
- %h4.mb-4 Work Experience
13
+ = f.has_many(:applicant_experiences, cards: true) do |aef|
14
+ %h4.mb-4 Work Experience
16
15
 
17
- .row
18
- .col= aef.text_field :employer
19
- .col= aef.text_field :position, label: 'Position Title'
16
+ .row
17
+ .col= aef.text_field :employer
18
+ .col= aef.text_field :position, label: 'Position Title'
20
19
 
21
- .row
22
- .col= aef.date_field :start_on, label: 'Start Date', 'data-applicant-experiences-month': true
23
- .col
24
- = aef.date_field :end_on, label: 'End Date', 'data-applicant-experiences-month': true
25
- = aef.check_box :still_work_here, label: 'I still work here'
20
+ .row
21
+ .col= aef.date_field :start_on, label: 'Start Date', 'data-applicant-experiences-month': true
22
+ .col
23
+ = aef.date_field :end_on, label: 'End Date', required: false, 'data-applicant-experiences-month': true
24
+ = aef.check_box :still_work_here, label: 'I still work here'
26
25
 
27
- .row
28
- .col
29
- = aef.radios :level, aef.object.class.const_get(:LEVELS), inline: true,
30
- label: 'Employment', 'data-applicant-experiences-month': true
26
+ .row
27
+ .col
28
+ = aef.radios :level, aef.object.class.const_get(:LEVELS), inline: true,
29
+ label: 'Employment', 'data-applicant-experiences-month': true
31
30
 
32
- = aef.show_if :level, 'Part Time' do
33
- = aef.percent_field :percent_worked, label: 'Percent time worked',
34
- hint: 'required when part time', 'data-applicant-experiences-month': true
31
+ = aef.show_if :level, 'Part Time' do
32
+ = aef.percent_field :percent_worked, label: 'Percent time worked',
33
+ hint: 'required when part time', 'data-applicant-experiences-month': true
35
34
 
36
- .col= aef.static_field :months, label: 'Calculated Months', value: aef.object.months.to_i
35
+ .col= aef.static_field :months, label: 'Calculated Months', value: aef.object.months.to_i
37
36
 
38
- = aef.text_area :tasks_performed, class: 'mb-0'
37
+ = aef.text_area :tasks_performed, class: 'mb-0'
39
38
 
40
- %h3 Total Months
41
- .row
42
- .col= f.static_field :applicant_experiences_months, label: 'Entered Months', value: f.object.applicant_experiences_months.to_i
43
- .col
44
- = f.static_field :min_applicant_experiences_months, label: 'Required Months' do
45
- #{f.object.min_applicant_experiences_months} months, or #{f.object.min_applicant_experiences_months / 12} years
39
+ %h3 Total Months
40
+ .row
41
+ .col= f.static_field :applicant_experiences_months, label: 'Entered Months', value: f.object.applicant_experiences_months.to_i
42
+ .col
43
+ = f.static_field :min_applicant_experiences_months, label: 'Required Months' do
44
+ #{f.object.min_applicant_experiences_months} months, or #{f.object.min_applicant_experiences_months / 12} years
46
45
 
47
- = f.error :applicant_experiences_months
46
+ = f.error :applicant_experiences_months
48
47
 
49
- /= f.text_area :applicant_experiences_details, label: 'Additional Experiences Details'
48
+ = render_if_exists("effective/applicants/experience_fields", f: f)
50
49
 
51
- = f.save 'Save and Continue'
50
+ = f.save 'Save and Continue'
@@ -1,14 +1,15 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_files > 0
7
- %p You must include #{resource.min_applicant_files} or more files.
4
+ = card do
5
+ - if resource.min_applicant_files > 0
6
+ %p You must include #{resource.min_applicant_files} or more files.
8
7
 
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
11
10
 
12
- = f.file_field :applicant_files, attachment_style: :table
11
+ = f.file_field :applicant_files, attachment_style: :table
13
12
 
14
- = f.save 'Save and Continue'
13
+ = render_if_exists("effective/applicants/files_fields", f: f)
14
+
15
+ = f.save 'Save and Continue'
@@ -2,18 +2,17 @@
2
2
 
3
3
  = render 'effective/applicants/content', resource: resource
4
4
 
5
- .card
6
- .card-body
7
- - datatable = EffectiveResources.best('EffectiveRepresentativesDatatable').new(self, organization: resource.organization)
5
+ = card do
6
+ - datatable = EffectiveResources.best('EffectiveRepresentativesDatatable').new(self, organization: resource.organization)
8
7
 
9
- %h2 Representatives
10
- = render_datatable(datatable, inline: true, simple: true)
8
+ %h2 Representatives
9
+ = render_datatable(datatable, inline: true, simple: true)
11
10
 
12
- %h2 Organization Info
13
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
14
- = f.hidden_field :id
11
+ %h2 Organization Info
12
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
13
+ = f.hidden_field :id
15
14
 
16
- = f.fields_for(:organization, f.object.organization) do |fo|
17
- = render 'organizations/fields_demographics', f: fo, organization: f.object.organization, parent: resource
15
+ = f.fields_for(:organization, f.object.organization) do |fo|
16
+ = render 'organizations/fields_demographics', f: fo, organization: f.object.organization, parent: resource
18
17
 
19
- = f.save 'Save and Continue'
18
+ = f.save 'Save and Continue'
@@ -1,24 +1,25 @@
1
1
  = render 'layout' do
2
2
  = render 'effective/applicants/content', resource: resource
3
3
 
4
- .card
5
- .card-body
6
- - if resource.min_applicant_references > 0
7
- %p You must include #{resource.min_applicant_references} or more references.
4
+ = card do
5
+ - if resource.min_applicant_references > 0
6
+ %p You must include #{resource.min_applicant_references} or more references.
8
7
 
9
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
10
- = f.hidden_field :id
8
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
+ = f.hidden_field :id
11
10
 
12
- = f.has_many(:applicant_references, cards: true) do |arf|
13
- %h4 Reference
11
+ = f.has_many(:applicant_references, cards: true) do |arf|
12
+ %h4 Reference
14
13
 
15
- = arf.text_field :name, label: 'Full Name'
16
- .row
17
- .col= arf.email_field :email
18
- .col= arf.tel_field :phone
14
+ = arf.text_field :name, label: 'Full Name'
15
+ .row
16
+ .col= arf.email_field :email
17
+ .col= arf.tel_field :phone
19
18
 
20
- .row
21
- .col= arf.select :relationship, Effective::ApplicantReference::RELATIONSHIPS
22
- .col= arf.select :known, Effective::ApplicantReference::KNOWNS, label: 'Known for'
19
+ .row
20
+ .col= arf.select :relationship, Effective::ApplicantReference::RELATIONSHIPS
21
+ .col= arf.select :known, Effective::ApplicantReference::KNOWNS, label: 'Known for'
23
22
 
24
- = f.save 'Save and Continue'
23
+ = render_if_exists("effective/applicants/references_fields", f: f)
24
+
25
+ = f.save 'Save and Continue'
@@ -4,39 +4,38 @@
4
4
  - categories = resource.can_apply_categories_collection()
5
5
  - organization_categories = categories.select(&:organization?)
6
6
 
7
- .card
8
- .card-body
9
- - if categories.blank?
10
- %p
11
- There are no categories available for you to apply for.
12
- Please contact us if you believe this is in error.
7
+ = card do
8
+ - if categories.blank?
9
+ %p
10
+ There are no categories available for you to apply for.
11
+ Please contact us if you believe this is in error.
13
12
 
14
- - if categories.present?
15
- %p Please select a category to continue.
13
+ - if categories.present?
14
+ %p Please select a category to continue.
16
15
 
17
- = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
18
- = f.hidden_field :id
16
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
17
+ = f.hidden_field :id
19
18
 
20
- = f.hidden_field :organization_id, value: nil
21
- = f.hidden_field :organization_type, value: nil
22
- = f.hidden_field :category_type, value: EffectiveMemberships.Category.name
19
+ = f.hidden_field :organization_id, value: nil
20
+ = f.hidden_field :organization_type, value: nil
21
+ = f.hidden_field :category_type, value: EffectiveMemberships.Category.name
23
22
 
24
- = f.select :category_id, categories, required: true
23
+ = f.select :category_id, categories, required: true
25
24
 
26
- - categories.each do |mc|
27
- = f.show_if(:category_id, mc.id) do
28
- .mb-4
29
- %h3= mc.to_s
25
+ - categories.each do |mc|
26
+ = f.show_if(:category_id, mc.id) do
27
+ .mb-4
28
+ %h3= mc.to_s
30
29
 
31
- - if organization_categories.present?
32
- %small.text-muted #{mc.category} #{mc.category_type} Membership
30
+ - if organization_categories.present?
31
+ %small.text-muted #{mc.category} #{mc.category_type} Membership
33
32
 
34
- = mc.rich_text_body
33
+ = mc.rich_text_body
35
34
 
36
- = render_if_exists("effective/applicants/select/#{mc.to_s.parameterize.underscore}", f: f, category: mc)
35
+ = render_if_exists("effective/applicants/select/#{mc.to_s.parameterize.underscore}", f: f, category: mc)
37
36
 
38
- - if organization_categories.present?
39
- = f.show_if_any(:category_id, organization_categories.map(&:id)) do
40
- = render('effective/applicants/select_organization', f: f)
37
+ - if organization_categories.present?
38
+ = f.show_if_any(:category_id, organization_categories.map(&:id)) do
39
+ = render('effective/applicants/select_organization', f: f)
41
40
 
42
- = f.save 'Save and Continue'
41
+ = f.save 'Save and Continue'