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.
- checksums.yaml +4 -4
- data/README.md +10 -7
- data/app/commands/decidim/system/create_admin.rb +1 -1
- data/app/commands/decidim/system/create_default_content_blocks.rb +1 -14
- data/app/commands/decidim/system/create_default_pages.rb +23 -4
- data/app/commands/decidim/system/populate_help.rb +2 -2
- data/app/commands/decidim/system/register_organization.rb +15 -2
- data/app/commands/decidim/system/update_admin.rb +1 -1
- data/app/commands/decidim/system/update_organization.rb +2 -1
- data/app/controllers/decidim/system/application_controller.rb +2 -1
- data/app/controllers/decidim/system/dashboard_controller.rb +1 -0
- data/app/controllers/decidim/system/organizations_controller.rb +30 -4
- data/app/forms/decidim/system/admin_form.rb +2 -2
- data/app/forms/decidim/system/update_organization_form.rb +14 -2
- data/app/jobs/decidim/system/application_job.rb +1 -1
- data/app/packs/entrypoints/decidim_system.js +5 -3
- data/app/packs/stylesheets/decidim/system/application.scss +108 -21
- data/app/views/decidim/system/admins/_form.html.erb +1 -7
- data/app/views/decidim/system/admins/edit.html.erb +5 -3
- data/app/views/decidim/system/admins/index.html.erb +5 -31
- data/app/views/decidim/system/admins/new.html.erb +5 -3
- data/app/views/decidim/system/dashboard/show.html.erb +15 -3
- data/app/views/decidim/system/devise/mailers/password_change.html.erb +1 -1
- data/app/views/decidim/system/devise/mailers/reset_password_instructions.html.erb +2 -2
- data/app/views/decidim/system/devise/passwords/edit.html.erb +6 -9
- data/app/views/decidim/system/devise/passwords/new.html.erb +5 -5
- data/app/views/decidim/system/devise/sessions/new.html.erb +10 -12
- data/app/views/decidim/system/devise/shared/_links.html.erb +5 -11
- data/app/views/decidim/system/oauth_applications/_form.html.erb +5 -20
- data/app/views/decidim/system/oauth_applications/edit.html.erb +11 -11
- data/app/views/decidim/system/oauth_applications/index.html.erb +8 -8
- data/app/views/decidim/system/oauth_applications/new.html.erb +11 -11
- data/app/views/decidim/system/oauth_applications/show.html.erb +22 -23
- data/app/views/decidim/system/organizations/_advanced_settings.html.erb +10 -8
- data/app/views/decidim/system/organizations/_csp_settings.html.erb +12 -0
- data/app/views/decidim/system/organizations/_file_upload_settings.erb +23 -46
- data/app/views/decidim/system/organizations/_omniauth_provider.html.erb +13 -16
- data/app/views/decidim/system/organizations/_omniauth_settings.html.erb +6 -8
- data/app/views/decidim/system/organizations/_smtp_settings.html.erb +12 -22
- data/app/views/decidim/system/organizations/edit.html.erb +35 -26
- data/app/views/decidim/system/organizations/index.html.erb +5 -4
- data/app/views/decidim/system/organizations/new.html.erb +34 -45
- data/app/views/decidim/system/shared/_admins_list.html.erb +27 -0
- data/app/views/decidim/system/shared/_notices.html.erb +4 -6
- data/app/views/decidim/system/shared/_organizations_list.html.erb +10 -3
- data/app/views/layouts/decidim/system/_header.html.erb +2 -2
- data/app/views/layouts/decidim/system/_login_items.html.erb +3 -7
- data/app/views/layouts/decidim/system/_sidebar.html.erb +3 -7
- data/app/views/layouts/decidim/system/application.html.erb +27 -30
- data/app/views/layouts/decidim/system/login.html.erb +10 -9
- data/config/environment.rb +3 -0
- data/config/locales/ar.yml +0 -14
- data/config/locales/bg.yml +0 -1
- data/config/locales/ca.yml +96 -12
- data/config/locales/cs.yml +97 -12
- data/config/locales/de.yml +92 -15
- data/config/locales/el.yml +9 -12
- data/config/locales/en.yml +97 -12
- data/config/locales/es-MX.yml +97 -12
- data/config/locales/es-PY.yml +97 -12
- data/config/locales/es.yml +97 -12
- data/config/locales/eu.yml +112 -27
- data/config/locales/fi-plain.yml +96 -12
- data/config/locales/fi.yml +96 -12
- data/config/locales/fr-CA.yml +65 -12
- data/config/locales/fr.yml +81 -12
- data/config/locales/ga-IE.yml +0 -2
- data/config/locales/gl.yml +0 -14
- data/config/locales/hu.yml +19 -11
- data/config/locales/id-ID.yml +0 -11
- data/config/locales/is-IS.yml +0 -4
- data/config/locales/it.yml +0 -14
- data/config/locales/ja.yml +64 -12
- data/config/locales/lt.yml +19 -12
- data/config/locales/lv.yml +0 -11
- data/config/locales/nl.yml +0 -13
- data/config/locales/no.yml +0 -14
- data/config/locales/pl.yml +0 -14
- data/config/locales/pt-BR.yml +0 -14
- data/config/locales/pt.yml +0 -14
- data/config/locales/ro-RO.yml +3 -13
- data/config/locales/ru.yml +0 -11
- data/config/locales/sk.yml +0 -11
- data/config/locales/sl.yml +0 -8
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +0 -14
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +3 -14
- data/config/locales/uk.yml +0 -10
- data/config/locales/zh-CN.yml +0 -12
- data/config/locales/zh-TW.yml +8 -11
- data/config/routes.rb +6 -2
- data/db/seeds.rb +1 -1
- data/lib/decidim/system/engine.rb +2 -25
- data/lib/decidim/system/menu.rb +35 -0
- data/lib/decidim/system/version.rb +1 -1
- data/lib/tasks/decidim_system.rake +1 -1
- metadata +28 -24
- data/app/packs/entrypoints/decidim_system.scss +0 -1
- data/app/packs/src/decidim/system/application.js +0 -41
- data/app/packs/stylesheets/decidim/system/_actions.scss +0 -8
- data/app/packs/stylesheets/decidim/system/_forms.scss +0 -36
- data/app/packs/stylesheets/decidim/system/_foundation_and_overrides.scss +0 -53
- data/app/packs/stylesheets/decidim/system/_layout.scss +0 -18
- data/app/packs/stylesheets/decidim/system/_login.scss +0 -37
- data/app/packs/stylesheets/decidim/system/_settings.scss +0 -569
- data/app/packs/stylesheets/decidim/system/_sidebar.scss +0 -83
- data/app/packs/stylesheets/decidim/system/_tables.scss +0 -6
- data/app/views/decidim/system/admins/show.html.erb +0 -9
- data/app/views/decidim/system/organizations/show.html.erb +0 -10
@@ -1,22 +1,19 @@
|
|
1
|
-
<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:
|
4
|
+
<%= render "devise/shared/error_messages", resource: %>
|
5
5
|
<%= f.hidden_field :reset_password_token %>
|
6
6
|
|
7
|
-
<div class="
|
7
|
+
<div class="form__wrapper">
|
8
8
|
<% if @minimum_password_length %>
|
9
|
-
<em
|
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="
|
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
|
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:
|
4
|
+
<%= render "devise/shared/error_messages", resource: %>
|
5
5
|
|
6
|
-
<div class="
|
6
|
+
<div class="form__wrapper">
|
7
7
|
<%= f.email_field :email, autofocus: true %>
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<div class="
|
11
|
-
<%= f.submit "
|
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
|
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="
|
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
|
-
|
13
|
-
<div class="field">
|
9
|
+
<% if devise_mapping.rememberable? -%>
|
14
10
|
<%= f.check_box :remember_me %>
|
15
|
-
|
16
|
-
|
11
|
+
<% end -%>
|
12
|
+
</div>
|
17
13
|
|
18
|
-
<div class="
|
19
|
-
<%= f.submit "
|
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
|
-
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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="
|
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
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<div class="
|
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
|
-
<
|
4
|
+
<h1 class="h1"><%= t ".title" %></h1>
|
3
5
|
<% end %>
|
4
6
|
|
5
|
-
|
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
|
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,
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<div class="
|
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
|
-
|
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
|
-
|
15
|
-
|
3
|
+
<% provide :title do %>
|
4
|
+
<h1 class="h1"><%= @oauth_application.name %></h1>
|
5
|
+
<% end %>
|
16
6
|
|
17
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
15
|
+
<dt><%= display_label(@oauth_application, :authorize_url) %></dt>
|
16
|
+
<dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host) %></dd>
|
22
17
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
</
|
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
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
<
|
2
|
-
|
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
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
26
|
-
|
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
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
42
|
-
|
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
|
-
|
47
|
-
|
48
|
-
|
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
|
-
|
33
|
+
<% end %>
|
@@ -1,23 +1,20 @@
|
|
1
1
|
<% i18n_scope = "decidim.system.organizations.omniauth_settings" %>
|
2
2
|
|
3
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
<
|
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
|
-
|
5
|
-
|
3
|
+
<%= f.fields_for :omniauth_settings do %>
|
4
|
+
<% providers = Decidim::OmniauthProvider.available.keys %>
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
<% end %>
|
6
|
+
<% providers.each do |provider| %>
|
7
|
+
<%= render partial: "omniauth_provider", locals: { f:, provider: } %>
|
10
8
|
<% end %>
|
11
|
-
|
9
|
+
<% end %>
|
@@ -1,23 +1,13 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
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="
|
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
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
|
34
|
+
<%= render partial: "advanced_settings", locals: { f: } %>
|
35
|
+
</div>
|
34
36
|
|
35
|
-
<div class="
|
36
|
-
|
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
|
-
<
|
4
|
+
<h1 class="h1"><%= t ".title" %></h1>
|
3
5
|
<% end %>
|
4
6
|
|
5
|
-
|
6
|
-
|
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 } %>
|