decidim-system 0.27.4 → 0.28.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -7
  3. data/app/commands/decidim/system/create_admin.rb +1 -1
  4. data/app/commands/decidim/system/create_default_content_blocks.rb +1 -14
  5. data/app/commands/decidim/system/create_default_pages.rb +23 -4
  6. data/app/commands/decidim/system/populate_help.rb +2 -2
  7. data/app/commands/decidim/system/register_organization.rb +15 -2
  8. data/app/commands/decidim/system/update_admin.rb +1 -1
  9. data/app/commands/decidim/system/update_organization.rb +2 -1
  10. data/app/controllers/decidim/system/application_controller.rb +2 -1
  11. data/app/controllers/decidim/system/dashboard_controller.rb +1 -0
  12. data/app/controllers/decidim/system/organizations_controller.rb +30 -4
  13. data/app/forms/decidim/system/admin_form.rb +2 -2
  14. data/app/forms/decidim/system/update_organization_form.rb +14 -2
  15. data/app/jobs/decidim/system/application_job.rb +1 -1
  16. data/app/packs/entrypoints/decidim_system.js +5 -3
  17. data/app/packs/stylesheets/decidim/system/application.scss +108 -21
  18. data/app/views/decidim/system/admins/_form.html.erb +1 -7
  19. data/app/views/decidim/system/admins/edit.html.erb +5 -3
  20. data/app/views/decidim/system/admins/index.html.erb +5 -31
  21. data/app/views/decidim/system/admins/new.html.erb +5 -3
  22. data/app/views/decidim/system/dashboard/show.html.erb +15 -3
  23. data/app/views/decidim/system/devise/mailers/password_change.html.erb +1 -1
  24. data/app/views/decidim/system/devise/mailers/reset_password_instructions.html.erb +2 -2
  25. data/app/views/decidim/system/devise/passwords/edit.html.erb +6 -9
  26. data/app/views/decidim/system/devise/passwords/new.html.erb +5 -5
  27. data/app/views/decidim/system/devise/sessions/new.html.erb +10 -12
  28. data/app/views/decidim/system/devise/shared/_links.html.erb +5 -11
  29. data/app/views/decidim/system/oauth_applications/_form.html.erb +5 -20
  30. data/app/views/decidim/system/oauth_applications/edit.html.erb +11 -11
  31. data/app/views/decidim/system/oauth_applications/index.html.erb +8 -8
  32. data/app/views/decidim/system/oauth_applications/new.html.erb +11 -11
  33. data/app/views/decidim/system/oauth_applications/show.html.erb +22 -23
  34. data/app/views/decidim/system/organizations/_advanced_settings.html.erb +10 -8
  35. data/app/views/decidim/system/organizations/_csp_settings.html.erb +12 -0
  36. data/app/views/decidim/system/organizations/_file_upload_settings.erb +23 -46
  37. data/app/views/decidim/system/organizations/_omniauth_provider.html.erb +13 -16
  38. data/app/views/decidim/system/organizations/_omniauth_settings.html.erb +6 -8
  39. data/app/views/decidim/system/organizations/_smtp_settings.html.erb +12 -22
  40. data/app/views/decidim/system/organizations/edit.html.erb +35 -26
  41. data/app/views/decidim/system/organizations/index.html.erb +5 -4
  42. data/app/views/decidim/system/organizations/new.html.erb +34 -45
  43. data/app/views/decidim/system/shared/_admins_list.html.erb +27 -0
  44. data/app/views/decidim/system/shared/_notices.html.erb +4 -6
  45. data/app/views/decidim/system/shared/_organizations_list.html.erb +10 -3
  46. data/app/views/layouts/decidim/system/_header.html.erb +2 -2
  47. data/app/views/layouts/decidim/system/_login_items.html.erb +3 -7
  48. data/app/views/layouts/decidim/system/_sidebar.html.erb +3 -7
  49. data/app/views/layouts/decidim/system/application.html.erb +27 -30
  50. data/app/views/layouts/decidim/system/login.html.erb +10 -9
  51. data/config/environment.rb +3 -0
  52. data/config/locales/ar.yml +0 -14
  53. data/config/locales/bg.yml +0 -1
  54. data/config/locales/ca.yml +96 -12
  55. data/config/locales/cs.yml +97 -12
  56. data/config/locales/de.yml +92 -15
  57. data/config/locales/el.yml +9 -12
  58. data/config/locales/en.yml +97 -12
  59. data/config/locales/es-MX.yml +97 -12
  60. data/config/locales/es-PY.yml +97 -12
  61. data/config/locales/es.yml +97 -12
  62. data/config/locales/eu.yml +112 -27
  63. data/config/locales/fi-plain.yml +96 -12
  64. data/config/locales/fi.yml +96 -12
  65. data/config/locales/fr-CA.yml +65 -12
  66. data/config/locales/fr.yml +81 -12
  67. data/config/locales/ga-IE.yml +0 -2
  68. data/config/locales/gl.yml +0 -14
  69. data/config/locales/hu.yml +19 -11
  70. data/config/locales/id-ID.yml +0 -11
  71. data/config/locales/is-IS.yml +0 -4
  72. data/config/locales/it.yml +0 -14
  73. data/config/locales/ja.yml +64 -12
  74. data/config/locales/lt.yml +19 -12
  75. data/config/locales/lv.yml +0 -11
  76. data/config/locales/nl.yml +0 -13
  77. data/config/locales/no.yml +0 -14
  78. data/config/locales/pl.yml +0 -14
  79. data/config/locales/pt-BR.yml +0 -14
  80. data/config/locales/pt.yml +0 -14
  81. data/config/locales/ro-RO.yml +3 -13
  82. data/config/locales/ru.yml +0 -11
  83. data/config/locales/sk.yml +0 -11
  84. data/config/locales/sl.yml +0 -8
  85. data/config/locales/sq-AL.yml +1 -0
  86. data/config/locales/sv.yml +0 -14
  87. data/config/locales/th-TH.yml +1 -0
  88. data/config/locales/tr-TR.yml +3 -14
  89. data/config/locales/uk.yml +0 -10
  90. data/config/locales/zh-CN.yml +0 -12
  91. data/config/locales/zh-TW.yml +8 -11
  92. data/config/routes.rb +6 -2
  93. data/db/seeds.rb +1 -1
  94. data/lib/decidim/system/engine.rb +2 -25
  95. data/lib/decidim/system/menu.rb +35 -0
  96. data/lib/decidim/system/version.rb +1 -1
  97. data/lib/tasks/decidim_system.rake +1 -1
  98. metadata +28 -24
  99. data/app/packs/entrypoints/decidim_system.scss +0 -1
  100. data/app/packs/src/decidim/system/application.js +0 -41
  101. data/app/packs/stylesheets/decidim/system/_actions.scss +0 -8
  102. data/app/packs/stylesheets/decidim/system/_forms.scss +0 -36
  103. data/app/packs/stylesheets/decidim/system/_foundation_and_overrides.scss +0 -53
  104. data/app/packs/stylesheets/decidim/system/_layout.scss +0 -18
  105. data/app/packs/stylesheets/decidim/system/_login.scss +0 -37
  106. data/app/packs/stylesheets/decidim/system/_settings.scss +0 -569
  107. data/app/packs/stylesheets/decidim/system/_sidebar.scss +0 -83
  108. data/app/packs/stylesheets/decidim/system/_tables.scss +0 -6
  109. data/app/views/decidim/system/admins/show.html.erb +0 -9
  110. data/app/views/decidim/system/organizations/show.html.erb +0 -10
@@ -1,22 +1,19 @@
1
- <h2>Change your password</h2>
1
+ <h2 class="h3"> <%= link_to t(".change_your_password") %></h2>
2
2
 
3
3
  <%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= render "devise/shared/error_messages", resource: resource %>
4
+ <%= render "devise/shared/error_messages", resource: %>
5
5
  <%= f.hidden_field :reset_password_token %>
6
6
 
7
- <div class="field">
7
+ <div class="form__wrapper">
8
8
  <% if @minimum_password_length %>
9
- <em>(<%= @minimum_password_length %> characters minimum)</em><br>
9
+ <em><%= t(".minimum_characters", minimum: @minimum_password_length) %></em><br>
10
10
  <% end %>
11
11
  <%= f.password_field :password, autofocus: true, autocomplete: "off" %>
12
- </div>
13
-
14
- <div class="field">
15
12
  <%= f.password_field :password_confirmation, autocomplete: "off" %>
16
13
  </div>
17
14
 
18
- <div class="actions">
19
- <%= f.submit "Change my password" %>
15
+ <div class="form__wrapper-block">
16
+ <%= f.submit "Change my password", class: "button button__sm md:button__lg md:button__lg button__secondary" %>
20
17
  </div>
21
18
  <% end %>
22
19
 
@@ -1,14 +1,14 @@
1
- <h2>Forgot your password?</h2>
1
+ <h2 class="h3"><%= link_to t(".forgot_your_password") %></h2>
2
2
 
3
3
  <%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= render "devise/shared/error_messages", resource: resource %>
4
+ <%= render "devise/shared/error_messages", resource: %>
5
5
 
6
- <div class="field">
6
+ <div class="form__wrapper">
7
7
  <%= f.email_field :email, autofocus: true %>
8
8
  </div>
