decidim-restfull-core 0.3.11 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3e6299fd7301d95f23bd037f513cd022c35cfeaf20d68b5a4606713670b9754
4
- data.tar.gz: b0ff1f73f40d6be978e1d7aab95aae28c09d573f3d94f9501414d132fa8834d9
3
+ metadata.gz: f1998af7fe49264a3ba76d4e09a1a98375c7c148763e2f0c7eb140bc6e1b239a
4
+ data.tar.gz: bb828b8ba83541fef17330c285d74c7d0f5d0e15d839f428b7056265fa312fa8
5
5
  SHA512:
6
- metadata.gz: 6c06066d32d4fda3fa70a3f02c55de253739f1984d7f5bcc47067a67cd21bcbf64d35ab9f1846e16bb5d24bb5fcc6d58ff9fe6492b60d150c6150b742cfe4ecd
7
- data.tar.gz: 93ae3cfdd29e1c9e04142044239f33da156d6e64efd31e84e1e6b89870de3cc575491189e15efaf569d6885b0263a1c4edd9c7f8c23cdef1cab2ce52c71f5b33
6
+ metadata.gz: 93ec752e19bf14bc1a808fec638f2fcf79a616029389583f85fe2ce193ecbee3c46dee17ed90beef596e1bd9aeebc81a25acba2da3a1dccbfd273f9d040b048a
7
+ data.tar.gz: f79272b8170f69f34e8d5f0140ef9937ec0a0830aeacb0861b2bc06c30e898c9fead3f9920fcd79688380f7c06a5fcc572e6d41a5aacdf9646c012881f4f2b24
@@ -1,40 +1,42 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Toggle replaces system organizations/edit; inject after name-tab fields (tf in scope).
3
4
  Deface::Override.new(
4
- virtual_path: "decidim/system/organizations/edit",
5
+ virtual_path: "decidim_toggle/system/organizations/_default_form_tab",
5
6
  name: "system_host_input",
6
- replace: "erb[loud]:contains('f.text_field :host')",
7
+ insert_after: "erb[loud]:contains('tf.all_fields')",
7
8
  text: <<-ERB
8
- <%
9
- unconfirmed_host_help_text = if f.object.unconfirmed_host && f.object.unconfirmed_host != f.object.host
10
- t(
11
- "unconfirmed_host_pending_warning_html",
12
- scope: "decidim.rest_full.system.update_organization",
13
- unconfirmed_host: f.object.unconfirmed_host,
14
- host: f.object.host,
15
- a_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
16
- IPAddr.new(ip).ipv4?
17
- }.map { |ip| "\#{f.object.unconfirmed_host} A \#{ip}" }.join("<br />").html_safe,
18
- aaa_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
19
- IPAddr.new(ip).ipv6?
20
- }.map { |ip| "\#{f.object.unconfirmed_host} AAAA \#{ip}" }.join("<br />").html_safe
21
- )
22
- else
23
- t(
24
- "unconfirmed_host_explaination_html",
25
- scope: "decidim.rest_full.system.update_organization",
26
- unconfirmed_host: f.object.unconfirmed_host,
27
- host: f.object.host,
28
- a_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
29
- IPAddr.new(ip).ipv4?
30
- }.map { |ip| "\#{f.object.unconfirmed_host} A \#{ip}" }.join("<br />").html_safe,
31
- aaa_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
32
- IPAddr.new(ip).ipv6?
33
- }.map { |ip| "\#{f.object.unconfirmed_host} AAAA \#{ip}" }.join("<br />").html_safe
34
- )
35
- end
36
- %>
37
- <%= f.text_field :unconfirmed_host, help_text: unconfirmed_host_help_text, label: t("unconfirmed_host_label", scope: "decidim.rest_full.system.update_organization") %>
38
- <%= f.hidden_field :host %>
9
+ <% if tf.object.respond_to?(:unconfirmed_host) %>
10
+ <%
11
+ unconfirmed_host_help_text = if tf.object.unconfirmed_host && tf.object.unconfirmed_host != tf.object.host
12
+ t(
13
+ "unconfirmed_host_pending_warning_html",
14
+ scope: "decidim.rest_full.system.update_organization",
15
+ unconfirmed_host: tf.object.unconfirmed_host,
16
+ host: tf.object.host,
17
+ a_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
18
+ IPAddr.new(ip).ipv4?
19
+ }.map { |ip| "\#{tf.object.unconfirmed_host} A \#{ip}" }.join("<br />").html_safe,
20
+ aaa_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
21
+ IPAddr.new(ip).ipv6?
22
+ }.map { |ip| "\#{tf.object.unconfirmed_host} AAAA \#{ip}" }.join("<br />").html_safe
23
+ )
24
+ else
25
+ t(
26
+ "unconfirmed_host_explaination_html",
27
+ scope: "decidim.rest_full.system.update_organization",
28
+ unconfirmed_host: tf.object.unconfirmed_host,
29
+ host: tf.object.host,
30
+ a_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
31
+ IPAddr.new(ip).ipv4?
32
+ }.map { |ip| "\#{tf.object.unconfirmed_host} A \#{ip}" }.join("<br />").html_safe,
33
+ aaa_records: Decidim::RestFull.config.loadbalancer_ips.select { |ip|
34
+ IPAddr.new(ip).ipv6?
35
+ }.map { |ip| "\#{tf.object.unconfirmed_host} AAAA \#{ip}" }.join("<br />").html_safe
36
+ )
37
+ end
38
+ %>
39
+ <%= tf.text_field :unconfirmed_host, help_text: unconfirmed_host_help_text, label: t("unconfirmed_host_label", scope: "decidim.rest_full.system.update_organization") %>
40
+ <% end %>
39
41
  ERB
40
42
  )
@@ -50,6 +50,9 @@ module Decidim
50
50
  ::Decidim::ApplicationMailer.include(Decidim::RestFull::ApplicationMailerOverride)
51
51
  ::Decidim::System::UpdateOrganizationForm.include(Decidim::RestFull::UpdateOrganizationFormOverride)
52
52
  ::Decidim::System::UpdateOrganization.include(Decidim::RestFull::UpdateOrganizationCommandOverride)
53
+ if defined?(Decidim::Toggle::UpdateNameForm)
54
+ Decidim::Toggle::UpdateNameForm.include(Decidim::RestFull::UpdateOrganizationFormOverride)
55
+ end
53
56
 
54
57
  # Ransack attribute lists first; HasExtendedData then wraps them with extended_data.
55
58
  Decidim::RestFull::Core::Ransackers.register_ransackers!
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module RestFull
5
5
  def self.version
6
- "0.3.11" # DO NOT UPDATE MANUALLY
6
+ "0.3.12" # DO NOT UPDATE MANUALLY
7
7
  end
8
8
 
9
9
  def self.major_minor_version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-restfull-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hadrien Froger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-25 00:00:00.000000000 Z
11
+ date: 2026-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-session_store