decidim-conferences 0.24.1 → 0.25.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/conferences/conference_m_cell.rb +1 -1
- data/app/cells/decidim/conferences/conference_speaker/show.erb +2 -2
- data/app/cells/decidim/conferences/conference_speaker_cell.rb +3 -3
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +1 -1
- data/app/cells/decidim/conferences/partner_cell.rb +2 -2
- data/app/commands/decidim/conferences/admin/copy_conference.rb +9 -2
- data/app/commands/decidim/conferences/admin/create_conference_speaker.rb +4 -2
- data/app/commands/decidim/conferences/admin/update_conference.rb +5 -10
- data/app/commands/decidim/conferences/admin/update_conference_speaker.rb +5 -9
- data/app/commands/decidim/conferences/admin/update_diploma.rb +2 -2
- data/app/commands/decidim/conferences/admin/update_partner.rb +5 -5
- data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +0 -2
- data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +3 -3
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +1 -5
- data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +2 -4
- data/app/forms/decidim/conferences/admin/conference_form.rb +2 -2
- data/app/forms/decidim/conferences/admin/conference_speaker_form.rb +1 -1
- data/app/forms/decidim/conferences/admin/partner_form.rb +2 -2
- data/app/models/decidim/conference.rb +8 -8
- data/app/models/decidim/conference_speaker.rb +2 -2
- data/app/models/decidim/conferences/partner.rb +2 -2
- data/app/packs/entrypoints/decidim_conferences_admin.js +7 -0
- data/app/{assets/images/decidim/conferences/conference.svg → packs/images/decidim/conferences/decidim_conferences.svg} +0 -0
- data/app/{assets/javascripts/decidim/conferences/admin/conference_invite_form.es6 → packs/src/decidim/conferences/admin/conference_invite_form.js} +3 -3
- data/app/{assets/javascripts/decidim/conferences/admin/conference_speakers.js.es6 → packs/src/decidim/conferences/admin/conference_speakers.js} +3 -3
- data/app/packs/src/decidim/conferences/admin/conferences.js +27 -0
- data/app/{assets/stylesheet → packs/stylesheets}/decidim/conferences/conferences.scss +0 -0
- data/app/presenters/decidim/conferences/conference_stats_presenter.rb +8 -22
- data/app/queries/decidim/conferences/admin/admin_users.rb +24 -11
- data/app/uploaders/decidim/conferences/diploma_uploader.rb +4 -2
- data/app/uploaders/decidim/conferences/partner_logo_uploader.rb +5 -5
- data/app/uploaders/decidim/cw/conferences/diploma_uploader.rb +14 -0
- data/app/uploaders/decidim/cw/conferences/partner_logo_uploader.rb +15 -0
- data/app/views/decidim/conferences/admin/conference_copies/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_invites/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_speakers/_form.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_speakers/edit.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conferences/_form.html.erb +1 -3
- data/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb +4 -4
- data/app/views/decidim/conferences/admin/partners/index.html.erb +1 -1
- data/app/views/decidim/conferences/admin/send_conference_diploma_mailer/diploma_user.html.erb +2 -2
- data/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +5 -5
- data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +3 -3
- data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +3 -3
- data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/show.html.erb +2 -3
- data/app/views/devise/mailer/join_conference.html.erb +5 -5
- data/app/views/layouts/decidim/_conference_hero.html.erb +1 -1
- data/app/views/layouts/decidim/admin/conference.html.erb +4 -106
- data/app/views/layouts/decidim/conference.html.erb +2 -2
- data/app/views/layouts/decidim/diploma.html.erb +1 -1
- data/config/assets.rb +9 -0
- data/config/locales/ar.yml +0 -18
- data/config/locales/ca.yml +8 -22
- data/config/locales/cs.yml +5 -19
- data/config/locales/de.yml +4 -18
- data/config/locales/el.yml +0 -18
- data/config/locales/en.yml +4 -18
- data/config/locales/es-MX.yml +38 -18
- data/config/locales/es-PY.yml +38 -18
- data/config/locales/es.yml +38 -18
- data/config/locales/eu.yml +0 -18
- data/config/locales/fi-plain.yml +4 -18
- data/config/locales/fi.yml +4 -18
- data/config/locales/fr-CA.yml +1 -18
- data/config/locales/fr-LU.yml +577 -0
- data/config/locales/fr.yml +1 -18
- data/config/locales/gl.yml +23 -18
- data/config/locales/hu.yml +0 -18
- data/config/locales/id-ID.yml +0 -18
- data/config/locales/it.yml +49 -18
- data/config/locales/ja.yml +43 -18
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +0 -17
- data/config/locales/nl.yml +4 -18
- data/config/locales/no.yml +0 -18
- data/config/locales/pl.yml +27 -26
- data/config/locales/pt-BR.yml +59 -18
- data/config/locales/pt.yml +0 -18
- data/config/locales/ro-RO.yml +24 -18
- data/config/locales/sk.yml +0 -18
- data/config/locales/sl.yml +0 -2
- data/config/locales/sv.yml +2 -17
- data/config/locales/tr-TR.yml +0 -18
- data/config/locales/zh-CN.yml +0 -18
- data/db/migrate/20210408204953_allow_null_logo_column_in_decidim_conferences_partners_table.rb +7 -0
- data/lib/decidim/api/conference_partner_type.rb +4 -0
- data/lib/decidim/api/conference_speaker_type.rb +4 -0
- data/lib/decidim/api/conference_type.rb +9 -1
- data/lib/decidim/conferences/admin_engine.rb +138 -8
- data/lib/decidim/conferences/engine.rb +6 -9
- data/lib/decidim/conferences/participatory_space.rb +40 -7
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +26 -24
- data/app/assets/config/admin/decidim_conferences_manifest.js +0 -3
- data/app/assets/config/decidim_conferences_manifest.js +0 -2
- data/app/assets/javascripts/decidim/conferences/admin/conferences.js.es6 +0 -30
- data/app/assets/javascripts/decidim/conferences/conferences.js.es6 +0 -0
- data/app/views/decidim/conferences/conferences/_statistics.html.erb +0 -10
- data/config/locales/ja-JP.yml +0 -575
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eff0e43eed9315c2b099ff34ab37895bc7c340b5afdd70b3fc1c8539eff480ec
|
4
|
+
data.tar.gz: ab2a38e5d51f55fe6b7934a02105c75cd6d8a720af0ff21b7031ecbf052220e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee7fef0664193e8c781aaac00ff884ac34149c6cf5920f761c9d123e3a31282149b76603b596026ac3e7351d6432c97ace309e062a368703ec38b476977cf6f
|
7
|
+
data.tar.gz: 0a2fe1fbaedf9fc9d3e30d746fe8ba203d19795709377c914e8af15565a729b1e1edf6456d7d61269762f1097026f4cd5f4c8587c7e7e9435403b09328ed4652
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="column conference-speaker js-conference">
|
2
2
|
<div class="speaker-img-wrapper">
|
3
3
|
<div class="speaker-img">
|
4
|
-
<%= image_tag
|
4
|
+
<%= image_tag avatar_path, alt: "speaker-image" %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
<div class="speaker-data">
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<div class="column medium-6">
|
27
27
|
<div class="speaker-img-wrapper">
|
28
28
|
<div class="speaker-img">
|
29
|
-
<%= image_tag
|
29
|
+
<%= image_tag avatar_path, alt: "speaker-image" %>
|
30
30
|
</div>
|
31
31
|
</div>
|
32
32
|
<div class="speaker-data">
|
@@ -39,10 +39,10 @@ module Decidim
|
|
39
39
|
speakers.map { |speaker| present(speaker) }
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
43
|
-
return model.user.
|
42
|
+
def avatar_path
|
43
|
+
return Decidim::UserPresenter.new(model.user).avatar_url if model.user.present?
|
44
44
|
|
45
|
-
model.avatar
|
45
|
+
model.attached_uploader(:avatar).path
|
46
46
|
end
|
47
47
|
|
48
48
|
def has_profile?
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="column">
|
9
9
|
<%= link_to decidim_conferences.conference_path(conference), class: "card card--conference card--mini" do %>
|
10
10
|
<div aria-hidden="true" class="card__image-top"
|
11
|
-
style="background-image:url(<%= conference.hero_image.
|
11
|
+
style="background-image:url(<%= conference.attached_uploader(:hero_image).path %>)"></div>
|
12
12
|
<div class="card__content">
|
13
13
|
<span class="card__title card__link"><%= translated_attribute conference.title %></span>
|
14
14
|
</div>
|
@@ -17,9 +17,9 @@ module Decidim
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def logo
|
20
|
-
return unless model.logo.
|
20
|
+
return unless model.logo.attached?
|
21
21
|
|
22
|
-
"<div class='card p-m flex--cc'> #{image_tag model.logo.medium
|
22
|
+
"<div class='card p-m flex--cc'> #{image_tag model.attached_uploader(:logo).path(variant: :medium), alt: "logo"} </div>"
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -26,6 +26,7 @@ module Decidim
|
|
26
26
|
|
27
27
|
Conference.transaction do
|
28
28
|
copy_conference
|
29
|
+
copy_conference_attachments
|
29
30
|
copy_conference_categories if @form.copy_categories?
|
30
31
|
copy_conference_components if @form.copy_components?
|
31
32
|
end
|
@@ -47,8 +48,6 @@ module Decidim
|
|
47
48
|
description: @conference.description,
|
48
49
|
short_description: @conference.short_description,
|
49
50
|
location: @conference.location,
|
50
|
-
hero_image: @conference.hero_image,
|
51
|
-
banner_image: @conference.banner_image,
|
52
51
|
promoted: @conference.promoted,
|
53
52
|
scopes_enabled: @conference.scopes_enabled,
|
54
53
|
scope: @conference.scope,
|
@@ -58,6 +57,14 @@ module Decidim
|
|
58
57
|
)
|
59
58
|
end
|
60
59
|
|
60
|
+
def copy_conference_attachments
|
61
|
+
[:hero_image, :banner_image].each do |attribute|
|
62
|
+
next unless @conference.attached_uploader(attribute).attached?
|
63
|
+
|
64
|
+
@copied_conference.send(attribute).attach(@conference.send(attribute).blob)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
61
68
|
def copy_conference_categories
|
62
69
|
@conference.categories.each do |category|
|
63
70
|
category_copied = category.dup
|
@@ -6,6 +6,8 @@ module Decidim
|
|
6
6
|
# A command with all the business logic when creating a new conference
|
7
7
|
# speaker in the system.
|
8
8
|
class CreateConferenceSpeaker < Rectify::Command
|
9
|
+
include ::Decidim::AttachmentAttributesMethods
|
10
|
+
|
9
11
|
# Public: Initializes the command.
|
10
12
|
#
|
11
13
|
# form - A form object with the params.
|
@@ -55,8 +57,6 @@ module Decidim
|
|
55
57
|
:full_name,
|
56
58
|
:twitter_handle,
|
57
59
|
:personal_url,
|
58
|
-
:avatar,
|
59
|
-
:remove_avatar,
|
60
60
|
:position,
|
61
61
|
:affiliation,
|
62
62
|
:short_bio
|
@@ -64,6 +64,8 @@ module Decidim
|
|
64
64
|
decidim_conference_id: conference.id,
|
65
65
|
conference: conference,
|
66
66
|
user: form.user
|
67
|
+
).merge(
|
68
|
+
attachment_attributes(:avatar)
|
67
69
|
)
|
68
70
|
conference_speaker = conference.speakers.build
|
69
71
|
conference_speaker.conference = conference
|
@@ -6,6 +6,8 @@ module Decidim
|
|
6
6
|
# A command with all the business logic when creating a new participatory
|
7
7
|
# conference in the system.
|
8
8
|
class UpdateConference < Rectify::Command
|
9
|
+
include ::Decidim::AttachmentAttributesMethods
|
10
|
+
|
9
11
|
# Public: Initializes the command.
|
10
12
|
#
|
11
13
|
# conference - the Conference to update
|
@@ -85,16 +87,9 @@ module Decidim
|
|
85
87
|
scopes_enabled: form.scopes_enabled,
|
86
88
|
scope: form.scope,
|
87
89
|
show_statistics: form.show_statistics
|
88
|
-
}.merge(
|
89
|
-
|
90
|
-
|
91
|
-
def uploader_attributes
|
92
|
-
{
|
93
|
-
hero_image: form.hero_image,
|
94
|
-
remove_hero_image: form.remove_hero_image,
|
95
|
-
banner_image: form.banner_image,
|
96
|
-
remove_banner_image: form.remove_banner_image
|
97
|
-
}.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
|
90
|
+
}.merge(
|
91
|
+
attachment_attributes(:hero_image, :banner_image)
|
92
|
+
)
|
98
93
|
end
|
99
94
|
|
100
95
|
def send_notification_registrations_enabled
|
@@ -6,12 +6,13 @@ module Decidim
|
|
6
6
|
# A command with all the business logic when updating a conference
|
7
7
|
# speaker in the system.
|
8
8
|
class UpdateConferenceSpeaker < Rectify::Command
|
9
|
+
include ::Decidim::AttachmentAttributesMethods
|
10
|
+
|
9
11
|
# Public: Initializes the command.
|
10
12
|
#
|
11
13
|
# form - A form object with the params.
|
12
14
|
# conference_speaker - The ConferenceSpeaker to update
|
13
15
|
def initialize(form, conference_speaker)
|
14
|
-
form.avatar = conference_speaker.avatar if form.avatar.blank?
|
15
16
|
@form = form
|
16
17
|
@conference_speaker = conference_speaker
|
17
18
|
end
|
@@ -62,14 +63,9 @@ module Decidim
|
|
62
63
|
:short_bio
|
63
64
|
).merge(
|
64
65
|
user: form.user
|
65
|
-
).merge(
|
66
|
-
|
67
|
-
|
68
|
-
def uploader_attributes
|
69
|
-
{
|
70
|
-
avatar: form.avatar,
|
71
|
-
remove_avatar: form.remove_avatar
|
72
|
-
}.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
|
66
|
+
).merge(
|
67
|
+
attachment_attributes(:avatar)
|
68
|
+
)
|
73
69
|
end
|
74
70
|
|
75
71
|
def update_conference_speaker!
|
@@ -35,8 +35,8 @@ module Decidim
|
|
35
35
|
attr_reader :form, :conference
|
36
36
|
|
37
37
|
def update_conference_diploma
|
38
|
-
@conference.main_logo = @form.main_logo
|
39
|
-
@conference.signature = @form.signature
|
38
|
+
@conference.main_logo = @form.main_logo if @form.main_logo.present?
|
39
|
+
@conference.signature = @form.signature if @form.signature.present?
|
40
40
|
@conference.signature_name = @form.signature_name
|
41
41
|
@conference.sign_date = @form.sign_date
|
42
42
|
|
@@ -6,13 +6,13 @@ module Decidim
|
|
6
6
|
# A command with all the business logic when updating a conference
|
7
7
|
# partner in the system.
|
8
8
|
class UpdatePartner < Rectify::Command
|
9
|
+
include ::Decidim::AttachmentAttributesMethods
|
10
|
+
|
9
11
|
# Public: Initializes the command.
|
10
12
|
#
|
11
13
|
# form - A form object with the params.
|
12
14
|
# conference_partner - The ConferencePartner to update
|
13
15
|
def initialize(form, conference_partner)
|
14
|
-
form.logo = conference_partner.logo if form.logo.blank?
|
15
|
-
|
16
16
|
@form = form
|
17
17
|
@conference_partner = conference_partner
|
18
18
|
end
|
@@ -54,9 +54,9 @@ module Decidim
|
|
54
54
|
:name,
|
55
55
|
:weight,
|
56
56
|
:partner_type,
|
57
|
-
:link
|
58
|
-
|
59
|
-
:
|
57
|
+
:link
|
58
|
+
).merge(
|
59
|
+
attachment_attributes(:logo)
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
@@ -41,9 +41,9 @@ module Decidim
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def edit
|
44
|
-
@
|
45
|
-
enforce_permission_to :update, :conference_speaker, speaker: @
|
46
|
-
@form = form(ConferenceSpeakerForm).from_model(@
|
44
|
+
@item = collection.find(params[:id])
|
45
|
+
enforce_permission_to :update, :conference_speaker, speaker: @item
|
46
|
+
@form = form(ConferenceSpeakerForm).from_model(@item)
|
47
47
|
end
|
48
48
|
|
49
49
|
def update
|
@@ -82,11 +82,7 @@ module Decidim
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def conference_params
|
85
|
-
{
|
86
|
-
id: params[:slug],
|
87
|
-
hero_image: current_conference.hero_image,
|
88
|
-
banner_image: current_conference.banner_image
|
89
|
-
}.merge(params[:conference].to_unsafe_h)
|
85
|
+
{ id: params[:slug] }.merge(params[:conference].to_unsafe_h)
|
90
86
|
end
|
91
87
|
end
|
92
88
|
end
|
@@ -16,7 +16,7 @@ module Decidim
|
|
16
16
|
def update
|
17
17
|
enforce_permission_to :update, :conference, conference: current_conference
|
18
18
|
|
19
|
-
@form = form(DiplomaForm).from_params(diploma_params).with_context(conference: current_conference)
|
19
|
+
@form = form(DiplomaForm).from_params(diploma_params).with_context(conference: current_conference, current_organization: current_organization)
|
20
20
|
|
21
21
|
UpdateDiploma.call(@form, current_conference) do
|
22
22
|
on(:ok) do
|
@@ -51,9 +51,7 @@ module Decidim
|
|
51
51
|
|
52
52
|
def diploma_params
|
53
53
|
{
|
54
|
-
id: params[:slug]
|
55
|
-
signature: current_conference.signature,
|
56
|
-
main_logo: current_conference.main_logo
|
54
|
+
id: params[:slug]
|
57
55
|
}.merge(params[:conference].to_unsafe_h)
|
58
56
|
end
|
59
57
|
end
|
@@ -25,9 +25,9 @@ module Decidim
|
|
25
25
|
attribute :scopes_enabled, Boolean
|
26
26
|
attribute :scope_id, Integer
|
27
27
|
attribute :hero_image
|
28
|
-
attribute :remove_hero_image
|
28
|
+
attribute :remove_hero_image, Boolean, default: false
|
29
29
|
attribute :banner_image
|
30
|
-
attribute :remove_banner_image
|
30
|
+
attribute :remove_banner_image, Boolean, default: false
|
31
31
|
attribute :show_statistics, Boolean
|
32
32
|
attribute :start_date, Decidim::Attributes::LocalizedDate
|
33
33
|
attribute :end_date, Decidim::Attributes::LocalizedDate
|
@@ -18,7 +18,7 @@ module Decidim
|
|
18
18
|
attribute :twitter_handle, String
|
19
19
|
attribute :personal_url, String
|
20
20
|
attribute :avatar
|
21
|
-
attribute :remove_avatar
|
21
|
+
attribute :remove_avatar, Boolean, default: false
|
22
22
|
attribute :user_id, Integer
|
23
23
|
attribute :existing_user, Boolean, default: false
|
24
24
|
attribute :conference_meeting_ids, Array[Integer]
|
@@ -14,10 +14,10 @@ module Decidim
|
|
14
14
|
attribute :partner_type, String
|
15
15
|
attribute :weight, Integer, default: 0
|
16
16
|
attribute :logo
|
17
|
-
attribute :remove_logo
|
17
|
+
attribute :remove_logo, Boolean, default: false
|
18
18
|
|
19
19
|
validates :name, :partner_type, presence: true, if: ->(form) { form.logo.present? }
|
20
|
-
validates :logo, presence: true, unless:
|
20
|
+
validates :logo, presence: true, unless: :persisted?
|
21
21
|
validates :logo, passthru: {
|
22
22
|
to: Decidim::Conferences::Partner,
|
23
23
|
with: {
|
@@ -55,17 +55,17 @@ module Decidim
|
|
55
55
|
validates :slug, uniqueness: { scope: :organization }
|
56
56
|
validates :slug, presence: true, format: { with: Decidim::Conference.slug_format }
|
57
57
|
|
58
|
-
|
59
|
-
|
58
|
+
has_one_attached :hero_image
|
59
|
+
validates_upload :hero_image, uploader: Decidim::HeroImageUploader
|
60
60
|
|
61
|
-
|
62
|
-
|
61
|
+
has_one_attached :banner_image
|
62
|
+
validates_upload :banner_image, uploader: Decidim::HomepageImageUploader
|
63
63
|
|
64
|
-
|
65
|
-
|
64
|
+
has_one_attached :main_logo
|
65
|
+
validates_upload :main_logo, uploader: Decidim::Conferences::DiplomaUploader
|
66
66
|
|
67
|
-
|
68
|
-
|
67
|
+
has_one_attached :signature
|
68
|
+
validates_upload :signature, uploader: Decidim::Conferences::DiplomaUploader
|
69
69
|
|
70
70
|
searchable_fields({
|
71
71
|
scope_id: :decidim_scope_id,
|
@@ -18,8 +18,8 @@ module Decidim
|
|
18
18
|
|
19
19
|
default_scope { order(full_name: :asc, created_at: :asc) }
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
has_one_attached :avatar
|
22
|
+
validates_avatar :avatar, uploader: Decidim::AvatarUploader
|
23
23
|
|
24
24
|
delegate :organization, to: :conference
|
25
25
|
|
@@ -14,8 +14,8 @@ module Decidim
|
|
14
14
|
|
15
15
|
default_scope { order(partner_type: :desc, weight: :asc) }
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
has_one_attached :logo
|
18
|
+
validates_avatar :logo, uploader: Decidim::Conferences::PartnerLogoUploader
|
19
19
|
|
20
20
|
delegate :organization, to: :conference
|
21
21
|
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
const { createFieldDependentInputs } = exports.DecidimAdmin;
|
1
|
+
import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component"
|
3
2
|
|
3
|
+
$(() => {
|
4
4
|
const $attendeeType = $('[name="conference_registration_invite[existing_user]"');
|
5
5
|
|
6
6
|
createFieldDependentInputs({
|
@@ -22,4 +22,4 @@
|
|
22
22
|
return $("#conference_registration_invite_existing_user_true").is(":checked")
|
23
23
|
}
|
24
24
|
});
|
25
|
-
})
|
25
|
+
})
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
const { createFieldDependentInputs } = exports.DecidimAdmin;
|
1
|
+
import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component"
|
3
2
|
|
3
|
+
$(() => {
|
4
4
|
const $conferenceSpeakerType = $("#conference_speaker_existing_user");
|
5
5
|
|
6
6
|
createFieldDependentInputs({
|
@@ -23,4 +23,4 @@
|
|
23
23
|
}
|
24
24
|
});
|
25
25
|
|
26
|
-
})
|
26
|
+
})
|
@@ -0,0 +1,27 @@
|
|
1
|
+
$(() => {
|
2
|
+
const $conferenceScopeEnabled = $("#conference_scopes_enabled");
|
3
|
+
const $conferenceScopeId = $("#conference_scope_id");
|
4
|
+
const $form = $(".edit_conference, .new_conference");
|
5
|
+
|
6
|
+
if ($form.length > 0) {
|
7
|
+
$conferenceScopeEnabled.on("change", (event) => {
|
8
|
+
const checked = event.target.checked;
|
9
|
+
window.theDataPicker.enabled($conferenceScopeId, checked);
|
10
|
+
})
|
11
|
+
window.theDataPicker.enabled($conferenceScopeId, $conferenceScopeEnabled.prop("checked"));
|
12
|
+
|
13
|
+
const $registrationsEnabled = $form.find("#conference_registrations_enabled");
|
14
|
+
const $availableSlots = $form.find("#conference_available_slots");
|
15
|
+
const toggleDisabledFields = () => {
|
16
|
+
const enabled = $registrationsEnabled.prop("checked");
|
17
|
+
$availableSlots.attr("disabled", !enabled);
|
18
|
+
|
19
|
+
$form.find("#conference_registrations_terms .editor-container").each((idx, node) => {
|
20
|
+
const quill = Quill.find(node);
|
21
|
+
quill.enable(enabled);
|
22
|
+
})
|
23
|
+
};
|
24
|
+
$registrationsEnabled.on("change", toggleDisabledFields);
|
25
|
+
toggleDisabledFields();
|
26
|
+
}
|
27
|
+
});
|