9
9
 
10
- <div class="actions">
11
- <%= f.submit "Send me reset password instructions" %>
10
+ <div class="form__wrapper-block">
11
+ <%= f.submit t(".send_me_reset_password_instructions"), class: "button button__sm md:button__lg md:button__lg button__secondary" %>
12
12
  </div>
13
13
  <% end %>
14
14
 
@@ -1,23 +1,21 @@
1
- <h2>Log in</h2>
1
+ <h2 class="h3"><%= t("log_in", scope: "decidim.system.devise.shared.links") %></h2>
2
2
 
3
3
  <%= decidim_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
- <div class="field">
4
+ <div class="form__wrapper">
5
5
  <%= f.email_field :email, autofocus: true %>
6
- </div>
7
6
 
8
- <div class="field">
9
7
  <%= f.password_field :password, autocomplete: "off" %>
10
- </div>
11
8
 
12
- <% if devise_mapping.rememberable? -%>
13
- <div class="field">
9
+ <% if devise_mapping.rememberable? -%>
14
10
  <%= f.check_box :remember_me %>
15
- </div>
16
- <% end -%>
11
+ <% end -%>
12
+ </div>
17
13
 
18
- <div class="actions">
19
- <%= f.submit "Log in" %>
14
+ <div class="form__wrapper-block">
15
+ <%= f.submit t("log_in", scope: "decidim.system.devise.shared.links"), class: "button button__sm md:button__lg md:button__lg button__secondary" %>
20
16
  </div>
21
17
  <% end %>
22
18
 
23
- <%= render "decidim/system/devise/shared/links" %>
19
+ <div class="flex flex-col [&>a]:text-secondary hover:[&>a]:underline [&>a]:w-fit [&>a]:mt-4">
20
+ <%= render "decidim/system/devise/shared/links" %>
21
+ </div>
@@ -1,25 +1,19 @@
1
1
  <%- if controller_name != 'sessions' %>
2
- <%= link_to "Log in", new_session_path(resource_name) %><br>
2
+ <%= link_to t(".log_in"), new_session_path(resource_name) %>
3
3
  <% end -%>
4
4
 
5
5
  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
- <%= link_to "Sign up", new_registration_path(resource_name) %><br>
6
+ <%= link_to t(".sign_up"), new_registration_path(resource_name) %>
7
7
  <% end -%>
8
8
 
9
9
  <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
- <%= link_to "Forgot your password?", new_password_path(resource_name) %><br>
10
+ <%= link_to t(".forgot_your_password?"), new_password_path(resource_name) %>
11
11
  <% end -%>
12
12
 
13
13
  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br>
14
+ <%= link_to t(".did_not_receive_confirmation_instructions?"), new_confirmation_path(resource_name) %>
15
15
  <% end -%>
16
16
 
17
17
  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br>
19
- <% end -%>
20
-
21
- <%- if devise_mapping.omniauthable? %>
22
- <%- current_organization.enabled_omniauth_providers.keys.each do |provider| %>
23
- <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br>
24
- <% end -%>
18
+ <%= link_to t(".did_not_receive_unlock_instructions?"), new_unlock_path(resource_name) %>
25
19
  <% end -%>
@@ -1,26 +1,11 @@
1
- <div class="row column">
1
+ <div class="form__wrapper">
2
2
  <%= form.text_field :name %>
3
- </div>
4
-
5
- <div class="row column">
6
3
  <%= form.text_field :redirect_uri %>
7
- </div>
8
-
9
- <div class="row column">
10
4
  <%= form.select :decidim_organization_id,
11
- Decidim::Organization.pluck(:name, :id),
12
- { include_blank: t(".select_organization") },
13
- { multiple: false } %>
14
- </div>
15
-
16
- <div class="row column">
5
+ Decidim::Organization.pluck(:name, :id),
6
+ { include_blank: t(".select_organization") },
7
+ { multiple: false } %>
17
8
  <%= form.text_field :organization_name %>
18
- </div>
19
-
20
- <div class="row column">
21
9
  <%= form.text_field :organization_url %>
22
- </div>
23
-
24
- <div class="row column">
25
- <%= form.upload :organization_logo, required: true %>
10
+ <%= form.upload :organization_logo, required: true, button_class: "button button__lg button__transparent-primary" %>
26
11
  </div>
