diff --git a/.env-example b/.env-example
index f322eca..9d3b91a 100644
--- a/.env-example
+++ b/.env-example
@@ -39,3 +39,4 @@ TRANSLATION_SWITCH_REGEXP=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_SENDER=
+HALF_SIGNUP_TOS=false
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
index b170264..96324d1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -21,6 +21,11 @@ gem "decidim-slider", git: "https://github.com/alecslupu-pfa/decidim-module-slid
gem "decidim-spam_detection"
gem "decidim-term_customizer", git: "https://github.com/opensourcepolitics/decidim-module-term_customizer.git", branch: "fix/multi-threading-compliant-0.26"
+# PTP_MODULE_VERSION = { github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting" }
+gem "decidim-budgets_booth", github: "OpenSourcePolitics/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
+gem "decidim-smsauth", github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
+gem "decidim-sms-twilio", github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
+
# NOTE: Custom proposal states must be before simple_proposal
gem "decidim-custom_proposal_states", git: "https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states", branch: "chore/fix-module-dependency"
gem "decidim-simple_proposal", git: "https://github.com/mainio/decidim-module-simple_proposal", branch: DECIDIM_BRANCH
@@ -46,11 +51,6 @@ gem "sys-filesystem"
gem "omniauth-rails_csrf_protection"
gem "omniauth-saml"
-# PTP_MODULE_VERSION = { github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting" }
-gem "decidim-budgets_booth", github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
-gem "decidim-smsauth", github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
-gem "decidim-sms-twilio", github: "Pipeline-to-Power/decidim-module-ptp", branch: "feature/0.26/zip-code-voting"
-
group :development, :test do
gem "brakeman", "~> 5.1"
gem "byebug", "~> 11.0", platform: :mri
diff --git a/Gemfile.lock b/Gemfile.lock
index e96ba25..3671cfb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -19,6 +19,15 @@ GIT
rgeo (~> 2.4)
rgeo-proj4 (~> 3.1)
+GIT
+ remote: https://github.com/OpenSourcePolitics/decidim-module-ptp.git
+ revision: 6148a817251256d6f536f1f3478c8be895a518b0
+ branch: feature/0.26/zip-code-voting
+ specs:
+ decidim-budgets_booth (0.26.0)
+ decidim-budgets (~> 0.26.0)
+ decidim-core (~> 0.26.0)
+
GIT
remote: https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler
revision: 488cc8827845ec1c5266aa499df2ebf9b20e02a3
@@ -32,9 +41,6 @@ GIT
revision: 79f07fee09671661ab23e8a8c18e464a78d29966
branch: feature/0.26/zip-code-voting
specs:
- decidim-budgets_booth (0.26.0)
- decidim-budgets (~> 0.26.0)
- decidim-core (~> 0.26.0)
decidim-sms-twilio (0.26.0)
decidim-core (~> 0.26.0)
twilio-ruby (~> 5.72.0)
diff --git a/app/cells/decidim/budgets/project_vote_button/show.erb b/app/cells/decidim/budgets/project_vote_button/show.erb
new file mode 100644
index 0000000..0179922
--- /dev/null
+++ b/app/cells/decidim/budgets/project_vote_button/show.erb
@@ -0,0 +1,20 @@
+<%= action_authorized_button_to(
+ "vote",
+ budget_order_line_item_path(model.budget, project_id: model),
+ method: vote_button_method,
+ remote: true,
+ class: "button #{scale_up} #{selected_budget} customized-budget display-block project-vote-button",
+ data: {
+ add: !resource_added?,
+ disable: true,
+ budget: model.budget_amount,
+ project_id: model.id,
+ allocation: resource_allocation,
+ "redirect-url": budget_voting_index_path
+ },
+ disabled: vote_button_disabled?,
+ title: vote_button_label
+ ) do %>
+ <%= resource_added? ? t("remove_from_vote", scope: "decidim.budgets.project_vote_button") :t("add_to_vote", scope: "decidim.budgets.project_vote_button") %>
+<% end %>
+
diff --git a/app/views/layouts/decidim/_head_extra.html.erb b/app/views/layouts/decidim/_head_extra.html.erb
index 0e63e07..fa644a6 100644
--- a/app/views/layouts/decidim/_head_extra.html.erb
+++ b/app/views/layouts/decidim/_head_extra.html.erb
@@ -6,6 +6,7 @@
});
<% end %>
+
<% if translation_mode?(:google) %>
diff --git a/config/initializers/half_signup.rb b/config/initializers/half_signup.rb
new file mode 100644
index 0000000..602439a
--- /dev/null
+++ b/config/initializers/half_signup.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+Decidim::HalfSignup.configure do |config|
+ config.show_tos_page_after_signup = Rails.application.secrets.dig(:decidim, :module, :half_signup, :show_tos_page_after_signup)
+end
diff --git a/config/secrets.yml b/config/secrets.yml
index 7f4bb02..6a1106b 100644
--- a/config/secrets.yml
+++ b/config/secrets.yml
@@ -19,6 +19,9 @@ default: &default
google_tag_manager_id: <%= ENV["GOOGLE_TAG_MANAGER_ID"] %>
decidim:
currency: <%= ENV["CURRENCY"] || "€" %>
+ module:
+ half_signup:
+ show_tos_page_after_signup: <%= ENV["HALF_SIGNUP_TOS"] == "true" %>
throttling_max_requests: <%= ENV["THROTTLING_MAX_REQUESTS"] || 100 %>
throttling_period: <%= ENV["THROTTLING_PERIOD"] || 1 %>
translation_mode: <%= ENV["TRANSLATION_MODE"] || "none" %>