effective_mentorships 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 569706e1dab213ee7cb6102a5242270b5b7586ffdb8d12ce5997635eb2e589dd
4
- data.tar.gz: 28d54e0d12f669d3f376496c40605d00e979d29c981737416c17455e53ca0989
3
+ metadata.gz: 0bac641b57e5bb8212e4d09422be2faf6aaf324e5815895ebc3fcc7ab8bb2bf7
4
+ data.tar.gz: 42304f4ed8f6771aa9db5340ff6616e042a22daeecf15833ce9e3b3a67b01bd5
5
5
  SHA512:
6
- metadata.gz: 2372c9a3629dc4b2258309dc6b2353e930e3a2f804c9332a038154d2bbeca0189b76f79b52a5419c0d2216dcc4798ae2269c5b1d3eb08264e73dc679c9efc7aa
7
- data.tar.gz: 58dd46785e9737b00690408040bdbdbbf04b194d0b34da1479647eb0aee8b4eed68a001f453c922c1acdbf7ae93d7147f018002633968564446839b7b7a18a07
6
+ metadata.gz: ece7cbf406a81a5d2cb8aced061e74a87262a1ab9be94c668695a9a99cab3bc0b731efafbeed6991000889ebfb6aaf3b3cefab536dac645aca501a2d0ba8b31a
7
+ data.tar.gz: 92b24f232c54179460330f88a2d466afec28ac7997a7ab3dc3000da0a02e8bf72fe842b94ebd45f3bc6d8e9c1484e7917d7d39acc2397c3ba1580e689b1ed92b
@@ -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 :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}"
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 :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}"
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.rich_text_registration_content.present?
17
- .my-4= mentorship_cycle.rich_text_registration_content
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
- = card do
7
- %h2= et('effective_mentorships.name')
6
+ %h1= et('effective_mentorships.name')
7
+
8
+ - if mentorship_registration.persisted? && mentorship_registration.opt_in?
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)
@@ -1,3 +1,3 @@
1
1
  module EffectiveMentorships
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.3'
3
3
  end
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.1
4
+ version: 0.2.3
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-26 00:00:00.000000000 Z
11
+ date: 2024-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails