decidim-core 0.28.4 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/cells/decidim/activities_cell.rb +0 -1
- data/app/cells/decidim/activity_cell.rb +5 -7
- data/app/cells/decidim/address/online.erb +2 -2
- data/app/cells/decidim/address_cell.rb +3 -9
- data/app/cells/decidim/amendable/amend_button_card_cell.rb +0 -2
- data/app/cells/decidim/amendable/amendments_cell.rb +0 -2
- data/app/cells/decidim/amendable/announcement_cell.rb +10 -14
- data/app/cells/decidim/amendable/emendation_actions_cell.rb +0 -2
- data/app/cells/decidim/amendable/promote_button_card_cell.rb +0 -2
- data/app/cells/decidim/amendable/wizard_step_form_cell.rb +6 -19
- data/app/cells/decidim/announcement/show.erb +1 -1
- data/app/cells/decidim/announcement_cell.rb +6 -2
- data/app/cells/decidim/attachments_file_tab/show.erb +3 -0
- data/app/cells/decidim/attachments_file_tab_cell.rb +11 -0
- data/app/cells/decidim/attachments_link_tab/show.erb +12 -0
- data/app/cells/decidim/attachments_link_tab_cell.rb +21 -0
- data/app/cells/decidim/author/flag.erb +2 -2
- data/app/cells/decidim/author_cell.rb +0 -2
- data/app/cells/decidim/authorization_modal_cell.rb +0 -3
- data/app/cells/decidim/badge_cell.rb +0 -4
- data/app/cells/decidim/badges_cell.rb +0 -2
- data/app/cells/decidim/button_cell.rb +0 -3
- data/app/cells/decidim/card_cell.rb +1 -5
- data/app/cells/decidim/card_g/show.erb +1 -1
- data/app/cells/decidim/card_g_cell.rb +4 -7
- data/app/cells/decidim/card_l/image.erb +2 -2
- data/app/cells/decidim/card_l/space.erb +1 -1
- data/app/cells/decidim/card_l_cell.rb +3 -8
- data/app/cells/decidim/card_metadata_cell.rb +1 -5
- data/app/cells/decidim/card_s_cell.rb +1 -4
- data/app/cells/decidim/coauthorships_cell.rb +0 -2
- data/app/cells/decidim/comments_button_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/footer_sub_hero/show.erb +1 -1
- data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -3
- data/app/cells/decidim/content_blocks/hero/show.erb +1 -1
- data/app/cells/decidim/content_blocks/hero_cell.rb +1 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/how_to_participate/show.erb +1 -1
- data/app/cells/decidim/content_blocks/how_to_participate_cell.rb +0 -1
- data/app/cells/decidim/content_blocks/participatory_space_documents/content.erb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb +17 -1
- data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +2 -4
- data/app/cells/decidim/content_blocks/participatory_space_last_activity_cell.rb +1 -3
- data/app/cells/decidim/content_blocks/stats/show.erb +1 -1
- data/app/cells/decidim/content_blocks/stats_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -3
- data/app/cells/decidim/date_range/show.erb +10 -10
- data/app/cells/decidim/date_range_cell.rb +0 -2
- data/app/cells/decidim/diff_cell.rb +0 -1
- data/app/cells/decidim/documents_panel/show.erb +4 -0
- data/app/cells/decidim/documents_panel_cell.rb +9 -1
- data/app/cells/decidim/endorsement_buttons_cell.rb +6 -14
- data/app/cells/decidim/flag_modal/flag_user.erb +3 -3
- data/app/cells/decidim/followers_cell.rb +0 -1
- data/app/cells/decidim/following_cell.rb +0 -1
- data/app/cells/decidim/footer_topics/show.erb +8 -0
- data/app/cells/decidim/footer_topics_cell.rb +39 -0
- data/app/cells/decidim/groups_cell.rb +0 -3
- data/app/cells/decidim/linked_resources_for_cell.rb +0 -3
- data/app/cells/decidim/members_cell.rb +0 -1
- data/app/cells/decidim/nav_links/show.erb +3 -3
- data/app/cells/decidim/navbar_admin_link_cell.rb +0 -2
- data/app/cells/decidim/newsletter_templates/base_cell.rb +0 -1
- data/app/cells/decidim/newsletter_templates/basic_only_text/show.erb +2 -2
- data/app/cells/decidim/newsletter_templates/image_text_cta/show.erb +2 -2
- data/app/cells/decidim/notification/show.erb +5 -0
- data/app/cells/decidim/notification_actions/base_cell.rb +13 -0
- data/app/cells/decidim/notification_actions/buttons/show.erb +5 -0
- data/app/cells/decidim/notification_actions/buttons_cell.rb +41 -0
- data/app/cells/decidim/notification_cell.rb +9 -3
- data/app/cells/decidim/notifications_cell.rb +0 -1
- data/app/cells/decidim/pad_iframe/show.erb +2 -2
- data/app/cells/decidim/pad_iframe_cell.rb +0 -1
- data/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb +1 -2
- data/app/cells/decidim/photo_cell.rb +1 -5
- data/app/cells/decidim/photos_list_cell.rb +0 -2
- data/app/cells/decidim/profile_cell.rb +0 -2
- data/app/cells/decidim/profile_sidebar/show.erb +20 -20
- data/app/cells/decidim/profile_sidebar_cell.rb +1 -10
- data/app/cells/decidim/progress_bar/show.erb +8 -6
- data/app/cells/decidim/public_participation/show.erb +1 -1
- data/app/cells/decidim/report_button/flag_modal.erb +1 -1
- data/app/cells/decidim/resource_types_filter/show.erb +12 -11
- data/app/cells/decidim/resource_types_filter_cell.rb +0 -2
- data/app/cells/decidim/scopes_picker/show.erb +1 -1
- data/app/cells/decidim/scopes_picker_cell.rb +0 -1
- data/app/cells/decidim/search_results_cell.rb +1 -1
- data/app/cells/decidim/statistic_cell.rb +0 -2
- data/app/cells/decidim/tab_panels/show.erb +1 -1
- data/app/cells/decidim/tab_panels_cell.rb +12 -2
- data/app/cells/decidim/tags_cell.rb +0 -2
- data/app/cells/decidim/tos_page_cell.rb +0 -3
- data/app/cells/decidim/translation_bar/show.erb +1 -1
- data/app/cells/decidim/translation_bar_cell.rb +0 -2
- data/app/cells/decidim/upload_modal/files.erb +1 -1
- data/app/cells/decidim/upload_modal_cell.rb +1 -3
- data/app/cells/decidim/user_conversation/new.erb +1 -1
- data/app/cells/decidim/user_conversation/show.erb +1 -1
- data/app/cells/decidim/user_conversation_cell.rb +0 -1
- data/app/cells/decidim/user_conversations/show.erb +1 -1
- data/app/cells/decidim/user_conversations_cell.rb +0 -1
- data/app/cells/decidim/user_group_pending_invitations_list_cell.rb +0 -1
- data/app/cells/decidim/user_group_pending_requests_list_cell.rb +0 -1
- data/app/cells/decidim/user_timeline/show.erb +1 -1
- data/app/cells/decidim/version_cell.rb +3 -5
- data/app/cells/decidim/versions_list_cell.rb +1 -3
- data/app/cells/decidim/versions_list_item_cell.rb +2 -4
- data/app/cells/decidim/wizard_step_form/wizard_aside.erb +2 -2
- data/app/cells/decidim/wizard_step_form/wizard_header.erb +2 -3
- data/app/cells/decidim/wizard_step_form_cell.rb +0 -8
- data/app/commands/decidim/amendable/create_draft.rb +4 -4
- data/app/commands/decidim/amendable/promote.rb +3 -2
- data/app/commands/decidim/amendable/publish_draft.rb +3 -2
- data/app/commands/decidim/amendable/update_draft.rb +4 -3
- data/app/commands/decidim/amendable/withdraw.rb +1 -1
- data/app/commands/decidim/create_follow.rb +4 -4
- data/app/commands/decidim/create_omniauth_registration.rb +4 -10
- data/app/commands/decidim/create_report.rb +3 -3
- data/app/commands/decidim/create_user_report.rb +5 -5
- data/app/commands/decidim/delete_follow.rb +4 -4
- data/app/commands/decidim/demote_membership.rb +2 -2
- data/app/commands/decidim/destroy_account.rb +21 -19
- data/app/commands/decidim/endorse_resource.rb +1 -1
- data/app/commands/decidim/invite_user_to_group.rb +5 -4
- data/app/commands/decidim/update_account.rb +24 -22
- data/app/commands/decidim/update_notifications_settings.rb +13 -11
- data/app/commands/decidim/update_password.rb +7 -7
- data/app/commands/decidim/update_user_interests.rb +9 -7
- data/app/controllers/concerns/decidim/devise_authentication_methods.rb +1 -1
- data/app/controllers/concerns/decidim/devise_controllers.rb +2 -1
- data/app/controllers/concerns/decidim/filter_resource.rb +1 -1
- data/app/controllers/concerns/decidim/needs_rtl_direction.rb +23 -0
- data/app/controllers/concerns/decidim/paginable.rb +1 -1
- data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -23
- data/app/controllers/concerns/decidim/payload_info.rb +2 -1
- data/app/controllers/concerns/decidim/registers_permissions.rb +4 -4
- data/app/controllers/concerns/decidim/use_organization_time_zone.rb +1 -1
- data/app/controllers/concerns/decidim/withdrawable.rb +1 -1
- data/app/controllers/decidim/account_controller.rb +2 -2
- data/app/controllers/{concerns/decidim → decidim}/amendments_controller.rb +3 -16
- data/app/controllers/decidim/application_controller.rb +1 -1
- data/app/controllers/decidim/components/base_controller.rb +1 -1
- data/app/controllers/decidim/devise/invitations_controller.rb +1 -1
- data/app/controllers/decidim/devise/passwords_controller.rb +2 -2
- data/app/controllers/decidim/endorsements_controller.rb +1 -1
- data/app/controllers/decidim/favicon_controller.rb +1 -1
- data/app/controllers/decidim/follows_controller.rb +2 -2
- data/app/controllers/decidim/group_invites_controller.rb +36 -9
- data/app/controllers/decidim/newsletters_opt_in_controller.rb +1 -1
- data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
- data/app/controllers/decidim/report_users_controller.rb +1 -1
- data/app/controllers/decidim/reports_controller.rb +1 -1
- data/app/controllers/decidim/user_interests_controller.rb +1 -1
- data/app/events/decidim/change_nickname_event.rb +0 -1
- data/app/events/decidim/invited_to_group_event.rb +29 -0
- data/app/events/decidim/welcome_notification_event.rb +2 -4
- data/app/forms/decidim/form.rb +4 -0
- data/app/forms/decidim/omniauth_registration_form.rb +1 -1
- data/app/forms/decidim/upload_validation_form.rb +2 -2
- data/app/helpers/concerns/decidim/flash_helper_extensions.rb +1 -1
- data/app/helpers/decidim/amendments_helper.rb +4 -14
- data/app/helpers/decidim/application_helper.rb +8 -0
- data/app/helpers/decidim/authorization_form_helper.rb +2 -2
- data/app/helpers/decidim/breadcrumb_helper.rb +1 -1
- data/app/helpers/decidim/cells_helper.rb +1 -1
- data/app/helpers/decidim/check_boxes_tree_helper.rb +1 -1
- data/app/helpers/decidim/datalist_select_helper.rb +1 -1
- data/app/helpers/decidim/decidim_form_helper.rb +3 -3
- data/app/helpers/decidim/filters_helper.rb +1 -1
- data/app/helpers/decidim/layout_helper.rb +1 -64
- data/app/helpers/decidim/localized_locales_helper.rb +1 -1
- data/app/helpers/decidim/menu_helper.rb +9 -1
- data/app/helpers/decidim/meta_tags_helper.rb +26 -23
- data/app/helpers/decidim/modal_helper.rb +1 -1
- data/app/helpers/decidim/orders_helper.rb +1 -1
- data/app/helpers/decidim/organization_helper.rb +55 -0
- data/app/helpers/decidim/paginate_helper.rb +5 -3
- data/app/helpers/decidim/resource_helper.rb +0 -7
- data/app/helpers/decidim/scopes_helper.rb +3 -4
- data/app/helpers/decidim/searches_helper.rb +1 -1
- data/app/helpers/decidim/short_link_helper.rb +2 -2
- data/app/helpers/decidim/translations_helper.rb +2 -2
- data/app/helpers/decidim/twitter_search_helper.rb +1 -1
- data/app/helpers/decidim/user_profile_helper.rb +0 -1
- data/app/jobs/decidim/email_notifications_digest_generator_job.rb +2 -2
- data/app/mailers/decidim/application_mailer.rb +6 -2
- data/app/mailers/decidim/block_user_mailer.rb +1 -1
- data/app/mailers/decidim/decidim_devise_mailer.rb +7 -1
- data/app/mailers/decidim/newsletter_mailer.rb +1 -4
- data/app/mailers/decidim/newsletters_opt_in_mailer.rb +2 -2
- data/app/mailers/decidim/notification_mailer.rb +0 -1
- data/app/mailers/decidim/notifications_digest_mailer.rb +0 -1
- data/app/mailers/decidim/reported_mailer.rb +6 -3
- data/app/mailers/decidim/user_report_mailer.rb +1 -1
- data/app/models/decidim/action_log.rb +2 -12
- data/app/models/decidim/area_type.rb +1 -1
- data/app/models/decidim/attachment.rb +28 -4
- data/app/models/decidim/authorization.rb +1 -1
- data/app/models/decidim/authorization_transfer.rb +1 -0
- data/app/models/decidim/component.rb +3 -6
- data/app/models/decidim/content_block.rb +3 -3
- data/app/models/decidim/messaging/message.rb +2 -2
- data/app/models/decidim/newsletter.rb +9 -9
- data/app/models/decidim/notification.rb +2 -2
- data/app/models/decidim/organization.rb +23 -2
- data/app/models/decidim/push_notification_message.rb +1 -1
- data/app/models/decidim/resource_link.rb +1 -1
- data/app/models/decidim/user.rb +14 -14
- data/app/models/decidim/user_group.rb +2 -2
- data/app/packs/src/decidim/a11y.js +61 -11
- data/app/packs/src/decidim/append_redirect_url_to_modals.js +12 -14
- data/app/packs/src/decidim/attachments/file_or_link_tabs.js +55 -0
- data/app/packs/src/decidim/attachments/index.js +1 -0
- data/app/packs/src/decidim/back_to_list.js +1 -1
- data/app/packs/src/decidim/check_boxes_tree.js +1 -1
- data/app/packs/src/decidim/data_consent/consent_manager.js +1 -1
- data/app/packs/src/decidim/data_consent/consent_manager.test.js +6 -6
- data/app/packs/src/decidim/data_consent/index.js +1 -1
- data/app/packs/src/decidim/datepicker/datepicker_functions.js +243 -0
- data/app/packs/src/decidim/datepicker/datepicker_listeners.js +78 -0
- data/app/packs/src/decidim/datepicker/form_datepicker.js +91 -0
- data/app/packs/src/decidim/datepicker/generate_datepicker.js +148 -0
- data/app/packs/src/decidim/datepicker/generate_timepicker.js +298 -0
- data/app/packs/src/decidim/datepicker/test/date.test.js +118 -0
- data/app/packs/src/decidim/datepicker/test/time.test.js +227 -0
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +0 -3
- data/app/packs/src/decidim/editor/extensions/indent/index.js +1 -1
- data/app/packs/src/decidim/editor/extensions/video_embed/index.js +4 -4
- data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +0 -15
- data/app/packs/src/decidim/editor/test/extensions/indent.test.js +1 -1
- data/app/packs/src/decidim/editor/test/fixtures/upload_templates.js +1 -1
- data/app/packs/src/decidim/editor/test/helpers.js +1 -14
- data/app/packs/src/decidim/editor/utilities/paste_transform.js +2 -2
- data/app/packs/src/decidim/external_domain_warning.js +2 -2
- data/app/packs/src/decidim/external_domain_warning.test.js +4 -4
- data/app/packs/src/decidim/form_filter.js +4 -4
- data/app/packs/src/decidim/impersonation.js +1 -1
- data/app/packs/src/decidim/index.js +11 -5
- data/app/packs/src/decidim/input_character_counter.js +2 -2
- data/app/packs/src/decidim/input_emoji.js +171 -72
- data/app/packs/src/decidim/input_hashtags.js +1 -1
- data/app/packs/src/decidim/input_mentions.js +1 -1
- data/app/packs/src/decidim/notifications_actions.js +40 -0
- data/app/packs/src/decidim/sticky_header.js +87 -0
- data/app/packs/src/decidim/sw/sw.js +8 -6
- data/app/packs/src/decidim/tooltips.js +1 -1
- data/app/packs/stylesheets/decidim/_buttons.scss +1 -1
- data/app/packs/stylesheets/decidim/_datepicker.scss +193 -0
- data/app/packs/stylesheets/decidim/_dropdown.scss +45 -9
- data/app/packs/stylesheets/decidim/_emoji.scss +36 -0
- data/app/packs/stylesheets/decidim/_filters.scss +4 -2
- data/app/packs/stylesheets/decidim/_flash.scss +2 -2
- data/app/packs/stylesheets/decidim/_footer.scss +1 -3
- data/app/packs/stylesheets/decidim/_forms.scss +13 -5
- data/app/packs/stylesheets/decidim/_header.scss +70 -50
- data/app/packs/stylesheets/decidim/_home.scss +1 -1
- data/app/packs/stylesheets/decidim/_layout.scss +13 -0
- data/app/packs/stylesheets/decidim/_modal.scss +1 -1
- data/app/packs/stylesheets/decidim/_modal_update.scss +1 -5
- data/app/packs/stylesheets/decidim/_notifications.scss +4 -0
- data/app/packs/stylesheets/decidim/_tabs_x.scss +5 -1
- data/app/packs/stylesheets/decidim/_tooltip.scss +10 -10
- data/app/packs/stylesheets/decidim/application.scss +4 -0
- data/app/packs/stylesheets/decidim/editor.scss +1 -1
- data/app/packs/stylesheets/decidim/legacy/leaflet.scss +1 -1
- data/app/packs/stylesheets/decidim/vendor/_datepicker_light.scss +228 -0
- data/app/permissions/decidim/default_permissions.rb +2 -2
- data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -1
- data/app/presenters/decidim/admin_log/static_page_presenter.rb +1 -1
- data/app/presenters/decidim/authorization_transfer_presenter.rb +1 -1
- data/app/presenters/decidim/component_attachment_collection_presenter.rb +81 -0
- data/app/presenters/decidim/footer_menu_presenter.rb +1 -1
- data/app/presenters/decidim/home_stats_presenter.rb +1 -1
- data/app/presenters/decidim/menu_item_presenter.rb +1 -1
- data/app/presenters/decidim/organization_presenter.rb +1 -1
- data/app/queries/decidim/last_activity.rb +5 -16
- data/app/queries/decidim/metric_measure.rb +1 -1
- data/app/queries/decidim/public_activities.rb +1 -1
- data/app/queries/decidim/user_groups/admin_memberships.rb +1 -1
- data/app/queries/decidim/user_groups/member_memberships.rb +1 -1
- data/app/services/decidim/action_logger.rb +3 -3
- data/app/services/decidim/download_your_data_exporter.rb +25 -36
- data/app/services/decidim/log/diff_changeset_calculator.rb +2 -2
- data/app/services/decidim/notifications_digest_sending_decider.rb +1 -1
- data/app/services/decidim/open_data_exporter.rb +7 -8
- data/app/services/decidim/zip_stream/writer.rb +39 -0
- data/app/uploaders/decidim/organization_favicon_uploader.rb +1 -1
- data/app/uploaders/decidim/record_image_uploader.rb +2 -2
- data/app/validators/organization_present_validator.rb +1 -1
- data/app/validators/passthru_validator.rb +1 -1
- data/app/validators/uploader_image_dimensions_validator.rb +2 -2
- data/app/views/decidim/account/show.html.erb +1 -1
- data/app/views/decidim/amendments/_wizard_header.html.erb +1 -2
- data/app/views/decidim/application/_collection.html.erb +3 -1
- data/app/views/decidim/application/_component_documents.html.erb +4 -0
- data/app/views/decidim/application/_document.html.erb +23 -9
- data/app/views/decidim/block_user_mailer/notify.html.erb +2 -2
- data/app/views/decidim/devise/invitations/edit.html.erb +2 -2
- data/app/views/decidim/devise/omniauth_registrations/new.html.erb +2 -2
- data/app/views/decidim/devise/registrations/new.html.erb +1 -1
- data/app/views/decidim/devise/shared/_login_boxes.html.erb +1 -1
- data/app/views/decidim/doorkeeper/authorizations/new.html.erb +1 -1
- data/app/views/decidim/endorsements/_identity.html.erb +1 -1
- data/app/views/decidim/gamification/badges/index.html.erb +1 -1
- data/app/views/decidim/manifests/show.json.erb +4 -4
- data/app/views/decidim/messaging/conversations/_add_conversation_users.html.erb +2 -2
- data/app/views/decidim/messaging/conversations/_error_modal.html.erb +5 -5
- data/app/views/decidim/newsletter_mailer/newsletter.html.erb +1 -1
- data/app/views/decidim/newsletters/show.html.erb +1 -1
- data/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb +2 -2
- data/app/views/decidim/offline/show.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +3 -3
- data/app/views/decidim/pages/index.html.erb +1 -2
- data/app/views/decidim/reported_mailer/report.html.erb +4 -2
- data/app/views/decidim/scopes/picker.html.erb +5 -5
- data/app/views/decidim/searches/_resources_filter_block.html.erb +6 -6
- data/app/views/decidim/shared/_extended_navigation_bar.html.erb +8 -8
- data/app/views/decidim/shared/_filters.html.erb +5 -5
- data/app/views/decidim/shared/_login_modal.html.erb +1 -1
- data/app/views/decidim/shared/_orders.html.erb +2 -3
- data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -1
- data/app/views/decidim/shared/filters/_collection.html.erb +1 -1
- data/app/views/decidim/user_interests/_areas.html.erb +2 -2
- data/app/views/decidim/user_report_mailer/notify.html.erb +2 -2
- data/app/views/decidim/user_update_mailer/notify.html.erb +1 -1
- data/app/views/decidim/widgets/_data_picker.html.erb +1 -1
- data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
- data/app/views/devise/mailer/invitation_instructions.text.erb +1 -1
- data/app/views/devise/mailer/invite_admin.html.erb +2 -2
- data/app/views/devise/mailer/invite_admin.text.erb +2 -2
- data/app/views/devise/mailer/invite_collaborator.html.erb +2 -2
- data/app/views/devise/mailer/invite_collaborator.text.erb +2 -2
- data/app/views/devise/mailer/invite_private_user.html.erb +2 -2
- data/app/views/devise/mailer/invite_private_user.text.erb +2 -2
- data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
- data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +3 -6
- data/app/views/layouts/decidim/_data_consent_warning.html.erb +2 -2
- data/app/views/layouts/decidim/_decidim_javascript.html.erb +1 -1
- data/app/views/layouts/decidim/_head.html.erb +1 -1
- data/app/views/layouts/decidim/_head_extra.html.erb +2 -2
- data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
- data/app/views/layouts/decidim/_js_configuration.html.erb +7 -2
- data/app/views/layouts/decidim/_logo.html.erb +2 -2
- data/app/views/layouts/decidim/_logo_mobile.html.erb +11 -0
- data/app/views/layouts/decidim/_mailer_logo.html.erb +2 -2
- data/app/views/layouts/decidim/_meta_tags_config.html.erb +1 -1
- data/app/views/layouts/decidim/_wrapper.html.erb +16 -9
- data/app/views/layouts/decidim/footer/_main.html.erb +2 -3
- data/app/views/layouts/decidim/footer/_main_intro.html.erb +2 -2
- data/app/views/layouts/decidim/footer/_main_legal.html.erb +2 -3
- data/app/views/layouts/decidim/footer/_main_links.html.erb +13 -11
- data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +8 -8
- data/app/views/layouts/decidim/header/_main.html.erb +9 -22
- data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +4 -5
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +11 -4
- data/app/views/layouts/decidim/header/_main_links_mobile_item_account.html.erb +24 -0
- data/app/views/layouts/decidim/header/_main_links_mobile_search.html.erb +0 -21
- data/app/views/layouts/decidim/header/_main_menu_mobile.html.erb +12 -0
- data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb +17 -0
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_top_left.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb +16 -0
- data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +25 -0
- data/app/views/layouts/decidim/mailer.html.erb +2 -2
- data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_item.html.erb +0 -14
- data/app/views/layouts/decidim/shared/_layout_user_profile.html.erb +2 -2
- data/config/initializers/active_storage.rb +3 -0
- data/config/initializers/devise.rb +1 -1
- data/config/initializers/new_framework_defaults_7_0.rb +145 -0
- data/config/locales/ar.yml +3 -42
- data/config/locales/bg.yml +56 -57
- data/config/locales/ca.yml +69 -58
- data/config/locales/cs.yml +54 -58
- data/config/locales/de.yml +65 -54
- data/config/locales/el.yml +1 -29
- data/config/locales/en.yml +69 -58
- data/config/locales/es-MX.yml +68 -57
- data/config/locales/es-PY.yml +68 -57
- data/config/locales/es.yml +67 -56
- data/config/locales/eu.yml +71 -60
- data/config/locales/fi-plain.yml +70 -59
- data/config/locales/fi.yml +94 -83
- data/config/locales/fr-CA.yml +61 -56
- data/config/locales/fr.yml +56 -51
- data/config/locales/ga-IE.yml +0 -11
- data/config/locales/gl.yml +1 -18
- data/config/locales/hu.yml +37 -56
- data/config/locales/id-ID.yml +0 -14
- data/config/locales/is-IS.yml +0 -13
- data/config/locales/it.yml +0 -25
- data/config/locales/ja.yml +70 -59
- data/config/locales/lb.yml +0 -25
- data/config/locales/lt.yml +1 -48
- data/config/locales/lv.yml +0 -21
- data/config/locales/nl.yml +0 -24
- data/config/locales/no.yml +0 -25
- data/config/locales/pl.yml +68 -56
- data/config/locales/pt-BR.yml +5 -250
- data/config/locales/pt.yml +0 -25
- data/config/locales/ro-RO.yml +49 -89
- data/config/locales/ru.yml +0 -15
- data/config/locales/sk.yml +0 -21
- data/config/locales/sl.yml +0 -8
- data/config/locales/sv.yml +159 -600
- data/config/locales/tr-TR.yml +4 -27
- data/config/locales/uk.yml +0 -10
- data/config/locales/zh-CN.yml +0 -22
- data/config/locales/zh-TW.yml +1 -47
- data/config/routes.rb +0 -1
- data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +1 -1
- data/db/migrate/20181025082245_add_timestamps_to_components.rb +1 -5
- data/db/migrate/20240110150230_rename_external_domain_whitelist_to_external_domain_allowlist.rb +7 -0
- data/db/migrate/20240326104215_remove_show_in_footer_in_static_pages.rb +7 -0
- data/db/migrate/20240401192628_change_name_on_decidim_organizations.rb +31 -0
- data/db/seeds/avatars/001.jpg +0 -0
- data/db/seeds/avatars/002.jpg +0 -0
- data/db/seeds/avatars/003.jpg +0 -0
- data/db/seeds/avatars/004.jpg +0 -0
- data/db/seeds/avatars/005.jpg +0 -0
- data/db/seeds/avatars/006.jpg +0 -0
- data/db/seeds/avatars/007.jpg +0 -0
- data/db/seeds/avatars/008.jpg +0 -0
- data/db/seeds/avatars/009.jpg +0 -0
- data/db/seeds/avatars/010.jpg +0 -0
- data/db/seeds/avatars/011.jpg +0 -0
- data/db/seeds/avatars/012.jpg +0 -0
- data/db/seeds/avatars/013.jpg +0 -0
- data/db/seeds/avatars/014.jpg +0 -0
- data/db/seeds/avatars/015.jpg +0 -0
- data/db/seeds/avatars/016.jpg +0 -0
- data/db/seeds/avatars/017.jpg +0 -0
- data/db/seeds/avatars/018.jpg +0 -0
- data/db/seeds/avatars/019.jpg +0 -0
- data/db/seeds/avatars/020.jpg +0 -0
- data/db/seeds/avatars/021.jpg +0 -0
- data/db/seeds/avatars/022.jpg +0 -0
- data/db/seeds/avatars/023.jpg +0 -0
- data/db/seeds/avatars/024.jpg +0 -0
- data/db/seeds/avatars/025.jpg +0 -0
- data/db/seeds/avatars/026.jpg +0 -0
- data/db/seeds/avatars/027.jpg +0 -0
- data/db/seeds/avatars/028.jpg +0 -0
- data/db/seeds/avatars/029.jpg +0 -0
- data/db/seeds/avatars/030.jpg +0 -0
- data/db/seeds/avatars/031.jpg +0 -0
- data/db/seeds/avatars/032.jpg +0 -0
- data/db/seeds/avatars/033.jpg +0 -0
- data/db/seeds/avatars/034.jpg +0 -0
- data/db/seeds/avatars/035.jpg +0 -0
- data/db/seeds/avatars/036.jpg +0 -0
- data/db/seeds/avatars/037.jpg +0 -0
- data/db/seeds/avatars/038.jpg +0 -0
- data/db/seeds/avatars/039.jpg +0 -0
- data/db/seeds/avatars/040.jpg +0 -0
- data/db/seeds/avatars/041.jpg +0 -0
- data/db/seeds/avatars/042.jpg +0 -0
- data/db/seeds/avatars/043.jpg +0 -0
- data/db/seeds/avatars/044.jpg +0 -0
- data/db/seeds/avatars/045.jpg +0 -0
- data/db/seeds/avatars/046.jpg +0 -0
- data/db/seeds/avatars/047.jpg +0 -0
- data/db/seeds/avatars/048.jpg +0 -0
- data/db/seeds/avatars/049.jpg +0 -0
- data/db/seeds/avatars/050.jpg +0 -0
- data/db/seeds/avatars/051.jpg +0 -0
- data/db/seeds/avatars/052.jpg +0 -0
- data/db/seeds/avatars/053.jpg +0 -0
- data/db/seeds/avatars/054.jpg +0 -0
- data/db/seeds/avatars/055.jpg +0 -0
- data/db/seeds/avatars/056.jpg +0 -0
- data/db/seeds/avatars/057.jpg +0 -0
- data/db/seeds/avatars/058.jpg +0 -0
- data/db/seeds/avatars/059.jpg +0 -0
- data/db/seeds/avatars/060.jpg +0 -0
- data/db/seeds/avatars/061.jpg +0 -0
- data/db/seeds/avatars/062.jpg +0 -0
- data/db/seeds/avatars/063.jpg +0 -0
- data/db/seeds/avatars/064.jpg +0 -0
- data/db/seeds/avatars/065.jpg +0 -0
- data/db/seeds/avatars/066.jpg +0 -0
- data/db/seeds/avatars/067.jpg +0 -0
- data/db/seeds/avatars/068.jpg +0 -0
- data/db/seeds/avatars/069.jpg +0 -0
- data/db/seeds/avatars/070.jpg +0 -0
- data/db/seeds/avatars/071.jpg +0 -0
- data/db/seeds/avatars/072.jpg +0 -0
- data/db/seeds/avatars/073.jpg +0 -0
- data/db/seeds/avatars/074.jpg +0 -0
- data/db/seeds/avatars/075.jpg +0 -0
- data/db/seeds/avatars/076.jpg +0 -0
- data/db/seeds/avatars/077.jpg +0 -0
- data/db/seeds/avatars/078.jpg +0 -0
- data/db/seeds/avatars/079.jpg +0 -0
- data/db/seeds/avatars/080.jpg +0 -0
- data/db/seeds/avatars/081.jpg +0 -0
- data/db/seeds/avatars/082.jpg +0 -0
- data/db/seeds/avatars/083.jpg +0 -0
- data/db/seeds/avatars/084.jpg +0 -0
- data/db/seeds/avatars/085.jpg +0 -0
- data/db/seeds/avatars/086.jpg +0 -0
- data/db/seeds/avatars/087.jpg +0 -0
- data/db/seeds/avatars/088.jpg +0 -0
- data/db/seeds/avatars/089.jpg +0 -0
- data/db/seeds/avatars/090.jpg +0 -0
- data/db/seeds/avatars/091.jpg +0 -0
- data/db/seeds/avatars/092.jpg +0 -0
- data/db/seeds/avatars/093.jpg +0 -0
- data/db/seeds/avatars/094.jpg +0 -0
- data/db/seeds/avatars/095.jpg +0 -0
- data/db/seeds/avatars/096.jpg +0 -0
- data/db/seeds/avatars/097.jpg +0 -0
- data/db/seeds/avatars/098.jpg +0 -0
- data/db/seeds/avatars/099.jpg +0 -0
- data/db/seeds/avatars/100.jpg +0 -0
- data/db/seeds/avatars/CREDITS.md +114 -0
- data/db/seeds/avatars/README.md +25 -0
- data/decidim-core.gemspec +7 -5
- data/lib/decidim/acts_as_author.rb +1 -1
- data/lib/decidim/admin_filter.rb +44 -0
- data/lib/decidim/admin_filters_registry.rb +55 -0
- data/lib/decidim/amendable.rb +1 -2
- data/lib/decidim/api/functions/component_finder_base.rb +1 -1
- data/lib/decidim/api/functions/needs_api_filter_and_order.rb +3 -3
- data/lib/decidim/api/functions/participatory_space_finder_base.rb +1 -1
- data/lib/decidim/api/functions/participatory_space_list_base.rb +1 -1
- data/lib/decidim/api/input_filters/user_entity_input_filter.rb +3 -3
- data/lib/decidim/api/interfaces/author_interface.rb +1 -1
- data/lib/decidim/api/types/organization_type.rb +1 -1
- data/lib/decidim/api/types/user_group_type.rb +1 -1
- data/lib/decidim/api/types/user_type.rb +1 -1
- data/lib/decidim/asset_router/pipeline.rb +2 -2
- data/lib/decidim/asset_router/storage.rb +11 -214
- data/lib/decidim/assets/tailwind/instance.rb +1 -1
- data/lib/decidim/assets/tailwind/tailwind.config.js.erb +8 -3
- data/lib/decidim/attribute_object/model.rb +2 -2
- data/lib/decidim/attribute_object/type_resolver.rb +1 -3
- data/lib/decidim/attribute_object.rb +2 -2
- data/lib/decidim/attributes.rb +0 -4
- data/lib/decidim/authorable.rb +5 -0
- data/lib/decidim/command.rb +2 -2
- data/lib/decidim/commands/create_resource.rb +63 -0
- data/lib/decidim/commands/destroy_resource.rb +74 -0
- data/lib/decidim/commands/hook_error.rb +8 -0
- data/lib/decidim/commands/resource_handler.rb +85 -0
- data/lib/decidim/commands/update_resource.rb +64 -0
- data/lib/decidim/component_manifest.rb +3 -1
- data/lib/decidim/component_validator.rb +1 -1
- data/lib/decidim/content_blocks/has_related_components.rb +1 -1
- data/lib/decidim/content_parsers/resource_parser.rb +2 -2
- data/lib/decidim/content_processor.rb +1 -1
- data/lib/decidim/content_security_policy.rb +1 -1
- data/lib/decidim/core/engine.rb +12 -29
- data/lib/decidim/core/menu.rb +13 -3
- data/lib/decidim/core/seeds.rb +120 -147
- data/lib/decidim/core/test/factories.rb +24 -3
- data/lib/decidim/core/test/shared_examples/acts_as_author_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/amendable/withdraw_amendment_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/assembly_announcements_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/attachable_interface_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +88 -92
- data/lib/decidim/core/test/shared_examples/comments_reports_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/digest_mail_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/edit_link_shared_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/editor_shared_examples.rb +7 -7
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/follows_examples.rb +6 -11
- data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +4 -2
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +3 -2
- data/lib/decidim/core/test/shared_examples/has_contextual_help.rb +4 -4
- data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
- data/lib/decidim/core/test/shared_examples/logo_email.rb +1 -1
- data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +9 -9
- data/lib/decidim/core/test/shared_examples/map_examples.rb +5 -5
- data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +7 -7
- data/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/reports_examples.rb +5 -5
- data/lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb +10 -10
- data/lib/decidim/core/test/shared_examples/searchable_participatory_space_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +8 -8
- data/lib/decidim/core/test/shared_examples/share_link_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -1
- data/lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb +3 -3
- data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +15 -113
- data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +24 -17
- data/lib/decidim/dependency_resolver.rb +3 -3
- data/lib/decidim/diffy_extension.rb +1 -1
- data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +2 -1
- data/lib/decidim/engine_router.rb +2 -2
- data/lib/decidim/events/base_event.rb +19 -0
- data/lib/decidim/events/simple_event.rb +1 -0
- data/lib/decidim/exporters/export_manifest.rb +1 -1
- data/lib/decidim/faker/localized.rb +3 -3
- data/lib/decidim/form_builder.rb +4 -4
- data/lib/decidim/hashtag.rb +1 -1
- data/lib/decidim/jsonb_attributes.rb +4 -4
- data/lib/decidim/manifest_messages.rb +2 -2
- data/lib/decidim/organization_settings.rb +5 -8
- data/lib/decidim/paddable.rb +1 -1
- data/lib/decidim/participable.rb +1 -1
- data/lib/decidim/participatory_space_manifest.rb +1 -1
- data/lib/decidim/resourceable.rb +1 -1
- data/lib/decidim/search_resource_fields_mapper.rb +2 -2
- data/lib/decidim/searchable.rb +3 -3
- data/lib/decidim/seeds.rb +62 -0
- data/lib/decidim/stats_registry.rb +2 -2
- data/lib/decidim/translatable_attributes.rb +3 -3
- data/lib/decidim/translatable_resource.rb +1 -1
- data/lib/decidim/view_hooks.rb +1 -1
- data/lib/decidim/view_model.rb +5 -1
- data/lib/decidim/webpacker/esbuild.config.js +14 -0
- data/lib/decidim/webpacker/shakapacker.yml +2 -2
- data/lib/decidim/webpacker/tsconfig.json +11 -0
- data/lib/decidim/webpacker/webpack/custom.js +13 -35
- data/lib/devise/models/decidim_newsletterable.rb +1 -1
- data/lib/tasks/decidim_download_your_data_tasks.rake +2 -2
- data/lib/tasks/decidim_locales_tasks.rake +1 -1
- data/lib/tasks/decidim_mailers_tasks.rake +2 -2
- data/lib/tasks/decidim_metrics_tasks.rake +6 -6
- data/lib/tasks/decidim_procfile.rake +9 -3
- data/lib/tasks/decidim_tasks.rake +5 -4
- data/lib/tasks/decidim_webpacker_tasks.rake +126 -117
- data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +80 -0
- data/lib/tasks/upgrade/decidim_content_blocks_tasks.rake +50 -0
- data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +1 -1
- data/lib/tasks/upgrade/decidim_fix_categorization.rake +0 -100
- data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
- data/lib/tasks/upgrade/decidim_fix_short_url_resolver.rake +1 -1
- data/lib/tasks/upgrade/decidim_moderation_tasks.rake +1 -1
- data/lib/tasks/upgrade/decidim_user_moderation.rake +1 -1
- metadata +218 -79
- data/app/cells/decidim/content_blocks/cta/show.erb +0 -12
- data/app/cells/decidim/content_blocks/cta_cell.rb +0 -31
- data/app/cells/decidim/footer_pages/pages.erb +0 -3
- data/app/cells/decidim/footer_pages/topics.erb +0 -12
- data/app/cells/decidim/footer_pages_cell.rb +0 -68
- data/app/controllers/concerns/decidim/direct_upload.rb +0 -82
- data/app/packs/src/decidim/vendor/modernizr.js +0 -5
- data/app/queries/decidim/similar_emendations.rb +0 -56
- data/app/uploaders/decidim/cw/application_uploader.rb +0 -77
- data/app/uploaders/decidim/cw/attachment_uploader.rb +0 -56
- data/app/uploaders/decidim/cw/avatar_uploader.rb +0 -24
- data/app/uploaders/decidim/cw/banner_image_uploader.rb +0 -7
- data/app/uploaders/decidim/cw/download_your_data_uploader.rb +0 -15
- data/app/uploaders/decidim/cw/downloader.rb +0 -9
- data/app/uploaders/decidim/cw/hero_image_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/homepage_image_uploader.rb +0 -14
- data/app/uploaders/decidim/cw/image_uploader.rb +0 -78
- data/app/uploaders/decidim/cw/newsletter_template_image_uploader.rb +0 -38
- data/app/uploaders/decidim/cw/oauth_application_logo_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/official_image_footer_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/official_image_header_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/open_data_uploader.rb +0 -23
- data/app/uploaders/decidim/cw/organization_favicon_uploader.rb +0 -18
- data/app/uploaders/decidim/cw/organization_logo_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/record_image_uploader.rb +0 -15
- data/app/uploaders/decidim/downloader.rb +0 -9
- data/app/views/decidim/amendments/compare_draft.html.erb +0 -18
- data/app/views/layouts/decidim/_edit_link.html.erb +0 -0
- data/app/views/layouts/decidim/header/_main_links_mobile.html.erb +0 -36
- data/config/initializers/carrierwave.rb +0 -15
- data/lib/decidim/carrier_wave_migrator_service.rb +0 -287
- data/lib/decidim/seven_zip_wrapper.rb +0 -29
- data/lib/tasks/decidim_active_storage_migration_tasks.rake +0 -114
- data/lib/tasks/decidim_content_blocks_tasks.rake +0 -48
- data/lib/tasks/upgrade/decidim_attachments.rake +0 -14
- /data/app/views/layouts/decidim/header/{_menu_breadcrumb_main_dropdown.html.erb → _menu_breadcrumb_main_dropdown_desktop.html.erb} +0 -0
@@ -9,6 +9,7 @@ module Decidim
|
|
9
9
|
include Traceable
|
10
10
|
|
11
11
|
before_save :set_content_type_and_size, if: :attached?
|
12
|
+
before_validation :set_link_content_type_and_size, if: :link?
|
12
13
|
|
13
14
|
translatable_fields :title, :description
|
14
15
|
belongs_to :attachment_collection, class_name: "Decidim::AttachmentCollection", optional: true
|
@@ -61,15 +62,33 @@ module Decidim
|
|
61
62
|
!photo?
|
62
63
|
end
|
63
64
|
|
65
|
+
# Whether this attachment is a link or not.
|
66
|
+
#
|
67
|
+
# Returns Boolean.
|
68
|
+
def link?
|
69
|
+
link.present?
|
70
|
+
end
|
71
|
+
|
64
72
|
# Which kind of file this is.
|
65
73
|
#
|
66
74
|
# Returns String.
|
67
75
|
def file_type
|
68
|
-
|
76
|
+
if file?
|
77
|
+
url&.split(".")&.last&.downcase
|
78
|
+
elsif link?
|
79
|
+
"link"
|
80
|
+
end
|
69
81
|
end
|
70
82
|
|
83
|
+
# The URL that points to the attachment
|
84
|
+
#
|
85
|
+
# Returns String.
|
71
86
|
def url
|
72
|
-
|
87
|
+
if file?
|
88
|
+
attached_uploader(:file).path
|
89
|
+
elsif link?
|
90
|
+
link
|
91
|
+
end
|
73
92
|
end
|
74
93
|
|
75
94
|
# The URL to download the thumbnail of the file. Only works with images.
|
@@ -78,7 +97,7 @@ module Decidim
|
|
78
97
|
def thumbnail_url
|
79
98
|
return unless photo?
|
80
99
|
|
81
|
-
|
100
|
+
attached_uploader(:file).path(variant: :thumbnail)
|
82
101
|
end
|
83
102
|
|
84
103
|
# The URL to download the a big version of the file. Only works with images.
|
@@ -87,7 +106,7 @@ module Decidim
|
|
87
106
|
def big_url
|
88
107
|
return unless photo?
|
89
108
|
|
90
|
-
|
109
|
+
attached_uploader(:file).path(variant: :big)
|
91
110
|
end
|
92
111
|
|
93
112
|
def set_content_type_and_size
|
@@ -95,6 +114,11 @@ module Decidim
|
|
95
114
|
self.file_size = file.byte_size
|
96
115
|
end
|
97
116
|
|
117
|
+
def set_link_content_type_and_size
|
118
|
+
self.content_type = "text/uri-list"
|
119
|
+
self.file_size = 0
|
120
|
+
end
|
121
|
+
|
98
122
|
def self.log_presenter_class_for(_log)
|
99
123
|
Decidim::AdminLog::AttachmentPresenter
|
100
124
|
end
|
@@ -101,7 +101,7 @@ module Decidim
|
|
101
101
|
@workflow_manifest ||= Decidim::Verifications.find_workflow_manifest(name)
|
102
102
|
end
|
103
103
|
|
104
|
-
# Calculates when this authorization can be
|
104
|
+
# Calculates when this authorization can be reset, if desired.
|
105
105
|
#
|
106
106
|
# **time_between_renewals** is defined in `workflow_manifest.time_between_renewals`
|
107
107
|
# defaults to 1 day
|
@@ -14,10 +14,7 @@ module Decidim
|
|
14
14
|
|
15
15
|
belongs_to :participatory_space, polymorphic: true
|
16
16
|
|
17
|
-
|
18
|
-
scope :registered_space_manifests, -> { where(participatory_space_type: Decidim.participatory_space_registry.manifests.collect(&:model_class_name)) }
|
19
|
-
|
20
|
-
default_scope { registered_component_manifests.registered_space_manifests.order(arel_table[:weight].asc, arel_table[:manifest_name].asc) }
|
17
|
+
default_scope { order(arel_table[:weight].asc, arel_table[:manifest_name].asc) }
|
21
18
|
|
22
19
|
delegate :organization, :categories, to: :participatory_space
|
23
20
|
|
@@ -59,8 +56,8 @@ module Decidim
|
|
59
56
|
# Public: The hash of contextual params when the component is mounted.
|
60
57
|
def mounted_params
|
61
58
|
{
|
62
|
-
host
|
63
|
-
component_id
|
59
|
+
:host => organization.host,
|
60
|
+
:component_id => id,
|
64
61
|
"#{participatory_space.underscored_name}_slug".to_sym => participatory_space.slug
|
65
62
|
}
|
66
63
|
end
|
@@ -60,8 +60,8 @@ module Decidim
|
|
60
60
|
#
|
61
61
|
# # This is how you can access the image data, just like with any other
|
62
62
|
# # uploader field. You can use the uploader variants too.
|
63
|
-
# content_block.images_container.attached_uploader(:my_image).
|
64
|
-
# content_block.images_container.attached_uploader(:my_image).
|
63
|
+
# content_block.images_container.attached_uploader(:my_image).path
|
64
|
+
# content_block.images_container.attached_uploader(:my_image).path(variant: :big)
|
65
65
|
#
|
66
66
|
# # This will delete the attached image
|
67
67
|
# content_block.images_container.my_image = nil
|
@@ -134,7 +134,7 @@ module Decidim
|
|
134
134
|
images_container.save
|
135
135
|
end
|
136
136
|
|
137
|
-
# On instance reloading we need to remove the `
|
137
|
+
# On instance reloading we need to remove the `images_container` cached
|
138
138
|
# class so it gets regenerated with the new values.
|
139
139
|
def reload_images
|
140
140
|
@images_container = nil
|
@@ -34,7 +34,7 @@ module Decidim
|
|
34
34
|
|
35
35
|
#
|
36
36
|
# Associates receipts for this message for each of the given users,
|
37
|
-
# including also a receipt for the
|
37
|
+
# including also a receipt for the remittant (sender) of the message.
|
38
38
|
# Receipts are unread by default, except for the sender's receipt.
|
39
39
|
#
|
40
40
|
# If the sender is a UserGroup then receipts will be created for its managers
|
@@ -64,7 +64,7 @@ module Decidim
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
-
# returns all
|
67
|
+
# returns all possible recipients from a list of users or groups
|
68
68
|
def all_recipients(recipients)
|
69
69
|
users = recipients.flat_map do |recipient|
|
70
70
|
recipient.is_a?(UserGroup) ? recipient.managers : recipient
|
@@ -46,7 +46,7 @@ module Decidim
|
|
46
46
|
extended_data["send_to_participants"]
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
49
|
+
def sent_to_participatory_spaces
|
50
50
|
extended_data["participatory_space_types"]
|
51
51
|
end
|
52
52
|
|
@@ -56,16 +56,16 @@ module Decidim
|
|
56
56
|
.find_by(scoped_resource_id: id)
|
57
57
|
end
|
58
58
|
|
59
|
-
def url(**
|
60
|
-
proxy_url(:newsletter_url, id:, **
|
59
|
+
def url(**)
|
60
|
+
proxy_url(:newsletter_url, id:, **)
|
61
61
|
end
|
62
62
|
|
63
|
-
def notifications_settings_url(**
|
64
|
-
proxy_url(__method__, **
|
63
|
+
def notifications_settings_url(**)
|
64
|
+
proxy_url(__method__, **)
|
65
65
|
end
|
66
66
|
|
67
|
-
def unsubscribe_newsletters_url(**
|
68
|
-
proxy_url(__method__, **
|
67
|
+
def unsubscribe_newsletters_url(**)
|
68
|
+
proxy_url(__method__, **)
|
69
69
|
end
|
70
70
|
|
71
71
|
def organization_official_url
|
@@ -82,10 +82,10 @@ module Decidim
|
|
82
82
|
errors.add(:author, :invalid) unless author.organization == organization
|
83
83
|
end
|
84
84
|
|
85
|
-
def proxy_url(method, **
|
85
|
+
def proxy_url(method, **)
|
86
86
|
return "#" unless sent?
|
87
87
|
|
88
|
-
router.public_send(method, host: organization.host, **
|
88
|
+
router.public_send(method, host: organization.host, **)
|
89
89
|
end
|
90
90
|
|
91
91
|
def router
|
@@ -9,12 +9,12 @@ module Decidim
|
|
9
9
|
|
10
10
|
# Daily notifications should contain all notifications within the previous
|
11
11
|
# day from the given day.
|
12
|
-
scope :daily, ->(time
|
12
|
+
scope :daily, ->(time = Time.now.utc) { where(created_at: (time - 1.day).all_day) }
|
13
13
|
|
14
14
|
# Weekly notifications should contain all notifications within the previous
|
15
15
|
# week counting from the end of the previous day until the start of the day
|
16
16
|
# 1 week ago from the previous day.
|
17
|
-
scope :weekly, lambda { |time
|
17
|
+
scope :weekly, lambda { |time = Time.now.utc|
|
18
18
|
end_of_previous_day = (time - 1.day).end_of_day
|
19
19
|
where(created_at: (end_of_previous_day - 7.days).beginning_of_day..end_of_previous_day)
|
20
20
|
}
|
@@ -15,7 +15,7 @@ module Decidim
|
|
15
15
|
SOCIAL_HANDLERS = [:twitter, :facebook, :instagram, :youtube, :github].freeze
|
16
16
|
AVAILABLE_MACHINE_TRANSLATION_DISPLAY_PRIORITIES = %w(original translation).freeze
|
17
17
|
|
18
|
-
translatable_fields :description, :cta_button_text, :omnipresent_banner_title, :omnipresent_banner_short_description,
|
18
|
+
translatable_fields :name, :description, :cta_button_text, :omnipresent_banner_title, :omnipresent_banner_short_description,
|
19
19
|
:highlighted_content_banner_title, :highlighted_content_banner_short_description, :highlighted_content_banner_action_title,
|
20
20
|
:highlighted_content_banner_action_subtitle, :welcome_notification_subject, :welcome_notification_body, :id_documents_explanation_text,
|
21
21
|
:admin_terms_of_service_body
|
@@ -41,7 +41,7 @@ module Decidim
|
|
41
41
|
# disable: Users cannot register or sign in.
|
42
42
|
enum users_registration_mode: [:enabled, :existing, :disabled], _prefix: true
|
43
43
|
|
44
|
-
validates :
|
44
|
+
validates :host, uniqueness: true
|
45
45
|
validates :reference_prefix, presence: true
|
46
46
|
validates :time_zone, presence: true, time_zone: true
|
47
47
|
validates :default_locale, inclusion: { in: :available_locales }
|
@@ -60,6 +60,27 @@ module Decidim
|
|
60
60
|
|
61
61
|
has_one_attached :open_data_file
|
62
62
|
|
63
|
+
validate :unique_name
|
64
|
+
|
65
|
+
def unique_name
|
66
|
+
base_query = new_record? ? Decidim::Organization.all : Decidim::Organization.where.not(id:).all
|
67
|
+
|
68
|
+
organization_names = []
|
69
|
+
|
70
|
+
base_query.pluck(:name).each do |value|
|
71
|
+
organization_names += value.except("machine_translations").values
|
72
|
+
organization_names += value.fetch("machine_translations", {}).values
|
73
|
+
end
|
74
|
+
|
75
|
+
organization_names = organization_names.map(&:downcase).compact_blank
|
76
|
+
|
77
|
+
name.each do |language, value|
|
78
|
+
next if value.is_a?(Hash)
|
79
|
+
|
80
|
+
errors.add("name_#{language}", :taken) if organization_names.include?(value.downcase)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
63
84
|
def self.log_presenter_class_for(_log)
|
64
85
|
Decidim::AdminLog::OrganizationPresenter
|
65
86
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
# A
|
4
|
+
# A message from a conversation that will be sent as a push notification
|
5
5
|
class PushNotificationMessage
|
6
6
|
class InvalidActionError < StandardError; end
|
7
7
|
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
# In order to group the relations between resources you need to specify a name.
|
8
8
|
#
|
9
9
|
# Some examples could be: proposals that have been created in a meeting or
|
10
|
-
# projects that are a result of merging
|
10
|
+
# projects that are a result of merging different proposals.
|
11
11
|
class ResourceLink < ApplicationRecord
|
12
12
|
belongs_to :from, polymorphic: true
|
13
13
|
belongs_to :to, polymorphic: true
|
data/app/models/decidim/user.rb
CHANGED
@@ -278,18 +278,6 @@ module Decidim
|
|
278
278
|
false
|
279
279
|
end
|
280
280
|
|
281
|
-
def after_confirmation
|
282
|
-
return unless organization.send_welcome_notification?
|
283
|
-
|
284
|
-
Decidim::EventsManager.publish(
|
285
|
-
event: "decidim.events.core.welcome_notification",
|
286
|
-
event_class: WelcomeNotificationEvent,
|
287
|
-
resource: self,
|
288
|
-
affected_users: [self],
|
289
|
-
extra: { force_email: true }
|
290
|
-
)
|
291
|
-
end
|
292
|
-
|
293
281
|
protected
|
294
282
|
|
295
283
|
# Overrides devise email required validation.
|
@@ -308,11 +296,23 @@ module Decidim
|
|
308
296
|
super
|
309
297
|
end
|
310
298
|
|
299
|
+
def after_confirmation
|
300
|
+
return unless organization.send_welcome_notification?
|
301
|
+
|
302
|
+
Decidim::EventsManager.publish(
|
303
|
+
event: "decidim.events.core.welcome_notification",
|
304
|
+
event_class: WelcomeNotificationEvent,
|
305
|
+
resource: self,
|
306
|
+
affected_users: [self],
|
307
|
+
extra: { force_email: true }
|
308
|
+
)
|
309
|
+
end
|
310
|
+
|
311
311
|
private
|
312
312
|
|
313
313
|
# Changes default Devise behaviour to use ActiveJob to send async emails.
|
314
|
-
def send_devise_notification(notification, *
|
315
|
-
devise_mailer.send(notification, self, *
|
314
|
+
def send_devise_notification(notification, *)
|
315
|
+
devise_mailer.send(notification, self, *).deliver_later
|
316
316
|
end
|
317
317
|
|
318
318
|
def all_roles_are_valid
|
@@ -202,13 +202,13 @@ module Decidim
|
|
202
202
|
document_number.present?
|
203
203
|
end
|
204
204
|
|
205
|
-
#
|
205
|
+
# Overrides method in `Decidim::Validatable`, as user groups do not have a
|
206
206
|
# password.
|
207
207
|
def password_required?
|
208
208
|
false
|
209
209
|
end
|
210
210
|
|
211
|
-
#
|
211
|
+
# Overrides method in `Decidim::Validatable`, as user groups do not have a
|
212
212
|
# password.
|
213
213
|
def password
|
214
214
|
nil
|
@@ -59,6 +59,7 @@ const createDropdown = (component) => {
|
|
59
59
|
const dropdownOptions = {};
|
60
60
|
dropdownOptions.dropdown = component.dataset.target;
|
61
61
|
dropdownOptions.hover = component.dataset.hover === "true";
|
62
|
+
dropdownOptions.isOpen = component.dataset.open === "true";
|
62
63
|
dropdownOptions.autoClose = component.dataset.autoClose === "true";
|
63
64
|
|
64
65
|
// This snippet allows to disable the dropdown based on the current viewport
|
@@ -77,17 +78,6 @@ const createDropdown = (component) => {
|
|
77
78
|
return
|
78
79
|
}
|
79
80
|
|
80
|
-
dropdownOptions.isOpen = component.dataset.open === "true";
|
81
|
-
|
82
|
-
const isOpen = Object.keys(screens).some((key) => {
|
83
|
-
if (!isScreenSize(key)) {
|
84
|
-
return false;
|
85
|
-
}
|
86
|
-
return Boolean(component.dataset[`open-${key}`.replace(/-([a-z])/g, (str) => str[1].toUpperCase())]);
|
87
|
-
});
|
88
|
-
|
89
|
-
dropdownOptions.isOpen = dropdownOptions.isOpen || isOpen;
|
90
|
-
|
91
81
|
if (!component.id) {
|
92
82
|
// when component has no id, we enforce to have it one
|
93
83
|
component.id = `dropdown-${Math.random().toString(36).substring(7)}`
|
@@ -114,6 +104,20 @@ const createDropdown = (component) => {
|
|
114
104
|
});
|
115
105
|
}
|
116
106
|
|
107
|
+
// Disable focus on children elements so we can pass the AXE accessibility tests
|
108
|
+
const dropdownMenu = document.getElementById(dropdownOptions.dropdown);
|
109
|
+
if (dropdownMenu.getAttribute("aria-hidden") === "true") {
|
110
|
+
dropdownMenu.
|
111
|
+
querySelectorAll("a, input, button").
|
112
|
+
forEach((element) => { element.tabIndex = -1 })
|
113
|
+
}
|
114
|
+
|
115
|
+
component.addEventListener("click", () => {
|
116
|
+
dropdownMenu.
|
117
|
+
querySelectorAll("a, input, button").
|
118
|
+
forEach((element) => { element.tabIndex = 0 })
|
119
|
+
})
|
120
|
+
|
117
121
|
Dropdowns.render(component.id, dropdownOptions);
|
118
122
|
}
|
119
123
|
|
@@ -186,10 +190,56 @@ const createDialog = (component) => {
|
|
186
190
|
})
|
187
191
|
}
|
188
192
|
|
193
|
+
/**
|
194
|
+
* Announces a message to the screen reader dynamically.
|
195
|
+
*
|
196
|
+
* This should not be called consecutively multiple times because the screen
|
197
|
+
* reader may not read all the messages if the content is changed quickly.
|
198
|
+
*
|
199
|
+
* @param {String} message The message to be announced
|
200
|
+
* @param {String} mode The mode for the announcement, either "assertive"
|
201
|
+
* (default) or "polite".
|
202
|
+
* @return {void}
|
203
|
+
*/
|
204
|
+
const announceForScreenReader = (message, mode = "assertive") => {
|
205
|
+
if (!message || typeof message !== "string" || message.length < 1) {
|
206
|
+
return;
|
207
|
+
}
|
208
|
+
|
209
|
+
let element = document.getElementById("screen-reader-announcement");
|
210
|
+
if (!element) {
|
211
|
+
element = document.createElement("div");
|
212
|
+
element.setAttribute("id", "screen-reader-announcement");
|
213
|
+
element.classList.add("sr-only");
|
214
|
+
element.setAttribute("aria-atomic", true);
|
215
|
+
document.body.append(element);
|
216
|
+
}
|
217
|
+
if (mode === "polite") {
|
218
|
+
element.setAttribute("aria-live", mode);
|
219
|
+
} else {
|
220
|
+
element.setAttribute("aria-live", "assertive");
|
221
|
+
}
|
222
|
+
|
223
|
+
element.innerHTML = "";
|
224
|
+
|
225
|
+
setTimeout(() => {
|
226
|
+
// Wrap the text in a span with a random attribute value that changes every
|
227
|
+
// time to try to indicate to the screen reader the content has changed. This
|
228
|
+
// helps reading the message aloud if the message is exactly the same as the
|
229
|
+
// last time.
|
230
|
+
const randomIdentifier = `announcement-${new Date().getUTCMilliseconds()}-${Math.floor(Math.random() * 10000000)}`;
|
231
|
+
const announce = document.createElement("span")
|
232
|
+
announce.setAttribute("data-random", randomIdentifier);
|
233
|
+
announce.textContent = message;
|
234
|
+
element.append(announce);
|
235
|
+
}, 100);
|
236
|
+
};
|
237
|
+
|
189
238
|
export {
|
190
239
|
createAccordion,
|
191
240
|
createDialog,
|
192
241
|
createDropdown,
|
242
|
+
announceForScreenReader,
|
193
243
|
Accordions,
|
194
244
|
Dialogs,
|
195
245
|
Dropdowns
|
@@ -53,23 +53,21 @@ $(() => {
|
|
53
53
|
}
|
54
54
|
|
55
55
|
$(document).on("click.zf.trigger", (event) => {
|
56
|
-
const target = `#${$(event.target).data("
|
56
|
+
const target = `#${$(event.target).data("open")}`;
|
57
57
|
const redirectUrl = $(event.target).data("redirectUrl");
|
58
58
|
|
59
|
-
if (
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
attr("name", "redirect_url").
|
66
|
-
attr("value", redirectUrl).
|
67
|
-
appendTo(`${target} form`);
|
59
|
+
if (target && redirectUrl) {
|
60
|
+
$("<input type='hidden' />").
|
61
|
+
attr("id", "redirect_url").
|
62
|
+
attr("name", "redirect_url").
|
63
|
+
attr("value", redirectUrl).
|
64
|
+
appendTo(`${target} form`);
|
68
65
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
66
|
+
$(`${target} a`).attr("href", (index, href) => {
|
67
|
+
const querystring = jQuery.param({"redirect_url": redirectUrl});
|
68
|
+
return href + (href.match(/\?/) ? "&" : "?") + querystring;
|
69
|
+
});
|
70
|
+
}
|
73
71
|
});
|
74
72
|
|
75
73
|
$(document).on("closed.zf.reveal", (event) => {
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/**
|
2
|
+
* This file controls the behavior of the |File| and |Link| tabs in the
|
3
|
+
* attachment form. It disables the |File| tab when a link is present and
|
4
|
+
* vice versa.
|
5
|
+
*/
|
6
|
+
|
7
|
+
const getFileButton = (container) =>
|
8
|
+
container.querySelector("button#trigger-file");
|
9
|
+
const getLinkButton = (container) =>
|
10
|
+
container.querySelector("button#trigger-link");
|
11
|
+
const getLinkInput = (container) =>
|
12
|
+
container.querySelector("input#attachment_link");
|
13
|
+
const getUploadsContainer = (container) =>
|
14
|
+
container.querySelector("div[data-active-uploads]");
|
15
|
+
|
16
|
+
const hasUploads = (container) => container.querySelectorAll("div").length > 0;
|
17
|
+
|
18
|
+
const updateTabsState = (container) => {
|
19
|
+
const fileButton = getFileButton(container);
|
20
|
+
const linkButton = getLinkButton(container);
|
21
|
+
const linkInput = getLinkInput(container);
|
22
|
+
const uploadsContainer = getUploadsContainer(container);
|
23
|
+
|
24
|
+
const disableFileButton = Boolean(linkInput?.value);
|
25
|
+
const disableLinkButton = hasUploads(uploadsContainer);
|
26
|
+
|
27
|
+
fileButton.disabled = disableFileButton;
|
28
|
+
linkButton.disabled = disableLinkButton;
|
29
|
+
};
|
30
|
+
|
31
|
+
const initializeTabs = (container) => {
|
32
|
+
const linkInput = getLinkInput(container);
|
33
|
+
const uploadsContainer = getUploadsContainer(container);
|
34
|
+
|
35
|
+
linkInput.addEventListener("change", () => {
|
36
|
+
updateTabsState(container);
|
37
|
+
});
|
38
|
+
|
39
|
+
uploadsContainer.addEventListener("DOMSubtreeModified", () => {
|
40
|
+
updateTabsState(container);
|
41
|
+
console.log("DOMSubtreeModified");
|
42
|
+
});
|
43
|
+
|
44
|
+
updateTabsState(container);
|
45
|
+
};
|
46
|
+
|
47
|
+
document.addEventListener("DOMContentLoaded", () => {
|
48
|
+
const tabs = document.querySelectorAll(
|
49
|
+
"div[data-file-or-link-tabs-controller]"
|
50
|
+
);
|
51
|
+
|
52
|
+
tabs.forEach((container) => {
|
53
|
+
initializeTabs(container);
|
54
|
+
});
|
55
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
import "src/decidim/attachments/file_or_link_tabs"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* Changes "Back to list" links to the one saved in sessionStorage API
|
3
3
|
* To apply this to a link, at least one element must have the class "js-back-to-list".
|
4
4
|
* For this to work it needs the filteredParams in SessionStorage, that is saved on FormFilterComponent.
|
5
|
-
* @param {NodeList} links - Hyperlinks elements that point to the filters page that will use the
|
5
|
+
* @param {NodeList} links - Hyperlinks elements that point to the filters page that will use the filtered params
|
6
6
|
* @returns {void}
|
7
7
|
*/
|
8
8
|
export default function backToListLink(links) {
|
@@ -22,7 +22,7 @@ export default class CheckBoxesTree {
|
|
22
22
|
/**
|
23
23
|
* Set checkboxes as checked if included in given values
|
24
24
|
* @public
|
25
|
-
* @param {Array} checkboxes - array of
|
25
|
+
* @param {Array} checkboxes - array of checkboxes to check
|
26
26
|
* @param {Array} values - values of checkboxes that should be checked
|
27
27
|
* @returns {Void} - Returns nothing.
|
28
28
|
*/
|
@@ -75,7 +75,7 @@ class ConsentManager {
|
|
75
75
|
|
76
76
|
triggerWarnings() {
|
77
77
|
document.querySelectorAll(".disabled-iframe").forEach((original) => {
|
78
|
-
if (original.querySelector("
|
78
|
+
if (original.querySelector("[data-dataconsent-warning]")) {
|
79
79
|
return;
|
80
80
|
}
|
81
81
|
|
@@ -75,7 +75,7 @@ describe("ConsentManager", () => {
|
|
75
75
|
<div class="dc-switch">
|
76
76
|
<input class="switch-input" checked="checked" id="dc-essential" type="checkbox" name="essential" disabled="">
|
77
77
|
<label class="switch-paddle" for="dc-essential">
|
78
|
-
<span
|
78
|
+
<span>Toggle Essential</span>
|
79
79
|
</label>
|
80
80
|
</div>
|
81
81
|
</div>
|
@@ -119,7 +119,7 @@ describe("ConsentManager", () => {
|
|
119
119
|
<div class="dc-switch">
|
120
120
|
<input class="switch-input" id="dc-preferences" type="checkbox" name="preferences">
|
121
121
|
<label class="switch-paddle" for="dc-preferences">
|
122
|
-
<span
|
122
|
+
<span>Toggle Preferences</span>
|
123
123
|
</label>
|
124
124
|
</div>
|
125
125
|
</div>
|
@@ -139,7 +139,7 @@ describe("ConsentManager", () => {
|
|
139
139
|
<div class="dc-switch">
|
140
140
|
<input class="switch-input" id="dc-analytics" type="checkbox" name="analytics">
|
141
141
|
<label class="switch-paddle" for="dc-analytics">
|
142
|
-
<span
|
142
|
+
<span>Toggle Analytics and statistics</span>
|
143
143
|
</label>
|
144
144
|
</div>
|
145
145
|
</div>
|
@@ -159,7 +159,7 @@ describe("ConsentManager", () => {
|
|
159
159
|
<div class="dc-switch">
|
160
160
|
<input class="switch-input" id="dc-marketing" type="checkbox" name="marketing">
|
161
161
|
<label class="switch-paddle" for="dc-marketing">
|
162
|
-
<span
|
162
|
+
<span>Toggle Marketing</span>
|
163
163
|
</label>
|
164
164
|
</div>
|
165
165
|
</div>
|
@@ -182,7 +182,7 @@ describe("ConsentManager", () => {
|
|
182
182
|
</div>
|
183
183
|
`;
|
184
184
|
const cookieWarningContent = `
|
185
|
-
<div
|
185
|
+
<div data-dataconsent-warning class="hide">
|
186
186
|
<p>You need to enable all cookies in order to see this content.</p>
|
187
187
|
<a href="#" class="button margin-vertical-2" data-open="dc-modal">
|
188
188
|
Change cookie settings
|
@@ -226,7 +226,7 @@ describe("ConsentManager", () => {
|
|
226
226
|
modal: modal,
|
227
227
|
categories: categories,
|
228
228
|
cookieName: "decidim-consent",
|
229
|
-
warningElement: document.querySelector("
|
229
|
+
warningElement: document.querySelector("[data-dataconsent-warning]")
|
230
230
|
});
|
231
231
|
});
|
232
232
|
|
@@ -78,7 +78,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
78
78
|
modal: modal,
|
79
79
|
categories: categories,
|
80
80
|
cookieName: window.Decidim.config.get("consent_cookie_name"),
|
81
|
-
warningElement: document.querySelector("
|
81
|
+
warningElement: document.querySelector("[data-dataconsent-warning]")
|
82
82
|
});
|
83
83
|
|
84
84
|
initDisabledIframes(manager);
|