@@ -1,13 +1,13 @@
1
- <%= decidim_form_for(@form, html: { class: "form edit_oauth_application" }) do |f| %>
2
- <div class="card">
3
- <div class="card-divider">
4
- <h2 class="card-title"><%= t ".title" %></h2>
5
- </div>
6
- <div class="card-section">
7
- <%= render partial: "form", object: f %>
8
- </div>
9
- </div>
10
- <div class="button--double form-general-submit">
11
- <%= f.submit t(".save") %>
1
+ <% add_decidim_page_title(t(".title")) %>
2
+
3
+ <% provide :title do %>
4
+ <h1 class="h1"><%= t ".title" %></h1>
5
+ <% end %>
6
+
7
+ <%= decidim_form_for(@form) do |f| %>
8
+ <%= render partial: "form", object: f %>
9
+
10
+ <div class="form__wrapper-block">
11
+ <%= f.submit t(".save"), class: "button button__sm md:button__lg button__primary" %>
12
12
  </div>
13
13
  <% end %>
@@ -1,12 +1,12 @@
1
+ <% add_decidim_page_title(t(".title")) %>
2
+
1
3
  <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
4
+ <h1 class="h1"><%= t ".title" %></h1>
3
5
  <% end %>
4
6
 
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.system", name: t("models.oauth_application.name", scope: "decidim.system")), [:new, :oauth_application], class: "new" %>
7
- </div>
7
+ <%= link_to t("actions.new_oauth_application", scope: "decidim.system"), [:new, :oauth_application], class: "button button__sm md:button__lg button__primary" %>
8
8
 
9
- <table class="stack">
9
+ <table>
10
10
  <thead>
11
11
  <tr>
12
12
  <th></th>
@@ -20,20 +20,20 @@
20
20
  <% @oauth_applications.each do |oauth_application| %>
21
21
  <tr>
22
22
  <td>
23
- <%= image_tag oauth_application.attached_uploader(:organization_logo).path %>
23
+ <%= image_tag oauth_application.attached_uploader(:organization_logo).path, class: "max-w-md" %>
24
24
  </td>
25
25
  <td>
26
26
  <%= link_to oauth_application.name, oauth_application %><br>
27
27
  </td>
28
28
  <td>
29
- <%= link_to oauth_application.organization_name, oauth_application.organization %><br>
29
+ <%= link_to oauth_application.organization_name, edit_organization_path(oauth_application.organization) %><br>
30
30
  </td>
31
31
  <td>
32
32
  <%= l oauth_application.created_at, format: :short %>
33
33
  </td>
34
34
  <td class="actions">
35
35
  <%= link_to t("actions.edit", scope: "decidim.system"), [:edit, oauth_application] %>
36
- <%= link_to t("actions.destroy", scope: "decidim.system"), oauth_application, method: :delete, class: "small alert button", data: { confirm: t(".confirm_delete") } %>
36
+ <%= link_to t("actions.destroy", scope: "decidim.system"), oauth_application, method: :delete, data: { confirm: t(".confirm_delete") } %>
37
37
  </td>
38
38
  </tr>
39
39
  <% end %>
@@ -1,13 +1,13 @@
1
- <%= decidim_form_for(@form, html: { class: "form new_oauth_application" }) do |f| %>
2
- <div class="card">
3
- <div class="card-divider">
4
- <h2 class="card-title"><%= t ".title" %></h2>
5
- </div>
6
- <div class="card-section">
7
- <%= render partial: "form", object: f %>
8
- </div>
9
- </div>
10
- <div class="button--double form-general-submit">
11
- <%= f.submit t(".save") %>
1
+ <% add_decidim_page_title(t(".title")) %>
2
+
3
+ <% provide :title do %>
4
+ <h1 class="h1"><%= t ".title" %></h1>
5
+ <% end %>
6
+
7
+ <%= decidim_form_for(@form) do |f| %>
8
+ <%= render partial: "form", object: f %>
9
+
10
+ <div class="form__wrapper-block">
11
+ <%= f.submit t(".save"), class: "button button__sm md:button__lg button__primary" %>
12
12
  </div>
13
13
  <% end %>
@@ -1,27 +1,26 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= @oauth_application.name %></h2>
4
- </div>
5
- <div class="card-section">
6
- <dl>
7
- <%= display_for @oauth_application,
8
- { uid: :client_id },
9
- { secret: :client_secret },
10
- :organization_name,
11
- :organization_url,
12
- :redirect_uri %>
1
+ <% add_decidim_page_title(@oauth_application.name) %>
13
2
 
14
- <dt><%= display_label(@oauth_application, :authorize_url) %></dt>
15
- <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host) %></dd>
3
+ <% provide :title do %>
4
+ <h1 class="h1"><%= @oauth_application.name %></h1>
5
+ <% end %>
16
6
 
17
- <dt><%= display_label(@oauth_application, :site) %></dt>
18
- <dd><%= decidim.root_url(host: @oauth_application.owner.host) %></dd>
7
+ <dl>
8
+ <%= display_for @oauth_application,
9
+ { uid: :client_id },
10
+ { secret: :client_secret },
11
+ :organization_name,
12
+ :organization_url,
13
+ :redirect_uri %>
19
14
 
