Add the option to disable languages managment to cover special cases

We understand languages management as the ability to add new languages
or remove existing ones. When no option is passed it will allow language
manipulation by default.

There are 3 special places where we want block languages management:
- admin legislation processes homepage
- admin legislation processes milestones summary
- proposals retired form

Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
This commit is contained in:
Senén Rodero Rodríguez
2019-06-03 12:49:17 +02:00
parent 0602a38742
commit b2d8851bcc
9 changed files with 45 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
<%= render "shared/globalize_locales",
resource: @process,
display_style: lambda { |locale| enable_translation_style(@process, locale) } %>
display_style: lambda { |locale| enable_translation_style(@process, locale) },
manage_languages: false %>
<%= translatable_form_for [:admin, @process], url: url, html: {data: {watch_changes: true}} do |f| %>

View File

@@ -1,6 +1,7 @@
<%= render "shared/globalize_locales",
resource: @process,
display_style: lambda { |locale| enable_translation_style(@process, locale) } %>
display_style: lambda { |locale| enable_translation_style(@process, locale) },
manage_languages: false %>
<%= translatable_form_for [:admin, @process] do |f| %>
<div class="row">