decidim-verify_wo_registration 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/decidim/verify_wo_registration/verifications_controller.rb +2 -0
- data/app/views/decidim/shared/_login_modal.html.erb +55 -43
- data/app/views/decidim/shared/_verify_wo_registration_login_modal_col1.html.erb +7 -9
- data/app/views/decidim/verify_wo_registration/verifications/_form.html.erb +7 -12
- data/app/views/decidim/verify_wo_registration/verifications/new.html.erb +17 -25
- data/lib/decidim/verify_wo_registration/version.rb +2 -2
- metadata +15 -17
- data/app/views/decidim/shared/_verify_wo_registration_login_modal.html.erb +0 -23
- data/app/views/decidim/shared/_verify_wo_registration_login_modal_col2.html.erb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486bb5c7e9ca2ebf28cf1d3f8d9c3b1deb4ecd5b6fbfc7281d49e80ae0c181dd
|
4
|
+
data.tar.gz: 301ba70919cc284dbcee731121e3065a594fbf3cfc8e7674e315d2012c80e89e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20a391e64c64aae3fc8cb4a05d490902cc5013b42144e1bb1a91bed8d7f8a1ea6cffc12c7f074a41e765486d356d0cb58401a330c35306bfc36a0403f21d9a30
|
7
|
+
data.tar.gz: f65b24ad7f7345f7ec1cf63802479c0eed7385ff7b146dc484f2b3d2ce4702fffc04778f9df8a1b9ef4499e9a46754f350a71fc78ccca0893791fe75d1c4e8c4
|
@@ -1,50 +1,62 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<div
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
<% verify_wo_registration_enabled = respond_to?(:current_component) && Decidim::VerifyWoRegistration::ApplicationHelper.verify_wo_registration_custom_modal?(current_component) %>
|
2
|
+
<%= decidim_modal id: "loginModal", class: "login__modal" do %>
|
3
|
+
|
4
|
+
<%
|
5
|
+
path = if content_for(:redirect_after_login)
|
6
|
+
session_path(:user, redirect_url: content_for(:redirect_after_login))
|
7
|
+
else
|
8
|
+
session_path(:user)
|
9
|
+
end
|
10
|
+
%>
|
11
|
+
|
12
|
+
<%= decidim_form_for(Decidim::User.new, namespace: "login", as: :user, url: path, html: { class: nil }) do |f| %>
|
13
|
+
<div data-dialog-container>
|
14
|
+
<%= icon "login-box-line", class: "w-6 h-6 text-gray fill-current" %>
|
15
|
+
<h3 id="dialog-title-loginModal" class="h3"><%= verify_wo_registration_enabled ? t("verify_wo_registration.login_modal.title") : t(".please_log_in") %></h3>
|
16
|
+
<div>
|
17
|
+
<% if verify_wo_registration_enabled %>
|
18
|
+
<h4 class="h4"><%= t("verify_wo_registration.login_modal.col1_title") %></h4>
|
19
|
+
|
20
|
+
<%= render "decidim/shared/verify_wo_registration_login_modal_col1" %>
|
21
|
+
|
22
|
+
<h4 class="h4"><%= t("verify_wo_registration.login_modal.col2_title") %></h4>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% if current_organization.sign_in_enabled? %>
|
26
|
+
<% cache current_organization do %>
|
27
|
+
<%= render partial: "decidim/devise/shared/omniauth_buttons", locals: { is_horizontal: true } %>
|
27
28
|
<% end %>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
|
30
|
+
<div class="form__wrapper">
|
31
|
+
<%= f.email_field :email, autocomplete: "email", placeholder: t("placeholder_email", scope: "decidim.devise.shared") %>
|
32
|
+
|
33
|
+
<%= render partial: "decidim/account/password_fields", locals: { form: f } %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="login__modal-links">
|
37
|
+
<%= link_to t(".sign_up"), decidim.new_user_registration_path, class: "sign-up-link" if current_organization.sign_up_enabled? %>
|
34
38
|
<%= link_to t("devise.shared.links.forgot_your_password"), new_password_path(:user) %>
|
35
|
-
</
|
39
|
+
</div>
|
40
|
+
<% else %>
|
41
|
+
<%= cell("decidim/announcement", t("sign_in_disabled", scope: "decidim.devise.sessions.new"), callout_class: "warning" ) %>
|
42
|
+
|
43
|
+
<% cache current_organization do %>
|
44
|
+
<%= render partial: "decidim/devise/shared/omniauth_buttons", locals: { is_horizontal: true } %>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
36
47
|
</div>
|
37
48
|
</div>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
49
|
+
|
50
|
+
<% if current_organization.sign_in_enabled? %>
|
51
|
+
<div data-dialog-actions>
|
52
|
+
<button type="button" class="button button__lg button__transparent-secondary" data-dialog-close="loginModal">
|
53
|
+
<%= t("cancel", scope: "decidim.admin.actions") %>
|
54
|
+
</button>
|
55
|
+
<button type="submit" class="button button__lg button__secondary">
|
56
|
+
<%= t("devise.sessions.new.log_in") %>
|
57
|
+
<%= icon "arrow-right-line", class: "fill-current" %>
|
58
|
+
</button>
|
45
59
|
</div>
|
46
|
-
|
47
|
-
<%= render "decidim/devise/shared/omniauth_buttons" %>
|
60
|
+
<% end %>
|
48
61
|
<% end %>
|
49
|
-
</div>
|
50
62
|
<% end %>
|
@@ -1,10 +1,8 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}), class: "button expanded") %>
|
9
|
-
</div>
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<%= link_to(t("verify_wo_registration.login_modal.col1_only_verify_btn"),
|
3
|
+
Decidim::VerifyWoRegistration::Engine.routes.url_helpers.new_verification_path({
|
4
|
+
component_id: current_component.id,
|
5
|
+
redirect_url: URI(request.original_fullpath).path,
|
6
|
+
votable_gid: "gid"
|
7
|
+
}), class: "button button__lg button__secondary") %>
|
10
8
|
</div>
|
@@ -1,15 +1,10 @@
|
|
1
1
|
<% form.object.authorization_handlers.each_with_index do |handler, handler_idx| %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<h2 class="h3">
|
3
|
+
<%= t("authorize_with", authorizer: t("#{handler.handler_name}.name", scope: "decidim.authorization_handlers"), scope: "decidim.verifications.authorizations.new") %>
|
4
|
+
</h2>
|
5
|
+
<%= form.fields_for "authorizations[#{handler_idx}]", handler, builder: Decidim::AuthorizationFormBuilder do |handler_form| %>
|
6
|
+
<div id="authorization-handler-<%= handler_form.object.handler_name %>" class="authorization-handler form__wrapper">
|
7
|
+
<%= render "handler_form", handler_form: handler_form %>
|
7
8
|
</div>
|
8
|
-
|
9
|
-
<%= form.fields_for "authorizations[#{handler_idx}]", handler, builder: Decidim::AuthorizationFormBuilder do |handler_form| %>
|
10
|
-
<div id="authorization-handler-<%= handler_form.object.handler_name %>" class="authorization-handler">
|
11
|
-
<%= render "handler_form", handler_form: handler_form %>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
</div>
|
9
|
+
<% end %>
|
15
10
|
<% end %>
|
@@ -1,27 +1,19 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="row">
|
11
|
-
<div class="columns large-6 medium-centered">
|
12
|
-
<%= decidim_form_for(@form, url: verifications_path, html: { class: "form" }) do |form| %>
|
13
|
-
<div class="card">
|
14
|
-
<div class="card__content">
|
15
|
-
<%= render partial: "form", object: form %>
|
16
|
-
<%= form.hidden_field :component_id %>
|
17
|
-
<%= form.hidden_field :redirect_url %>
|
18
|
-
</div>
|
19
|
-
</div>
|
1
|
+
<div class="text-center py-10">
|
2
|
+
<h1 class="title-decorator inline-block text-left">
|
3
|
+
<%= t("verify_wo_registration.form.title") %>
|
4
|
+
</h1>
|
5
|
+
</div>
|
6
|
+
<p><%= t("verify_wo_registration.form.description") %></p>
|
7
|
+
<%= cell("decidim/announcement", { announcement: t("verify_wo_registration.form.announcement", minutes: ::Decidim::ImpersonationLog::SESSION_TIME_IN_MINUTES), callout_class: "warning" }) %>
|
20
8
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
9
|
+
<%= decidim_form_for(@form, url: verifications_path) do |form| %>
|
10
|
+
<%= render partial: "form", object: form %>
|
11
|
+
<%= form.hidden_field :component_id %>
|
12
|
+
<%= form.hidden_field :redirect_url %>
|
13
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
14
|
+
<button type="submit" class="button button__sm md:button__lg button__secondary">
|
15
|
+
<%= t("verify_wo_registration.form.submit_btn") %>
|
16
|
+
<%= icon "arrow-right-line", class: "fill-current" %>
|
17
|
+
</button>
|
25
18
|
</div>
|
26
|
-
|
27
|
-
</div>
|
19
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-verify_wo_registration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Valls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-budgets
|
@@ -16,84 +16,84 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.28'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.28'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.28'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.28'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-proposals
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.28'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.28'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.28'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.28'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: decidim-dev
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.28'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.28'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: decidim-participatory_processes
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.28'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.28'
|
97
97
|
description: Adds the hability for proposals and budgets components to allow users
|
98
98
|
to give support without being registered. Enabling this feature the user is requested
|
99
99
|
for verification and then, on success, logged in in a 30min session..
|
@@ -115,9 +115,7 @@ files:
|
|
115
115
|
- app/models/decidim/verify_wo_registration/application_record.rb
|
116
116
|
- app/packs/images/decidim/verify_wo_registration/icon.svg
|
117
117
|
- app/views/decidim/shared/_login_modal.html.erb
|
118
|
-
- app/views/decidim/shared/_verify_wo_registration_login_modal.html.erb
|
119
118
|
- app/views/decidim/shared/_verify_wo_registration_login_modal_col1.html.erb
|
120
|
-
- app/views/decidim/shared/_verify_wo_registration_login_modal_col2.html.erb
|
121
119
|
- app/views/decidim/verify_wo_registration/verifications/_form.html.erb
|
122
120
|
- app/views/decidim/verify_wo_registration/verifications/_handler_form.html.erb
|
123
121
|
- app/views/decidim/verify_wo_registration/verifications/new.html.erb
|
@@ -152,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
150
|
- !ruby/object:Gem::Version
|
153
151
|
version: '0'
|
154
152
|
requirements: []
|
155
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.3.7
|
156
154
|
signing_key:
|
157
155
|
specification_version: 4
|
158
156
|
summary: Adds the hability for proposals and budgets components to allow users to
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<div class="reveal two_columns" id="loginModal" data-reveal>
|
2
|
-
<div class="reveal__header">
|
3
|
-
<h3 class="reveal__title"><%= t("verify_wo_registration.login_modal.title") %></h3>
|
4
|
-
<button class="close-button" data-close aria-label="Close modal"
|
5
|
-
type="button">
|
6
|
-
<span aria-hidden="true">×</span>
|
7
|
-
</button>
|
8
|
-
</div>
|
9
|
-
<div class="row">
|
10
|
-
<div class="columns medium-6">
|
11
|
-
<div class="columns medium-centered">
|
12
|
-
<h5><%= t("verify_wo_registration.login_modal.col1_title") %></h5>
|
13
|
-
<%= render "decidim/shared/verify_wo_registration_login_modal_col1" %>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
<div class="columns medium-6">
|
17
|
-
<div class="columns medium-centered">
|
18
|
-
<h5><%= t("verify_wo_registration.login_modal.col2_title") %></h5>
|
19
|
-
<%= render "decidim/shared/verify_wo_registration_login_modal_col2" %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
</div>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<% if current_organization.sign_in_enabled? %>
|
2
|
-
<%= decidim_form_for(Decidim::User.new, as: :user, url: session_path(:user), html: { class: "register-form new_user" }) do |f| %>
|
3
|
-
<div>
|
4
|
-
<div class="field">
|
5
|
-
<%= f.email_field :email, autofocus: true %>
|
6
|
-
</div>
|
7
|
-
<div class="field">
|
8
|
-
<%= f.password_field :password, autocomplete: "off" %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<div class="actions">
|
12
|
-
<%= f.submit t("devise.sessions.new.sign_in"), class: "button expanded" %>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<% if current_organization.sign_up_enabled? %>
|
16
|
-
<p class="text-center">
|
17
|
-
<%= link_to t("decidim.shared.login_modal.sign_up"), decidim.new_user_registration_path, class: "sign-up-link" %>
|
18
|
-
</p>
|
19
|
-
<% end %>
|
20
|
-
<p class="text-center">
|
21
|
-
<%= link_to t("devise.shared.links.forgot_your_password"), new_password_path(:user) %>
|
22
|
-
</p>
|
23
|
-
<div style="box-sizing: unset">
|
24
|
-
<%= render "decidim/devise/shared/omniauth_buttons_mini" %>
|
25
|
-
</div>
|
26
|
-
<% else %>
|
27
|
-
<p style="box-sizing: unset">
|
28
|
-
<%= t("sign_in_disabled", scope: "decidim.devise.sessions.new") %>
|
29
|
-
</p>
|
30
|
-
<%= render "decidim/devise/shared/omniauth_buttons" %>
|
31
|
-
<% end %>
|