20
- <dt><%= display_label(@oauth_application, :authorized_tokens) %></dt>
21
- <dd><%= @oauth_application.authorized_tokens.count %></dd>
15
+ <dt><%= display_label(@oauth_application, :authorize_url) %></dt>
16
+ <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host) %></dd>
22
17
 
23
- <dt><%= display_label(@oauth_application, :authorization_url) %></dt>
24
- <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host, client_id: @oauth_application.uid, redirect_uri: @oauth_application.redirect_uri, response_type: "code") %></dd>
25
- </dl>
26
- </div>
27
- </div>
18
+ <dt><%= display_label(@oauth_application, :site) %></dt>
19
+ <dd><%= decidim.root_url(host: @oauth_application.owner.host) %></dd>
20
+
21
+ <dt><%= display_label(@oauth_application, :authorized_tokens) %></dt>
22
+ <dd><%= @oauth_application.authorized_tokens.count %></dd>
23
+
24
+ <dt><%= display_label(@oauth_application, :authorization_url) %></dt>
25
+ <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host, client_id: @oauth_application.uid, redirect_uri: @oauth_application.redirect_uri, response_type: "code") %></dd>
26
+ </dl>
@@ -1,10 +1,12 @@
1
- <div class="row column">
2
- <button type="button" class="button collapse hide"><%= t(".hide") %></button>
3
- <button type="button" class="button expand"><%= t(".show") %></button>
4
- </div>
1
+ <button id="advanced-settings-trigger" data-component="dropdown" data-target="advanced-settings-panel" type="button" class="button button__sm md:button__lg button__primary w-fit" aria-expanded="false">
2
+ <span><%= t(".show") %></span>
3
+ <span><%= t(".hide") %></span>
4
+ </button>
5
5
 
6
- <div class="collapsible hide">
7
- <%= render partial: "smtp_settings", locals: { f: f } %>
8
- <%= render partial: "omniauth_settings", locals: { f: f } %>
9
- <%= render partial: "file_upload_settings", locals: { f: f } %>
6
+ <div id="advanced-settings-panel" aria-hidden="true">
7
+ <% %w(smtp_settings omniauth_settings file_upload_settings csp_settings).each do |partial| %>
8
+ <div class="border-2 rounded border-background p-4 form__wrapper mt-8 first:mt-0 last:pb-4">
9
+ <%= render partial:, locals: { f: } %>
10
+ </div>
11
+ <% end %>
10
12
  </div>
@@ -0,0 +1,12 @@
1
+ <h3 class="h4"><%= t("decidim.system.models.organization.fields.content_security_policy") %></h3>
2
+
3
+ <%= f.fields_for :content_security_policy do %>
4
+ <%= f.text_field "default-src".to_sym, label: t(".default_src"), help_text: t(".default_src_hint") %>
5
+ <%= f.text_field "img-src".to_sym, label: t(".img_src"), help_text: t(".img_src_hint") %>
6
+ <%= f.text_field "media-src".to_sym, label: t(".media_src"), help_text: t(".media_src_hint") %>
7
+ <%= f.text_field "script-src".to_sym, label: t(".script_src"), help_text: t(".script_src_hint") %>
8
+ <%= f.text_field "style-src".to_sym, label: t(".style_src"), help_text: t(".style_src_hint") %>
9
+ <%= f.text_field "frame-src".to_sym, label: t(".frame_src"), help_text: t(".frame_src_hint") %>
10
+ <%= f.text_field "font-src".to_sym, label: t(".font_src"), help_text: t(".font_src_hint") %>
11
+ <%= f.text_field "connect-src".to_sym, label: t(".connect_src"), help_text: t(".connect_src_hint") %>
12
+ <% end %>
@@ -1,56 +1,33 @@
1
- <div class="fieldset">
2
- <h4><%= t("decidim.system.models.organization.fields.file_upload_settings") %></h4>
3
- <p><%= t(".intro") %></p>
1
+ <h3 class="h4"><%= t("decidim.system.models.organization.fields.file_upload_settings") %></h3>
2
+ <p class="help-text"><%= t(".intro") %></p>
4
3
 
5
- <%= f.fields_for :file_upload_settings, f.object.file_upload_settings do |settings_form| %>
6
- <%= settings_form.fields_for :allowed_file_extensions, OpenStruct.new(settings_form.object.allowed_file_extensions) do |extensions_form| %>
7
- <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.allowed_file_extensions" %>
4
+ <%= f.fields_for :file_upload_settings, f.object.file_upload_settings do |settings_form| %>
5
+ <%= settings_form.fields_for :allowed_file_extensions, OpenStruct.new(settings_form.object.allowed_file_extensions) do |extensions_form| %>
6
+ <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.allowed_file_extensions" %>
8
7
 
