decidim-core 0.26.5 → 0.26.8
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/announcement_cell.rb +1 -1
- data/app/cells/decidim/collapsible_list/show.erb +1 -1
- data/app/cells/decidim/content_blocks/cta_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/hero/show.erb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +1 -1
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +1 -1
- data/app/controllers/decidim/authorization_modals_controller.rb +1 -1
- data/app/controllers/decidim/links_controller.rb +8 -11
- data/app/forms/url_validator.rb +1 -1
- data/app/helpers/decidim/cells_helper.rb +1 -0
- data/app/helpers/decidim/external_domain_helper.rb +14 -3
- data/app/helpers/decidim/layout_helper.rb +15 -4
- data/app/helpers/decidim/layout_helper.rb.orig +225 -0
- data/app/helpers/decidim/sanitize_helper.rb +15 -5
- data/app/models/decidim/organization.rb +6 -0
- data/app/models/decidim/scope_type.rb +28 -0
- data/app/packs/src/decidim/editor/clipboard_override.js +6 -2
- data/app/packs/src/decidim/editor.js +63 -33
- data/app/packs/src/decidim/map/controller/drag_marker.js +0 -2
- data/app/packs/src/decidim/map/controller/markers.js +0 -1
- data/app/packs/src/decidim/map/controller/static.js +0 -1
- data/app/packs/src/decidim/map/controller.js +0 -2
- data/app/packs/src/decidim/map/factory.js +4 -1
- data/app/packs/src/decidim/map/icon.js +0 -1
- data/app/packs/src/decidim/map/legacy.js +0 -1
- data/app/packs/src/decidim/map/provider/default.js +2 -0
- data/app/packs/src/decidim/map/provider/here.js +2 -1
- data/app/packs/stylesheets/decidim/_editor.scss +129 -0
- data/app/packs/stylesheets/decidim/extras/_quill.scss +0 -6
- data/app/packs/stylesheets/decidim/modules/_buttons.scss +10 -6
- data/app/packs/stylesheets/decidim/modules/_cards.scss +1 -1
- data/app/packs/stylesheets/decidim/modules/_comments.scss +24 -0
- data/app/packs/stylesheets/decidim/modules/_dropdown_menu.scss +9 -0
- data/app/packs/stylesheets/decidim/vizzs/_linechart.scss +2 -2
- data/app/packs/stylesheets/decidim/vizzs/_rowchart.scss +2 -2
- data/app/presenters/decidim/notification_presenter.rb +1 -1
- data/app/presenters/decidim/user_group_presenter.rb +1 -1
- data/app/presenters/decidim/user_presenter.rb +1 -1
- data/app/queries/decidim/metrics/users_metric_manage.rb +6 -6
- data/app/scrubbers/decidim/admin_input_scrubber.rb +27 -0
- data/app/scrubbers/decidim/user_input_scrubber.rb +32 -5
- data/app/services/decidim/traceability.rb +1 -0
- data/app/views/decidim/devise/registrations/new.html.erb.orig +231 -0
- data/app/views/decidim/links/_invalid_url_modal.html.erb +17 -0
- data/app/views/decidim/links/_modal.html.erb +1 -1
- data/app/views/decidim/links/invalid_url.js.erb +24 -0
- data/app/views/decidim/links/new.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/_conversation.html.erb +1 -5
- data/app/views/decidim/pages/_standalone.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +1 -1
- data/config/environment.rb +0 -0
- data/config/locales/ar.yml +423 -8
- data/config/locales/bg.yml +1 -4
- data/config/locales/ca.yml +26 -23
- data/config/locales/cs.yml +40 -32
- data/config/locales/da.yml +3 -0
- data/config/locales/de.yml +39 -23
- data/config/locales/el.yml +100 -2
- data/config/locales/en.yml +16 -13
- data/config/locales/eo.yml +5 -1
- data/config/locales/es-MX.yml +21 -18
- data/config/locales/es-PY.yml +23 -20
- data/config/locales/es.yml +25 -22
- data/config/locales/et.yml +3 -0
- data/config/locales/eu.yml +91 -67
- data/config/locales/fa-IR.yml +1 -0
- data/config/locales/fi-plain.yml +16 -13
- data/config/locales/fi.yml +18 -15
- data/config/locales/fr-CA.yml +28 -22
- data/config/locales/fr.yml +27 -21
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +4 -23
- data/config/locales/gn-PY.yml +3 -0
- data/config/locales/hr.yml +3 -0
- data/config/locales/hu.yml +66 -21
- data/config/locales/id-ID.yml +6 -4
- data/config/locales/is-IS.yml +5 -2
- data/config/locales/it.yml +5 -15
- data/config/locales/ja.yml +16 -15
- data/config/locales/ka-GE.yml +3 -0
- data/config/locales/kaa.yml +5 -0
- data/config/locales/lb.yml +8 -12
- data/config/locales/lt.yml +1 -34
- data/config/locales/lv.yml +0 -3
- data/config/locales/nl.yml +5 -24
- data/config/locales/no.yml +5 -28
- data/config/locales/oc-FR.yml +2 -0
- data/config/locales/pl.yml +0 -33
- data/config/locales/pt-BR.yml +3 -7
- data/config/locales/pt.yml +1 -5
- data/config/locales/ro-RO.yml +5 -8
- data/config/locales/ru.yml +3 -3
- data/config/locales/sk.yml +18 -10
- data/config/locales/sl.yml +1 -0
- data/config/locales/sr-CS.yml +10 -0
- data/config/locales/sv.yml +11 -34
- data/config/locales/tr-TR.yml +3 -7
- data/config/locales/uk.yml +3 -3
- data/config/locales/zh-CN.yml +0 -4
- data/config/locales/zh-TW.yml +1726 -0
- data/db/migrate/20181030090144_destroy_deleted_users_follows.rb +1 -1
- data/db/migrate/20181204110723_remove_following_users_count_from_users.rb +11 -2
- data/db/migrate/20181214101250_add_notification_types_to_users.rb +6 -1
- data/db/migrate/20190412131728_fix_user_names.rb +13 -6
- data/db/migrate/20200211173227_add_direct_message_types_to_users.rb +6 -1
- data/db/migrate/20210302150803_invalidate_all_sessions_for_deleted_users.rb +10 -3
- data/db/migrate/20210310120640_add_followable_counter_cache_to_users.rb +13 -3
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +36 -0
- data/lib/decidim/core/test/shared_examples/editor_shared_examples.rb +10 -0
- data/lib/decidim/core/test/shared_examples/map_examples.rb +4 -1
- data/lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb +7 -3
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +43 -0
- data/lib/decidim/dependency_resolver.rb +272 -0
- data/lib/decidim/form_builder.rb +6 -14
- data/lib/decidim/publicable.rb +4 -0
- data/lib/tasks/upgrade/decidim_user_moderation.rake +14 -0
- metadata +18 -6
@@ -0,0 +1,231 @@
|
|
1
|
+
<% add_decidim_page_title(t(".sign_up")) %>
|
2
|
+
|
3
|
+
<% content_for :devise_links do %>
|
4
|
+
<%= render "decidim/devise/shared/links" %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= render layout: "layouts/decidim/shared/layout_center" do %>
|
8
|
+
<div class="flex justify-center">
|
9
|
+
<h1 class="h3 md:h1 decorator my-12"><%= t("decidim.devise.registrations.new.sign_up") %></h1>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="login__info">
|
13
|
+
<p>
|
14
|
+
<%= t("decidim.devise.registrations.new.subtitle") %>
|
15
|
+
</p>
|
16
|
+
<p class="font-semibold">
|
17
|
+
<%= t("decidim.devise.registrations.new.already_have_an_account?") %>
|
18
|
+
<%= link_to t("decidim.devise.registrations.new.sign_in"), new_user_session_path %>
|
19
|
+
</p>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="login__info-required">
|
23
|
+
<%= form_required_explanation %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="login__omniauth-container">
|
27
|
+
<% cache current_organization do %>
|
28
|
+
<%= render "decidim/devise/shared/omniauth_buttons" %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%= decidim_form_for(@form, namespace: "registration", as: resource_name, url: registration_path(resource_name), html: { id: "register-form" }) do |f| %>
|
33
|
+
<%= invisible_captcha %>
|
34
|
+
|
35
|
+
<div class="form__wrapper">
|
36
|
+
<%= f.text_field :name, help_text: t("decidim.devise.registrations.new.username_help"), autocomplete: "name", placeholder: "John Doe" %>
|
37
|
+
|
38
|
+
<%= f.text_field :nickname, help_text: t("decidim.devise.registrations.new.nickname_help", organization: current_organization.name), autocomplete: "nickname", placeholder: "johndoe" %>
|
39
|
+
|
40
|
+
<%= f.email_field :email, autocomplete: "email", placeholder: "hi@email.com" %>
|
41
|
+
|
42
|
+
<%= f.password_field :password, password_field_options_for(:user) %>
|
43
|
+
|
44
|
+
<%= f.password_field :password_confirmation, password_field_options_for(:user).except(:help_text) %>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="card__tos" class="form__wrapper-block">
|
48
|
+
<h4 class="h4"><%= t("decidim.devise.registrations.new.tos_title") %></h4>
|
49
|
+
|
50
|
+
<div class="tos-text">
|
51
|
+
<% terms_of_service_summary_content_blocks.each do |content_block| %>
|
52
|
+
<%= cell content_block.manifest.cell, content_block %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<%= f.check_box :tos_agreement, label: t("decidim.devise.registrations.new.tos_agreement", link: link_to(t("decidim.devise.registrations.new.terms"), page_path("terms-of-service"))), label_options: { class: "form__wrapper-checkbox-label" } %>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="card__newsletter" class="form__wrapper-block">
|
60
|
+
<h4 class="h4"><%= t("decidim.devise.registrations.new.newsletter_title") %></h4>
|
61
|
+
<%= f.check_box :newsletter, label: t("decidim.devise.registrations.new.newsletter"), checked: @form.newsletter, label_options: { class: "form__wrapper-checkbox-label" } %>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div class="form__wrapper-block">
|
65
|
+
<button type="submit" class="button button__lg button__secondary">
|
66
|
+
<%= t("decidim.devise.registrations.new.sign_up") %>
|
67
|
+
<%= icon "arrow-right-line", class: "fill-current" %>
|
68
|
+
</button>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="login__links">
|
72
|
+
<%= render "decidim/devise/shared/redesigned_links" %>
|
73
|
+
</div>
|
74
|
+
<% end %>
|
75
|
+
<% end %>
|
76
|
+
|
77
|
+
<<<<<<< HEAD
|
78
|
+
||||||| parent of 4e14afa36c (add password toggle via unobstructive javascript)
|
79
|
+
<div class="row">
|
80
|
+
<div class="columns large-6 medium-10 medium-centered">
|
81
|
+
|
82
|
+
<%= decidim_form_for(@form, namespace: "registration", as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user", id: "register-form" }) do |f| %>
|
83
|
+
<%= invisible_captcha %>
|
84
|
+
<div class="card">
|
85
|
+
<div class="card__content">
|
86
|
+
<%= form_required_explanation %>
|
87
|
+
|
88
|
+
<div class="user-person">
|
89
|
+
<div class="field">
|
90
|
+
<%= f.text_field :name, help_text: t(".username_help"), autocomplete: "name" %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div class="user-nickname">
|
95
|
+
<div class="field">
|
96
|
+
<%= f.text_field :nickname, help_text: t(".nickname_help", organization: current_organization.name), prefix: { value: "@", small: 1, large: 1 }, autocomplete: "nickname" %>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
<div class="field">
|
101
|
+
<%= f.email_field :email, autocomplete: "email" %>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<div class="field">
|
105
|
+
<%= f.password_field :password, password_field_options_for(:user) %>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<div class="field">
|
109
|
+
<%= f.password_field :password_confirmation, password_field_options_for(:user).except(:help_text) %>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div class="card" id="card__tos">
|
115
|
+
<div class="card__content">
|
116
|
+
<h3><%= t(".tos_title") %></h3>
|
117
|
+
|
118
|
+
<p class="tos-text">
|
119
|
+
<%= strip_tags(translated_attribute(terms_and_conditions_page.content)) %>
|
120
|
+
</p>
|
121
|
+
|
122
|
+
<div class="field">
|
123
|
+
<%= f.check_box :tos_agreement, label: t(".tos_agreement", link: link_to(t(".terms"), page_path("terms-and-conditions"))) %>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div class="card" id="card__newsletter">
|
129
|
+
<div class="card__content">
|
130
|
+
<h3><%= t(".newsletter_title") %></h3>
|
131
|
+
<div class="field">
|
132
|
+
<%= f.check_box :newsletter, label: t(".newsletter"), checked: @form.newsletter %>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="card">
|
138
|
+
<div class="card__content">
|
139
|
+
<div class="actions">
|
140
|
+
<%= f.submit t("devise.registrations.new.sign_up"), class: "button expanded" %>
|
141
|
+
</div>
|
142
|
+
<%= yield :devise_links %>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<% end %>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
=======
|
151
|
+
<div class="row">
|
152
|
+
<div class="columns large-6 medium-10 medium-centered">
|
153
|
+
|
154
|
+
<%= decidim_form_for(@form, namespace: "registration", as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user", id: "register-form" }) do |f| %>
|
155
|
+
<%= invisible_captcha %>
|
156
|
+
<div class="card">
|
157
|
+
<div class="card__content">
|
158
|
+
<%= form_required_explanation %>
|
159
|
+
|
160
|
+
<div class="user-person">
|
161
|
+
<div class="field">
|
162
|
+
<%= f.text_field :name, help_text: t(".username_help"), autocomplete: "off" %>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div class="user-nickname">
|
167
|
+
<div class="field">
|
168
|
+
<%= f.text_field :nickname, help_text: t(".nickname_help", organization: current_organization.name), prefix: { value: "@", small: 1, large: 1 }, autocomplete: "off" %>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="field">
|
173
|
+
<%= f.email_field :email, autocomplete: "email" %>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div class="user-password">
|
177
|
+
<div class="field">
|
178
|
+
<%= f.password_field :password, password_field_options_for(:user) %>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div class="user-password-confirmation">
|
183
|
+
<div class="field">
|
184
|
+
<%= f.password_field :password_confirmation, password_field_options_for(:user).except(:help_text) %>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div class="card" id="card__tos">
|
191
|
+
<div class="card__content">
|
192
|
+
<h3><%= t(".tos_title") %></h3>
|
193
|
+
|
194
|
+
<p class="tos-text">
|
195
|
+
<%= strip_tags(translated_attribute(terms_and_conditions_page.content)) %>
|
196
|
+
</p>
|
197
|
+
|
198
|
+
<div class="field">
|
199
|
+
<%= f.check_box :tos_agreement, label: t(".tos_agreement", link: link_to(t(".terms"), page_path("terms-and-conditions"))) %>
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
<div class="card" id="card__newsletter">
|
205
|
+
<div class="card__content">
|
206
|
+
<h3><%= t(".newsletter_title") %></h3>
|
207
|
+
<div class="field">
|
208
|
+
<%= f.check_box :newsletter, label: t(".newsletter"), checked: @form.newsletter %>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
<div class="card">
|
214
|
+
<div class="card__content">
|
215
|
+
<div class="actions">
|
216
|
+
<%= f.submit t("devise.registrations.new.sign_up"), class: "button expanded" %>
|
217
|
+
</div>
|
218
|
+
<%= yield :devise_links %>
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
<% end %>
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
</div>
|
226
|
+
>>>>>>> 4e14afa36c (add password toggle via unobstructive javascript)
|
227
|
+
<%= render "decidim/devise/shared/newsletter_modal" %>
|
228
|
+
|
229
|
+
<% content_for :js_content do %>
|
230
|
+
<%= javascript_pack_tag "decidim_registrations" %>
|
231
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= decidim_modal id: "external-domain-warning" do %>
|
2
|
+
<div data-dialog-container>
|
3
|
+
<%= icon "external-link-line" %>
|
4
|
+
<h2 id="dialog-title-external-domain-warning" tabindex="-1" data-dialog-title><%= t("decidim.links.warning.title") %></h2>
|
5
|
+
<div>
|
6
|
+
|
7
|
+
<code class="mt-5 block break-all text-alert">
|
8
|
+
<%= flash[:alert] %>
|
9
|
+
</code>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div data-dialog-actions>
|
13
|
+
<button class="button button__lg button__transparent-secondary" data-dialog-close="external-domain-warning">
|
14
|
+
<%= t("decidim.links.warning.cancel") %>
|
15
|
+
</button>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
<div class="row buttons">
|
16
|
-
<%= link_to t("decidim.links.warning.proceed"),
|
16
|
+
<%= link_to t("decidim.links.warning.proceed"), external_url.to_s, target: "_blank", data: { close: "" }, class: "button primary button--nomargin" %>
|
17
17
|
<button class="button clear" data-close>
|
18
18
|
<%= t("decidim.links.warning.cancel") %>
|
19
19
|
</button>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
(function() {
|
2
|
+
const create = (selector) => {
|
3
|
+
const element = document.createElement("div")
|
4
|
+
element.id = selector
|
5
|
+
document.body.append(element)
|
6
|
+
return element
|
7
|
+
}
|
8
|
+
|
9
|
+
const selector = "external-domain-warning"
|
10
|
+
const selectorContainer = `${selector}-container`
|
11
|
+
|
12
|
+
// if the container does not exist in the DOM, it creates a new one, otherwise, replace the content
|
13
|
+
const externalDomainWarning = document.getElementById(selectorContainer) || create(selectorContainer)
|
14
|
+
|
15
|
+
externalDomainWarning.innerHTML = ''
|
16
|
+
externalDomainWarning.innerHTML = '<%= j(render partial: "invalid_url_modal").strip.html_safe %>'
|
17
|
+
|
18
|
+
new window.Decidim.Dialogs(`#${selector}`, {
|
19
|
+
closingSelector: `[data-dialog-close="${selector}"]`,
|
20
|
+
backdropSelector: `[data-dialog="${selector}"]`,
|
21
|
+
labelledby: `dialog-title-${selector}`,
|
22
|
+
describedby: `dialog-desc-${selector}`
|
23
|
+
}).open()
|
24
|
+
})()
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
<div class="row">
|
14
14
|
<div class="columns large-12 text-center">
|
15
|
-
<%= link_to t("decidim.links.warning.proceed"),
|
15
|
+
<%= link_to t("decidim.links.warning.proceed"), external_url.to_s, class: "button expanded primary" %>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
</div>
|
@@ -33,11 +33,7 @@
|
|
33
33
|
<span class="text-small">
|
34
34
|
<%= t("last_message", scope: "decidim.messaging.conversations.index") %>:
|
35
35
|
<strong>
|
36
|
-
|
37
|
-
<%= t("ago", scope: "decidim.messaging.conversations.index") %> <%= time_ago_in_words(Time.parse(conversation.last_message.created_at.to_s)) %>
|
38
|
-
<% else %>
|
39
|
-
<%= time_ago_in_words(Time.parse(conversation.last_message.created_at.to_s)) %> <%= t("ago", scope: "decidim.messaging.conversations.index") %>
|
40
|
-
<% end %>
|
36
|
+
<%= t("decidim.user_conversations.index.time_ago", time: time_ago_in_words(Time.zone.parse(conversation.last_message.created_at.to_s))) %>
|
41
37
|
</strong>
|
42
38
|
</span>
|
43
39
|
</div>
|
@@ -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
|
|
File without changes
|