decidim-core 0.27.0.rc1 → 0.27.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/cells/decidim/announcement_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/cta/show.erb +1 -1
- data/app/cells/decidim/content_blocks/cta_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/hero/show.erb +2 -2
- data/app/cells/decidim/content_blocks/hero_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +2 -2
- data/app/cells/decidim/content_blocks/stats_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +1 -1
- data/app/cells/decidim/data_consent/category.erb +19 -19
- data/app/cells/decidim/data_consent/dialog.erb +12 -12
- data/app/cells/decidim/data_consent/modal.erb +13 -13
- data/app/cells/decidim/data_consent_cell.rb +3 -3
- data/app/commands/decidim/update_account.rb +3 -1
- data/app/controllers/concerns/decidim/resource_versions_concern.rb +4 -0
- data/app/controllers/decidim/devise/registrations_controller.rb +5 -1
- data/app/controllers/decidim/last_activities_controller.rb +1 -0
- data/app/events/decidim/resource_endorsed_event.rb +2 -1
- data/app/forms/decidim/account_form.rb +1 -1
- data/app/forms/decidim/user_group_form.rb +1 -1
- data/app/helpers/decidim/filters_helper.rb +5 -1
- data/app/helpers/decidim/sanitize_helper.rb +12 -3
- data/app/models/decidim/action_log.rb +9 -9
- data/app/models/decidim/notification.rb +11 -2
- data/app/models/decidim/user_base_entity.rb +1 -0
- data/app/packs/entrypoints/decidim_core.js +1 -1
- data/app/packs/src/decidim/account_form.js +68 -18
- data/app/packs/src/decidim/{cookie_consent → data_consent}/consent_manager.js +27 -24
- data/app/packs/src/decidim/data_consent/consent_manager.test.js +280 -0
- data/app/packs/src/decidim/{cookie_consent/cookie_consent.js → data_consent/index.js} +12 -12
- data/app/packs/src/decidim/input_character_counter.js +57 -34
- data/app/packs/src/decidim/sw/a2hs.js +10 -1
- data/app/packs/stylesheets/decidim/modules/_cards.scss +2 -0
- data/app/packs/stylesheets/decidim/modules/_comments.scss +2 -0
- data/app/packs/stylesheets/decidim/modules/{_cookie-consent.scss → _data-consent.scss} +10 -10
- data/app/packs/stylesheets/decidim/modules/_forms.scss +5 -0
- data/app/packs/stylesheets/decidim/modules/_modules.scss +1 -1
- data/app/permissions/decidim/permissions.rb +4 -2
- data/app/presenters/decidim/push_notification_presenter.rb +2 -1
- data/app/presenters/decidim/user_presenter.rb +4 -1
- data/app/scrubbers/decidim/admin_input_scrubber.rb +25 -0
- data/app/scrubbers/decidim/user_input_scrubber.rb +3 -5
- data/app/services/decidim/iframe_disabler.rb +2 -3
- data/app/services/decidim/notifications_digest_sending_decider.rb +6 -2
- data/app/services/decidim/send_push_notification.rb +14 -12
- data/app/views/decidim/account/_password_fields.html.erb +2 -2
- data/app/views/decidim/download_your_data/show.html.erb +1 -1
- data/app/views/decidim/notifications_settings/show.html.erb +65 -67
- data/app/views/decidim/pages/_standalone.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +1 -1
- data/app/views/decidim/user_interests/show.html.erb +11 -13
- data/app/views/layouts/decidim/_application.html.erb +1 -1
- data/app/views/layouts/decidim/_data_consent_warning.html.erb +8 -0
- data/app/views/layouts/decidim/_main_footer.html.erb +1 -1
- data/config/locales/am-ET.yml +0 -1
- data/config/locales/ar.yml +0 -9
- data/config/locales/bg.yml +0 -9
- data/config/locales/ca.yml +18 -23
- data/config/locales/cs.yml +19 -24
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +204 -10
- data/config/locales/el.yml +0 -9
- data/config/locales/en.yml +17 -22
- data/config/locales/es-MX.yml +20 -25
- data/config/locales/es-PY.yml +19 -24
- data/config/locales/es.yml +20 -25
- data/config/locales/et.yml +0 -1
- data/config/locales/eu.yml +1 -10
- data/config/locales/fi-plain.yml +17 -22
- data/config/locales/fi.yml +17 -22
- data/config/locales/fr-CA.yml +29 -20
- data/config/locales/fr.yml +42 -33
- data/config/locales/ga-IE.yml +0 -2
- data/config/locales/gl.yml +0 -9
- data/config/locales/hr.yml +0 -1
- data/config/locales/hu.yml +250 -9
- data/config/locales/id-ID.yml +0 -9
- data/config/locales/it.yml +1 -10
- data/config/locales/ja.yml +30 -24
- data/config/locales/ko.yml +0 -1
- data/config/locales/lb.yml +0 -9
- data/config/locales/lt.yml +1949 -0
- data/config/locales/lv.yml +0 -9
- data/config/locales/mt.yml +0 -1
- data/config/locales/nl.yml +16 -10
- data/config/locales/no.yml +1 -10
- data/config/locales/om-ET.yml +0 -1
- data/config/locales/pl.yml +0 -9
- data/config/locales/pt-BR.yml +2 -11
- data/config/locales/pt.yml +0 -9
- data/config/locales/ro-RO.yml +0 -9
- data/config/locales/si-LK.yml +0 -1
- data/config/locales/sk.yml +0 -9
- data/config/locales/so-SO.yml +0 -1
- data/config/locales/sv.yml +9 -14
- data/config/locales/sw-KE.yml +0 -1
- data/config/locales/ti-ER.yml +0 -1
- data/config/locales/tr-TR.yml +0 -9
- data/config/locales/val-ES.yml +0 -1
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-CN.yml +2 -11
- data/config/locales/zh-TW.yml +0 -1
- data/config/routes.rb +20 -2
- data/lib/decidim/attributes/model.rb +9 -1
- data/lib/decidim/content_parsers/hashtag_parser.rb +1 -1
- data/lib/decidim/core/engine.rb +1 -1
- data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +60 -0
- data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +40 -0
- data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
- data/lib/decidim/core/test.rb +2 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +52 -13
- data/lib/decidim/dependency_resolver.rb +272 -0
- data/lib/decidim/events/simple_event.rb +1 -0
- data/lib/decidim/has_resource_permission.rb +0 -2
- data/lib/decidim/map/provider/dynamic_map/here.rb +46 -1
- data/lib/decidim/nicknamizable.rb +1 -1
- data/lib/decidim/translatable_attributes.rb +8 -1
- data/lib/decidim/url_option_resolver.rb +1 -1
- metadata +15 -11
- data/app/views/decidim/devise/registrations/edit.html.erb +0 -41
- data/app/views/layouts/decidim/_cookie_warning.html.erb +0 -8
@@ -1,7 +1,7 @@
|
|
1
|
-
#
|
1
|
+
#dc-dialog-wrapper{
|
2
2
|
z-index: 1000000;
|
3
3
|
|
4
|
-
.
|
4
|
+
.dc-dialog{
|
5
5
|
position: fixed;
|
6
6
|
background-color: $white;
|
7
7
|
bottom: 0;
|
@@ -11,7 +11,7 @@
|
|
11
11
|
width: unset;
|
12
12
|
}
|
13
13
|
|
14
|
-
.
|
14
|
+
.dc-button-wrapper{
|
15
15
|
flex-direction: column;
|
16
16
|
margin: 1rem 0;
|
17
17
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
|
39
|
-
#
|
39
|
+
#dc-modal{
|
40
40
|
background-color: $white;
|
41
41
|
|
42
42
|
.category-wrapper{
|
@@ -47,7 +47,7 @@
|
|
47
47
|
position: relative;
|
48
48
|
justify-content: space-between;
|
49
49
|
|
50
|
-
.
|
50
|
+
.dc-title{
|
51
51
|
&::before{
|
52
52
|
border: solid #2d4156;
|
53
53
|
border-width: 0 2px 2px 0;
|
@@ -68,12 +68,12 @@
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
|
71
|
-
.
|
71
|
+
.dc-switch{
|
72
72
|
padding: .5rem 0 0;
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
.
|
76
|
+
.dataconsent-details-wrapper{
|
77
77
|
.detail-titles{
|
78
78
|
border-bottom: 1px solid $medium-gray;
|
79
79
|
|
@@ -82,13 +82,13 @@
|
|
82
82
|
}
|
83
83
|
}
|
84
84
|
|
85
|
-
.
|
85
|
+
.dataconsent-detail-row{
|
86
86
|
font-size: .6rem;
|
87
87
|
}
|
88
88
|
}
|
89
89
|
}
|
90
90
|
|
91
|
-
.
|
91
|
+
.dc-buttons-wrapper{
|
92
92
|
justify-content: space-between;
|
93
93
|
}
|
94
94
|
}
|
@@ -108,7 +108,7 @@
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
.
|
111
|
+
.dataconsent-warning{
|
112
112
|
flex-direction: column;
|
113
113
|
font-size: 2rem;
|
114
114
|
font-weight: $global-weight-bold;
|
@@ -82,7 +82,7 @@
|
|
82
82
|
//Additional elements
|
83
83
|
@import "stylesheets/decidim/modules/share";
|
84
84
|
@import "stylesheets/decidim/modules/help";
|
85
|
-
@import "stylesheets/decidim/modules/
|
85
|
+
@import "stylesheets/decidim/modules/data-consent";
|
86
86
|
@import "stylesheets/decidim/modules/map";
|
87
87
|
@import "stylesheets/decidim/modules/omnipresent_banner";
|
88
88
|
@import "stylesheets/decidim/modules/wizard-steps";
|
@@ -116,9 +116,11 @@ module Decidim
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def apply_endorsement_permissions
|
119
|
-
|
119
|
+
is_allowed = current_settings.endorsements_enabled &&
|
120
|
+
!current_settings.endorsements_blocked &&
|
121
|
+
authorized?(:endorse, resource: context.fetch(:resource, nil))
|
120
122
|
|
121
|
-
|
123
|
+
toggle_allow(is_allowed)
|
122
124
|
end
|
123
125
|
|
124
126
|
def notification_action?
|
@@ -10,7 +10,8 @@ module Decidim
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def body
|
13
|
-
|
13
|
+
# Not using Rails sanitizers here because they escape HTML entities (i.e &) and we want to keep them
|
14
|
+
Nokogiri::HTML(event_class_instance.notification_title).text if event_class_instance.notification_title.present?
|
14
15
|
end
|
15
16
|
|
16
17
|
def icon
|
@@ -13,6 +13,8 @@ module Decidim
|
|
13
13
|
# nickname presented in a twitter-like style
|
14
14
|
#
|
15
15
|
def nickname
|
16
|
+
return "" if __getobj__.blocked?
|
17
|
+
|
16
18
|
"@#{__getobj__.nickname}"
|
17
19
|
end
|
18
20
|
|
@@ -33,13 +35,14 @@ module Decidim
|
|
33
35
|
end
|
34
36
|
|
35
37
|
def avatar_url(variant = nil)
|
38
|
+
return default_avatar_url if __getobj__.blocked?
|
36
39
|
return avatar.default_url unless avatar.attached?
|
37
40
|
|
38
41
|
avatar.path(variant: variant)
|
39
42
|
end
|
40
43
|
|
41
44
|
def default_avatar_url
|
42
|
-
attached_uploader.default_url
|
45
|
+
attached_uploader(:avatar).default_url
|
43
46
|
end
|
44
47
|
|
45
48
|
def profile_path
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
# Use this class as a scrubber to sanitize admin user input. The default
|
5
|
+
# scrubbed provided by Rails does not allow `iframe`s, and we're using
|
6
|
+
# them to embed videos, so we need to provide a whole new scrubber.
|
7
|
+
#
|
8
|
+
# Example:
|
9
|
+
#
|
10
|
+
# sanitize(@page.body, scrubber: Decidim::AdminInputScrubber.new)
|
11
|
+
#
|
12
|
+
# Lists of default tags and attributes are extracted from
|
13
|
+
# https://stackoverflow.com/a/35073814/2110884.
|
14
|
+
class AdminInputScrubber < UserInputScrubber
|
15
|
+
private
|
16
|
+
|
17
|
+
def custom_allowed_attributes
|
18
|
+
super + %w(frameborder allowfullscreen) - %w(onerror)
|
19
|
+
end
|
20
|
+
|
21
|
+
def custom_allowed_tags
|
22
|
+
super + %w(comment iframe)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
# Use this class as a scrubber to sanitize user input.
|
5
|
-
# scrubbed provided by Rails does not allow `iframe`s, and we're using
|
6
|
-
# them to embed videos, so we need to provide a whole new scrubber.
|
4
|
+
# Use this class as a scrubber to sanitize participant user input.
|
7
5
|
#
|
8
6
|
# Example:
|
9
7
|
#
|
@@ -21,11 +19,11 @@ module Decidim
|
|
21
19
|
private
|
22
20
|
|
23
21
|
def custom_allowed_attributes
|
24
|
-
Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES
|
22
|
+
Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES
|
25
23
|
end
|
26
24
|
|
27
25
|
def custom_allowed_tags
|
28
|
-
Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2
|
26
|
+
Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
@@ -18,9 +18,8 @@ module Decidim
|
|
18
18
|
|
19
19
|
def disable_iframes(node)
|
20
20
|
if node.name == "iframe"
|
21
|
-
|
22
|
-
|
23
|
-
node.attributes["class"].value = old_classes.present? ? "#{old_classes} disabled-iframe" : "disabled-iframe"
|
21
|
+
orig_node = node.to_s
|
22
|
+
node.replace(%(<div class="disabled-iframe"><!-- #{orig_node} --></div>))
|
24
23
|
end
|
25
24
|
|
26
25
|
node.children.each do |child|
|
@@ -6,10 +6,14 @@ module Decidim
|
|
6
6
|
def must_notify?(user, time: Time.now.utc)
|
7
7
|
return true if user.digest_sent_at.blank?
|
8
8
|
|
9
|
+
# Note that we are checking whether the notifications were sent at any
|
10
|
+
# time during the assumed sending day moment to prevent potential issues
|
11
|
+
# during the sending if the digest_sent_at is set to some other moment
|
12
|
+
# than the exact beginning of that day.
|
9
13
|
case user.notifications_sending_frequency.to_sym
|
10
14
|
when :none then false
|
11
|
-
when :daily then user.digest_sent_at
|
12
|
-
when :weekly then user.digest_sent_at
|
15
|
+
when :daily then user.digest_sent_at <= (time - 1.day).end_of_day
|
16
|
+
when :weekly then user.digest_sent_at <= (time - 1.day - 1.week).end_of_day
|
13
17
|
else true
|
14
18
|
end
|
15
19
|
end
|
@@ -18,18 +18,20 @@ module Decidim
|
|
18
18
|
def perform(notification)
|
19
19
|
return unless Rails.application.secrets.vapid[:enabled]
|
20
20
|
|
21
|
-
notification.user.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
I18n.with_locale(notification.user.locale || notification.user.organization.default_locale) do
|
22
|
+
notification.user.notifications_subscriptions.values.map do |subscription|
|
23
|
+
message_params = notification_params(Decidim::PushNotificationPresenter.new(notification))
|
24
|
+
payload = build_payload(message_params, subscription)
|
25
|
+
# Capture webpush exceptions in order to avoid this call to be repeated by the background job runner
|
26
|
+
# Webpush::Error class is the parent class of all defined errors
|
27
|
+
begin
|
28
|
+
Webpush.payload_send(**payload)
|
29
|
+
rescue Webpush::Error => e
|
30
|
+
Rails.logger.warn("[ERROR] Push notification delivery failed due to #{e.message}")
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
end.compact
|
34
|
+
end
|
33
35
|
end
|
34
36
|
|
35
37
|
private
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<%= form.password_field :password, password_field_options_for(current_user)
|
2
|
-
<%= form.password_field :password_confirmation, password_field_options_for(current_user).except(:help_text)
|
1
|
+
<%= form.password_field :password, password_field_options_for(current_user) %>
|
2
|
+
<%= form.password_field :password_confirmation, password_field_options_for(current_user).except(:help_text) %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% add_decidim_page_title(t("my_data", scope: "layouts.decidim.user_profile")) %>
|
2
2
|
<% content_for(:subtitle) { t("my_data", scope: "layouts.decidim.user_profile") } %>
|
3
3
|
|
4
|
-
<div class="
|
4
|
+
<div class="download-your-data">
|
5
5
|
<strong><%= t(".download_data") %></strong>
|
6
6
|
<p><%= t(".download_data_description", user_email: current_user.email).html_safe %></p>
|
7
7
|
<%= button_to t(".request_data"), export_download_your_data_path, class: "button", data: { disable: true } %>
|
@@ -1,87 +1,85 @@
|
|
1
1
|
<% add_decidim_page_title(t("notifications_settings", scope: "layouts.decidim.user_profile")) %>
|
2
2
|
<% content_for(:subtitle) { t("notifications_settings", scope: "layouts.decidim.user_profile") } %>
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%= f.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= f.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</div>
|
4
|
+
<%= form_for(@notifications_settings, url: notifications_settings_path, method: :put, class: "user-form") do |f| %>
|
5
|
+
<p><strong><%= t(".receive_notifications_about") %></strong></p>
|
6
|
+
<div class="switch tiny switch-with-label notifications_from_own_activity">
|
7
|
+
<%= f.label :notifications_from_own_activity do %>
|
8
|
+
<%= f.check_box :notifications_from_own_activity, label: false, class: "switch-input" %>
|
9
|
+
<span class="switch-paddle"></span>
|
10
|
+
<span class="switch-label"><%= t(".own_activity") %></span>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<div class="switch tiny switch-with-label notifications_from_followed">
|
14
|
+
<%= f.label :notifications_from_followed do %>
|
15
|
+
<%= f.check_box :notifications_from_followed, label: false, class: "switch-input" %>
|
16
|
+
<span class="switch-paddle"></span>
|
17
|
+
<span class="switch-label"><%= t(".everything_followed") %></span>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
21
20
|
|
22
|
-
|
23
|
-
|
21
|
+
<p><strong><%= t(".notifications_sending_frequency") %></strong></p>
|
22
|
+
<%= f.collection_radio_buttons :notifications_sending_frequency, frequencies_collection, :first, :last, { checked: @notifications_settings.notifications_sending_frequency || "daily" } %>
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
<p><strong><%= t(".newsletters") %></strong></p>
|
25
|
+
<div class="switch tiny switch-with-label newsletter_notifications">
|
26
|
+
<label>
|
27
|
+
<%= f.check_box :newsletter_notifications, label: false, class: "switch-input" %>
|
28
|
+
<span class="switch-paddle"></span>
|
29
|
+
<span class="switch-label"><%= t(".newsletter_notifications") %></span>
|
30
|
+
</label>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<p><strong><%= t(".direct_messages") %></strong></p>
|
34
|
+
<div class="switch tiny switch-with-label allow_public_contact">
|
35
|
+
<label>
|
36
|
+
<%= f.check_box :allow_public_contact, label: false, class: "switch-input" %>
|
37
|
+
<span class="switch-paddle"></span>
|
38
|
+
<span class="switch-label"><%= t(".allow_public_contact") %></span>
|
39
|
+
</label>
|
40
|
+
</div>
|
33
41
|
|
34
|
-
|
35
|
-
<
|
42
|
+
<% if @notifications_settings.user_is_moderator?(current_user) %>
|
43
|
+
<p><strong><%= t(".administrators") %></strong></p>
|
44
|
+
<div class="switch tiny switch-with-label email_on_moderations">
|
36
45
|
<label>
|
37
|
-
<%= f.check_box :
|
46
|
+
<%= f.check_box :email_on_moderations, label: false, class: "switch-input" %>
|
38
47
|
<span class="switch-paddle"></span>
|
39
|
-
<span class="switch-label"><%= t(".
|
48
|
+
<span class="switch-label"><%= t(".email_on_moderations") %></span>
|
40
49
|
</label>
|
41
50
|
</div>
|
42
51
|
|
43
|
-
<%
|
44
|
-
<
|
45
|
-
<div class="switch tiny switch-with-label email_on_moderations">
|
52
|
+
<% Decidim.notification_settings_registry.manifests.filter{ |a| a.settings_area == :administrators }.each do |manifest| %>
|
53
|
+
<div class="switch tiny switch-with-label notification_settings">
|
46
54
|
<label>
|
47
|
-
<%= f.check_box
|
55
|
+
<%= f.check_box "notification_settings[#{manifest.name}]",
|
56
|
+
checked: ["1", true].include?(current_user.notification_settings.fetch(manifest.name.to_s, manifest.default_value)),
|
57
|
+
label: false,
|
58
|
+
class: "switch-input" %>
|
48
59
|
<span class="switch-paddle"></span>
|
49
|
-
<span class="switch-label"><%= t(".
|
60
|
+
<span class="switch-label"><%= t(".notification_settings.#{manifest.name}") %></span>
|
50
61
|
</label>
|
51
62
|
</div>
|
52
|
-
|
53
|
-
<% Decidim.notification_settings_registry.manifests.filter{ |a| a.settings_area == :administrators }.each do |manifest| %>
|
54
|
-
<div class="switch tiny switch-with-label notification_settings">
|
55
|
-
<label>
|
56
|
-
<%= f.check_box "notification_settings[#{manifest.name}]",
|
57
|
-
checked: ["1", true].include?(current_user.notification_settings.fetch(manifest.name.to_s, manifest.default_value)),
|
58
|
-
label: false,
|
59
|
-
class: "switch-input" %>
|
60
|
-
<span class="switch-paddle"></span>
|
61
|
-
<span class="switch-label"><%= t(".notification_settings.#{manifest.name}") %></span>
|
62
|
-
</label>
|
63
|
-
</div>
|
64
|
-
<% end %>
|
65
|
-
|
66
63
|
<% end %>
|
67
64
|
|
68
|
-
|
69
|
-
<div class="push-notifications js-sw-mandatory">
|
70
|
-
<p><strong><%= t(".push_notifications") %></strong></p>
|
71
|
-
<p id="push-notifications-reminder" class="push-notifications__reminder"><i><%= t(".push_notifications_reminder") %></i></p>
|
72
|
-
<div class="switch tiny switch-with-label allow_push_notifications">
|
73
|
-
<label>
|
74
|
-
<%= check_box_tag :allow_push_notifications, 0, false, class: "switch-input" %>
|
75
|
-
<span class="switch-paddle"></span>
|
76
|
-
<span class="switch-label"><%= t(".allow_push_notifications") %></span>
|
77
|
-
</label>
|
78
|
-
</div>
|
79
|
-
</div>
|
65
|
+
<% end %>
|
80
66
|
|
81
|
-
|
82
|
-
|
83
|
-
|
67
|
+
<% if @notifications_settings.meet_push_notifications_requirements? %>
|
68
|
+
<div class="push-notifications js-sw-mandatory">
|
69
|
+
<p><strong><%= t(".push_notifications") %></strong></p>
|
70
|
+
<p id="push-notifications-reminder" class="push-notifications__reminder"><i><%= t(".push_notifications_reminder") %></i></p>
|
71
|
+
<div class="switch tiny switch-with-label allow_push_notifications">
|
72
|
+
<label>
|
73
|
+
<%= check_box_tag :allow_push_notifications, 0, false, class: "switch-input" %>
|
74
|
+
<span class="switch-paddle"></span>
|
75
|
+
<span class="switch-label"><%= t(".allow_push_notifications") %></span>
|
76
|
+
</label>
|
77
|
+
</div>
|
78
|
+
</div>
|
84
79
|
|
85
|
-
<%=
|
80
|
+
<input id="vapidPublicKey" name="vapid_public_key" type="hidden" value="<%= Base64.urlsafe_decode64(Rails.application.secrets.vapid[:public_key]).bytes %>">
|
81
|
+
<input id="subKeys" name="sub_key" type="hidden" value="<%= current_user.notifications_subscriptions.keys %>">
|
86
82
|
<% end %>
|
87
|
-
|
83
|
+
|
84
|
+
<%= f.submit t(".update_notifications_settings") %>
|
85
|
+
<% end %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<div class="columns small-12">
|
12
12
|
<div class="card">
|
13
|
-
<div class="card__content"><%=
|
13
|
+
<div class="card__content"><%= decidim_sanitize_editor_admin translated_attribute page.content %></div>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
@@ -1,17 +1,15 @@
|
|
1
1
|
<% add_decidim_page_title(t("my_interests", scope: "layouts.decidim.user_profile")) %>
|
2
2
|
<% content_for(:subtitle) { t("my_interests", scope: "layouts.decidim.user_profile") } %>
|
3
3
|
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<p><%= t(".no_scopes") %></p>
|
15
|
-
<% end %>
|
4
|
+
<p><%= t(".select_your_interests") %></p>
|
5
|
+
<%= form_for(@user_interests, url: user_interests_path, method: :put, class: "user-form") do |f| %>
|
6
|
+
<p><strong><%= t(".my_interests") %></strong></p>
|
7
|
+
<% if @user_interests.scopes.any? %>
|
8
|
+
<div class="clearfix m-bottom">
|
9
|
+
<%= render partial: "scopes", locals: { scopes: @user_interests.scopes, f: f } %>
|
10
|
+
</div>
|
11
|
+
<%= f.submit t(".update_my_interests") %>
|
12
|
+
<% else %>
|
13
|
+
<p><%= t(".no_scopes") %></p>
|
16
14
|
<% end %>
|
17
|
-
|
15
|
+
<% end %>
|
@@ -23,6 +23,6 @@
|
|
23
23
|
<%= render partial: "decidim/shared/login_modal" unless current_user %>
|
24
24
|
<%= render partial: "decidim/shared/authorization_modal" %>
|
25
25
|
<%= render partial: "layouts/decidim/decidim_javascript" %>
|
26
|
-
<%= render partial: "layouts/decidim/
|
26
|
+
<%= render partial: "layouts/decidim/data_consent_warning" %>
|
27
27
|
</body>
|
28
28
|
</html>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="dataconsent-warning flex-center padding-1 hide">
|
2
|
+
<p>
|
3
|
+
<%= t("layouts.decidim.data_consent.warning.consent_required", categories: t("layouts.decidim.data_consent.warning.all_categories")) %>
|
4
|
+
</p>
|
5
|
+
<a href="#" class="button margin-vertical-2" data-open="dc-modal">
|
6
|
+
<%= t("change_settings", scope: "layouts.decidim.data_consent.warning") %>
|
7
|
+
</a>
|
8
|
+
</div>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
24
24
|
<li><%= link_to t("layouts.decidim.footer.download_open_data"), decidim.open_data_download_path %></li>
|
25
|
-
<li><a href="#" data-open="
|
25
|
+
<li><a href="#" data-open="dc-modal"><%= t("layouts.decidim.footer.data_consent_settings") %></a></li>
|
26
26
|
</ul>
|
27
27
|
</nav>
|
28
28
|
</div>
|
data/config/locales/am-ET.yml
CHANGED
data/config/locales/ar.yml
CHANGED
@@ -1216,15 +1216,6 @@ ar:
|
|
1216
1216
|
updated_not_active: كلمة السر الخاصة بك تم تغييرها بنجاح.
|
1217
1217
|
registrations:
|
1218
1218
|
destroyed: تم إلغاء حسابك بنجاح. نحن نأمل ان نراك قريبا مره اخرى.
|
1219
|
-
edit:
|
1220
|
-
are_you_sure: هل أنت واثق؟
|
1221
|
-
cancel_my_account: الغاء حسابي
|
1222
|
-
currently_waiting_confirmation_for_email: 'حاليا في انتظار تأكيد ل: %{email}'
|
1223
|
-
leave_blank_if_you_don_t_want_to_change_it: اتركه فارغا إذا كنت لا تريد تغييره
|
1224
|
-
title: تحرير %{resource}
|
1225
|
-
unhappy: تعيس؟
|
1226
|
-
update: تحديث
|
1227
|
-
we_need_your_current_password_to_confirm_your_changes: نحتاج كلمة المرور الحالية لتأكيد تغييراتك
|
1228
1219
|
new:
|
1229
1220
|
sign_up: انشئ حسابًا
|
1230
1221
|
signed_up: أهلا بك! لقد اشتركت بنجاح
|
data/config/locales/bg.yml
CHANGED
@@ -1280,15 +1280,6 @@ bg:
|
|
1280
1280
|
updated_not_active: Паролата Ви беше променена успешно.
|
1281
1281
|
registrations:
|
1282
1282
|
destroyed: Вашият акаунт беше успешно отказан. Надяваме се скоро да се видим отново.
|
1283
|
-
edit:
|
1284
|
-
are_you_sure: Сигурни ли сте?
|
1285
|
-
cancel_my_account: Откажи профила ми
|
1286
|
-
currently_waiting_confirmation_for_email: 'В момента се чака потвърждение за: %{email}'
|
1287
|
-
leave_blank_if_you_don_t_want_to_change_it: оставете празно, ако не желаете промяна
|
1288
|
-
title: Редактирай %{resource}
|
1289
|
-
unhappy: Недоволни?
|
1290
|
-
update: Обновяване
|
1291
|
-
we_need_your_current_password_to_confirm_your_changes: имаме нужда от текущата Ви парола, за да потвърдим Вашите промени
|
1292
1283
|
new:
|
1293
1284
|
sign_up: Регистрация
|
1294
1285
|
signed_up: Добре дошли! Регистрирахте се успешно.
|