9
- <h5><%= t(".file_extensions.title") %></h5>
10
-
11
- <div class="field">
12
- <%= extensions_form.text_field :default, class: "js-tags-container", label: t("default", scope: i18n_scope) %>
13
- <p class="help-text"><%= t(".file_extensions.default_hint") %></p>
14
- </div>
15
- <div class="field">
16
- <%= extensions_form.text_field :image, class: "js-tags-container", label: t("image", scope: i18n_scope) %>
17
- <p class="help-text"><%= t(".file_extensions.image_hint") %></p>
18
- </div>
19
- <div class="field">
20
- <%= extensions_form.text_field :admin, class: "js-tags-container", label: t("admin", scope: i18n_scope) %>
21
- <p class="help-text"><%= t(".file_extensions.admin_hint") %></p>
22
- </div>
8
+ <%= field_set_tag f.label(t(".file_extensions.title"), nil, for: nil), class: "border-2 border-background p-4 form__wrapper" do %>
9
+ <%= extensions_form.text_field :default, class: "js-tags-container mt-4", label: t("default", scope: i18n_scope), help_text: t(".file_extensions.default_hint") %>
10
+ <%= extensions_form.text_field :image, class: "js-tags-container mt-4", label: t("image", scope: i18n_scope), help_text: t(".file_extensions.image_hint") %>
11
+ <%= extensions_form.text_field :admin, class: "js-tags-container mt-4", label: t("admin", scope: i18n_scope), help_text: t(".file_extensions.admin_hint") %>
23
12
  <% end %>
13
+ <% end %>
24
14
 
25
- <%= settings_form.fields_for :allowed_content_types, OpenStruct.new(settings_form.object.allowed_content_types) do |extensions_form| %>
26
- <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.allowed_content_types" %>
27
-
28
- <h5><%= t(".content_types.title") %></h5>
29
- <p><%= t(".content_types.intro_html") %></p>
15
+ <%= settings_form.fields_for :allowed_content_types, OpenStruct.new(settings_form.object.allowed_content_types) do |extensions_form| %>
16
+ <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.allowed_content_types" %>
30
17
 
31
- <div class="field">
32
- <%= extensions_form.text_field :default, class: "js-tags-container", label: t("default", scope: i18n_scope) %>
33
- <p class="help-text"><%= t(".content_types.default_hint") %></p>
34
- </div>
35
- <div class="field">
36
- <%= extensions_form.text_field :admin, class: "js-tags-container", label: t("admin", scope: i18n_scope) %>
37
- <p class="help-text"><%= t(".content_types.admin_hint") %></p>
38
- </div>
18
+ <%= field_set_tag f.label(t(".content_types.title"), nil, for: nil), class: "border-2 border-background p-4 form__wrapper" do %>
19
+ <p class="help-text"><%= t(".content_types.intro_html") %></p>
20
+ <%= extensions_form.text_field :default, class: "js-tags-container mt-4", label: t("default", scope: i18n_scope), help_text: t(".content_types.default_hint") %>
21
+ <%= extensions_form.text_field :admin, class: "js-tags-container mt-4", label: t("admin", scope: i18n_scope), help_text: t(".content_types.admin_hint") %>
39
22
  <% end %>
23
+ <% end %>
40
24
 
41
- <%= settings_form.fields_for :maximum_file_size, OpenStruct.new(settings_form.object.maximum_file_size) do |extensions_form| %>
42
- <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.maximum_file_size" %>
43
-
44
- <h5><%= t(".file_sizes.title") %></h5>
25
+ <%= settings_form.fields_for :maximum_file_size, OpenStruct.new(settings_form.object.maximum_file_size) do |extensions_form| %>
26
+ <% i18n_scope = "#{f.object.class.i18n_scope}.attributes.#{settings_form.object.model_name.i18n_key}.maximum_file_size" %>
45
27
 
46
- <div class="field">
47
- <%= extensions_form.number_field :default, step: 0.1, min: 0, label: t("default", scope: i18n_scope) %>
48
- <p class="help-text"><%= t(".file_sizes.default_hint") %></p>
49
- </div>
50
- <div class="field">
51
- <%= extensions_form.number_field :avatar, step: 0.1, min: 0, label: t("avatar", scope: i18n_scope) %>
52
- <p class="help-text"><%= t(".file_sizes.avatar_hint") %></p>
53
- </div>
28
+ <%= field_set_tag f.label(t(".file_sizes.title"), nil, for: nil), class: "border-2 border-background p-4 form__wrapper last:pb-4" do %>
29
+ <%= extensions_form.number_field :default, step: 0.1, min: 0, label: t("default", scope: i18n_scope), help_text: t(".file_sizes.default_hint") %>
30
+ <%= extensions_form.number_field :avatar, step: 0.1, min: 0, label: t("avatar", scope: i18n_scope), help_text: t(".file_sizes.avatar_hint") %>
54
31
  <% end %>
