Edit only existing languages in milestones summary
Adding languages using this form would result in validation errors since there's no way to fill in the title for the new translation.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<%= render "admin/shared/globalize_locales", resource: @process %>
|
||||
<%= render "admin/shared/globalize_tabs",
|
||||
resource: @process,
|
||||
display_style: lambda { |locale| enable_translation_style(@process, locale) } %>
|
||||
|
||||
<%= translatable_form_for [:admin, @process] do |f| %>
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
|
||||
@@ -192,6 +192,9 @@ feature 'Admin legislation processes' do
|
||||
scenario "Edit milestones summary", :js do
|
||||
visit admin_legislation_process_milestones_path(process)
|
||||
|
||||
expect(page).not_to have_link "Remove language"
|
||||
expect(page).not_to have_field "translation_locale"
|
||||
|
||||
within(".translatable-fields[data-locale='en']") do
|
||||
fill_in_ckeditor find("textarea", visible: false)[:id],
|
||||
with: "There is still a long journey ahead of us"
|
||||
|
||||
Reference in New Issue
Block a user