effective_mentorships 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/admin/effective_mentorship_registrations_datatable.rb +0 -1
- data/app/models/concerns/effective_mentorships_registration.rb +1 -2
- data/app/views/admin/mentorship_cycles/_form_mentorship_cycle.html.haml +8 -4
- data/app/views/effective/mentorship_registrations/_fields.html.haml +6 -2
- data/app/views/effective/mentorship_registrations/_form.html.haml +7 -2
- data/lib/effective_mentorships/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5d908c2df40071246bda994a3d01f59dd7ffe19d8d049a49c2b919c27f1da5f
|
4
|
+
data.tar.gz: 8711f45d78bf283c55925e4e407e83d9980426339d704f7c71e8df410921bd05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90da1bb4d514e38e396f06cbd1cc621cdd9576cb390e2b8af151b49a71dbd500db3ccc2ebf4e08acab60f01412c4ed982ccf696f239d33da8981677725a73638
|
7
|
+
data.tar.gz: 4dcbfa64d08ccc64903eedd2f585310a3301ff13376d60dd83472afeaac7a26d89807936b98301e44ed6601c4382a23b1ee4c2fbc59bcdd2f73964852fccc0b0
|
@@ -26,7 +26,6 @@ module Admin
|
|
26
26
|
col :category, search: EffectiveMentorships.MentorshipRegistration.categories
|
27
27
|
col :venue, search: EffectiveMentorships.MentorshipRegistration.venues
|
28
28
|
col :location, search: EffectiveMentorships.MentorshipRegistration.locations
|
29
|
-
col :mentor_multiple_mentees, visible: false
|
30
29
|
col :mentor_multiple_mentees_limit, visible: false
|
31
30
|
|
32
31
|
col :parent, visible: false
|
@@ -61,7 +61,6 @@ module EffectiveMentorshipsRegistration
|
|
61
61
|
location :string # Closest city of residence
|
62
62
|
|
63
63
|
# Mentor only fields
|
64
|
-
mentor_multiple_mentees :boolean
|
65
64
|
mentor_multiple_mentees_limit :integer
|
66
65
|
|
67
66
|
# Mentee only fields
|
@@ -84,7 +83,7 @@ module EffectiveMentorshipsRegistration
|
|
84
83
|
validates :accept_declaration, acceptance: true
|
85
84
|
end
|
86
85
|
|
87
|
-
validates :mentor_multiple_mentees_limit, numericality: { greater_than: 0 }, if: -> { opt_in? &&
|
86
|
+
validates :mentor_multiple_mentees_limit, numericality: { greater_than: 0 }, if: -> { opt_in? && mentor? }
|
88
87
|
|
89
88
|
scope :deep, -> { includes(:rich_texts, :user, :mentorship_cycle) }
|
90
89
|
scope :sorted, -> { order(:id) }
|
@@ -27,15 +27,19 @@
|
|
27
27
|
%h2 Content
|
28
28
|
|
29
29
|
- if defined?(EffectiveArticleEditor)
|
30
|
-
= f.article_editor :rich_text_registration_content, label: "#{mentorship_registration_label} opt-in content", hint: "Will be displayed to the user when registering for this #{mentorship_cycle_label.downcase}"
|
30
|
+
= f.article_editor :rich_text_registration_content, label: "#{mentorship_registration_label} opt-in content", hint: "Will be displayed to the user when registering for this #{mentorship_cycle_label.downcase}."
|
31
31
|
- else
|
32
|
-
= f.rich_text_area :rich_text_registration_content, label: "#{mentorship_registration_label} opt-in content", hint: "Will be displayed to the user when registering for this #{mentorship_cycle_label.downcase}"
|
32
|
+
= f.rich_text_area :rich_text_registration_content, label: "#{mentorship_registration_label} opt-in content", hint: "Will be displayed to the user when registering for this #{mentorship_cycle_label.downcase}."
|
33
33
|
|
34
34
|
- if defined?(EffectiveArticleEditor)
|
35
|
-
= f.article_editor :
|
35
|
+
= f.article_editor :rich_text_agreement_content, label: "#{mentorship_registration_label} agreement", hint: "Will be displayed to the user above a checkbox to accept."
|
36
36
|
- else
|
37
|
-
= f.rich_text_area :
|
37
|
+
= f.rich_text_area :rich_text_agreement_content, label: "#{mentorship_registration_label} agreement", hint: "Will be displayed to the user above a checkbox to accept."
|
38
38
|
|
39
|
+
- if defined?(EffectiveArticleEditor)
|
40
|
+
= f.article_editor :rich_text_group_content, label: "#{mentorship_group_label} content", hint: "Will be displayed to the user when viewing their #{mentorship_group_label.downcase} for this #{mentorship_cycle_label.downcase}."
|
41
|
+
- else
|
42
|
+
= f.rich_text_area :rich_text_group_content, label: "#{mentorship_group_label} opt-in content", hint: "Will be displayed to the user when viewing their #{mentorship_group_label.downcase} for this #{mentorship_cycle_label.downcase} and after opt-in."
|
39
43
|
|
40
44
|
= f.submit do
|
41
45
|
= f.save 'Save'
|
@@ -1,6 +1,9 @@
|
|
1
1
|
- unless local_assigns[:namespace] == :admin
|
2
2
|
= f.hidden_field :mentorship_cycle_id
|
3
3
|
|
4
|
+
- if f.object.mentorship_cycle.rich_text_registration_content.present?
|
5
|
+
= f.object.mentorship_cycle.rich_text_registration_content
|
6
|
+
|
4
7
|
= f.radios :opt_in, :boolean, label: "Do you wish to register in the #{f.object.mentorship_cycle || et('effective_mentorships.name')}?"
|
5
8
|
|
6
9
|
= f.hide_if(:opt_in, false) do
|
@@ -13,8 +16,9 @@
|
|
13
16
|
= f.select :location, f.object.class.locations(), required: true
|
14
17
|
= f.radios :venue, f.object.class.venues(), required: true
|
15
18
|
|
16
|
-
- if mentorship_cycle.
|
17
|
-
|
19
|
+
- if f.object.mentorship_cycle.rich_text_agreement_content.present?
|
20
|
+
= card do
|
21
|
+
= f.object.mentorship_cycle.rich_text_agreement_content
|
18
22
|
|
19
23
|
= f.check_box :accept_declaration, label: "Yes, I accept the #{et('effective_mentorships.name')} agreement", required: true
|
20
24
|
|
@@ -3,9 +3,14 @@
|
|
3
3
|
|
4
4
|
- url = (mentorship_registration.persisted? ? effective_mentorships.mentorship_cycle_mentorship_registration_path(mentorship_cycle, mentorship_registration) : effective_mentorships.mentorship_cycle_mentorship_registrations_path(mentorship_cycle, mentorship_registration))
|
5
5
|
|
6
|
-
=
|
7
|
-
|
6
|
+
%h1= et('effective_mentorships.name')
|
7
|
+
|
8
|
+
- if mentorship_registration.persisted?
|
9
|
+
- if mentorship_registration.mentorship_cycle.rich_text_group_content.present?
|
10
|
+
= card do
|
11
|
+
= mentorship_registration.mentorship_cycle.rich_text_group_content
|
8
12
|
|
13
|
+
= card do
|
9
14
|
= effective_form_with(model: mentorship_registration, url: url) do |f|
|
10
15
|
= f.hidden_field :user_id, value: current_user.id
|
11
16
|
= render('effective/mentorship_registrations/fields', f: f)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_mentorships
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|