55
32
  <% end %>
56
- </div>
33
+ <% end %>
@@ -1,23 +1,20 @@
1
1
  <% i18n_scope = "decidim.system.organizations.omniauth_settings" %>
2
2
 
3
- <div class="card">
4
- <h5><%= provider_name(provider) %></h5>
5
-
3
+ <%= field_set_tag f.label(provider_name(provider), nil, for: nil), class: "border-2 border-background p-4 form__wrapper last:pb-4" do %>
6
4
  <% if provider_enabled?(provider) %>
7
5
  <p class="help-text"><%= t("enabled_by_default", scope: i18n_scope) %></p>
8
6
  <% end %>
9
7
 
10
- <div class="card-section">
11
- <%= f.check_box(
12
- "omniauth_settings_#{provider}_enabled",
13
- label: t("enabled", scope: i18n_scope)
14
- ) %>
8
+ <%= f.check_box(
9
+ "omniauth_settings_#{provider}_enabled",
10
+ label: t("enabled", scope: i18n_scope),
11
+ label_options: { class: "form__wrapper-checkbox-label" }
12
+ ) %>
15
13
 
16
- <% Rails.application.secrets.dig(:omniauth, provider.to_sym).keys.select { |k| k != :enabled }.each do |setting| %>
17
- <%= f.text_field("omniauth_settings_#{provider}_#{setting}", label: I18n.t(
18
- ".#{setting}",
19
- scope: [:icon, :icon_path].include?(setting) ? i18n_scope : "#{i18n_scope}.#{provider}"
20
- )) %>
21
- <% end %>
22
- </div>
23
- </div>
14
+ <% Rails.application.secrets.dig(:omniauth, provider.to_sym).keys.select { |k| k != :enabled }.each do |setting| %>
15
+ <%= f.text_field("omniauth_settings_#{provider}_#{setting}", label: I18n.t(
16
+ ".#{setting}",
17
+ scope: [:icon, :icon_path].include?(setting) ? i18n_scope : "#{i18n_scope}.#{provider}"
18
+ )) %>
19
+ <% end %>
20
+ <% end %>
@@ -1,11 +1,9 @@
1
- <div class="fieldset">
2
- <h4><%= t("decidim.system.models.organization.fields.omniauth_settings") %></h4>
1
+ <h3 class="h4"><%= t("decidim.system.models.organization.fields.omniauth_settings") %></h3>
3
2
 
4
- <%= f.fields_for :omniauth_settings do %>
5
- <% providers = Decidim::OmniauthProvider.available.keys %>
3
+ <%= f.fields_for :omniauth_settings do %>
4
+ <% providers = Decidim::OmniauthProvider.available.keys %>
6
5
 
7
- <% providers.each do |provider| %>
8
- <%= render partial: "omniauth_provider", locals: { f: f, provider: provider } %>
9
- <% end %>
6
+ <% providers.each do |provider| %>
7
+ <%= render partial: "omniauth_provider", locals: { f:, provider: } %>
10
8
  <% end %>
11
- </div>
9
+ <% end %>
@@ -1,23 +1,13 @@
1
- <div class="fieldset">
2
- <h4><%= t("decidim.system.models.organization.fields.smtp_settings") %></h4>
3
- <%= f.fields_for :smtp_settings do %>
4
- <fieldset class="fieldset">
5
- <legend><%= t(".fieldsets.sender") %></legend>
6
- <%= f.email_field :from_email, placeholder: t(".placeholder.from_email") %>
7
- <%= f.text_field :from_label, placeholder: t(".placeholder.from_label") %>
8
- <p class="help-text"><%= t(".instructions.from_label") %></p>
9
- </fieldset>
10
- <div class="field">
11
- <%= f.text_field :user_name %>
12
- </div>
13
- <div class="field">
14
- <%= f.text_field :password %>
15
- </div>
16
- <div class="field">
17
- <%= f.text_field :address %>
18
- </div>
19
- <div class="field">
20
- <%= f.number_field :port %>
21
- </div>
1
+ <h3 class="h4"><%= t("decidim.system.models.organization.fields.smtp_settings") %></h3>
2
+
3
+ <%= f.fields_for :smtp_settings do %>
4
+ <%= field_set_tag f.label(t(".fieldsets.sender"), nil, for: nil), class: "border border-background p-4" do %>
5
+ <%= f.email_field :from_email, placeholder: t(".placeholder.from_email") %>
6
+ <%= f.text_field :from_label, placeholder: t(".placeholder.from_label"), help_text: t(".instructions.from_label") %>
22
7
  <% end %>
23
- </div>
8
+
9
+ <%= f.text_field :user_name %>
10
+ <%= f.text_field :password %>
11
+ <%= f.text_field :address %>
12
+ <%= f.number_field :port %>
13
+ <% end %>
@@ -1,38 +1,47 @@
1
+ <% add_decidim_page_title(t(".title")) %>
2
+
3
+ <% provide :title do %>
4
+ <h1 class="h1"><%= t ".title" %></h1>
5
+ <% end %>
6
+
1
7
  <%= decidim_form_for(@form) do |f| %>
2
- <div class="field">
8
+ <div class="form__wrapper">
3
9
  <%= f.text_field :name, autofocus: true %>
4
- </div>
5
10
 
6
- <div class="field">
7
11
  <%= f.text_field :host %>
8
- </div>
9
12
 
10
- <div class="field">
11
- <%= f.text_area :secondary_hosts %>
12
- <p class="help-text"><%= t(".secondary_hosts_hint") %></p>
13
- </div>
13
+ <%= f.text_area :secondary_hosts, help_text: t(".secondary_hosts_hint") %>
14
14
 
15
- <div class="field">
16
- <%= f.label :force_authentication %>
17
- <%= f.check_box :force_users_to_authenticate_before_access_organization %>
18
- </div>
15
+ <%= field_set_tag f.label(:force_authentication, nil, for: nil) do %>
16
+ <%= f.check_box :force_users_to_authenticate_before_access_organization, label_options: { class: "form__wrapper-checkbox-label" } %>
17
+ <% end %>
19
18
 
20
- <div class="field">
21
- <%= f.label :users_registration_mode %>
22
- <%= f.collection_radio_buttons :users_registration_mode,
23
- Decidim::Organization.users_registration_modes,
24
- :first,
25
- ->(mode) { t("decidim.system.organizations.users_registration_mode.#{mode.first}") } %>
26
- </div>
19
+ <%= field_set_tag f.label(:users_registration_mode, nil, for: nil) do %>
20
+ <%= f.collection_radio_buttons :users_registration_mode,
21
+ Decidim::Organization.users_registration_modes,
22
+ :first,
23
+ ->(mode) { t("decidim.system.organizations.users_registration_mode.#{mode.first}") } do |builder|
24
+ builder.label(for: nil, class: "form__wrapper-checkbox-label") { builder.radio_button(id: nil) + builder.text }
25
+ end %>
26
+ <% end %>
27
27
 
28
- <div class="field">
29
- <%= f.label :available_authorizations %>
30
- <%= f.collection_check_boxes :available_authorizations, Decidim.authorization_workflows, :name, :description %>
31
- </div>
28
+ <%= field_set_tag f.label(:available_authorizations, nil, for: nil) do %>
29
+ <%= f.collection_check_boxes :available_authorizations, Decidim.authorization_workflows, :name, :description do |builder|
30
+ builder.label(for: nil, class: "form__wrapper-checkbox-label") { builder.check_box(id: nil) + builder.text }
31
+ end %>
32
+ <% end %>
32
33
 
33
- <%= render partial: "advanced_settings", locals: { f: f } %>
34
+ <%= render partial: "advanced_settings", locals: { f: } %>
35
+ </div>
34
36
 
35
- <div class="actions">
36
- <%= f.submit t("decidim.system.actions.save") %>
37
+ <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
38
+ <% if @organization.users.first&.invitation_pending? %>
39
+ <%= link_to t(".resend_invitation"),
40
+ resend_invitation_organization_path(@organization),
41
+ method: :post,
42
+ class: "button button__sm md:button__lg button__transparent-secondary",
43
+ data: { confirm: t(".confirm_resend_invitation") } %>
44
+ <% end %>
45
+ <%= f.submit t("decidim.system.actions.save"), class: "button button__sm md:button__lg button__primary" %>
37
46
  </div>
38
47
  <% end %>
@@ -1,8 +1,9 @@
1
+ <% add_decidim_page_title(t(".title")) %>
2
+
1
3
  <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
4
+ <h1 class="h1"><%= t ".title" %></h1>
3
5
  <% end %>
4
6
 
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.system", name: t("models.organization.name", scope: "decidim.system")), [:new, :organization], class: "new" %>
7
- </div>
7
+ <%= link_to t("actions.new_organization", scope: "decidim.system"), [:new, :organization], class: "button button__sm md:button__lg button__primary" %>
8
+
8
9
  <%= render partial: "decidim/system/shared/organizations_list", locals: { organizations: @organizations } %>