From 9ea816925517d4fa00e5e3c1db08e91852c48bdf Mon Sep 17 00:00:00 2001 From: Weston Ganger Date: Thu, 5 Sep 2024 22:28:47 -0700 Subject: [PATCH] Fix width issue on translation values form and view page --- CHANGELOG.md | 1 + .../rails_i18n_manager/form_builder/_basic_field.html.erb | 4 ++-- .../translations/_translation_value_fields.html.slim | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e8daa..7bb4f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Unreleased - [View Diff](https://github.com/westonganger/rails_i18n_manager/compare/v1.0.1...master) - Drop support for Rails v5.x +- [#19](https://github.com/westonganger/rails_i18n_manager/pull/19) - Fix width issue on translation values form and view page ### v1.0.1 - [View Diff](https://github.com/westonganger/rails_i18n_manager/compare/v1.0.0...v1.0.1) - [#14](https://github.com/westonganger/rails_i18n_manager/pull/14) - Remove usage of Array#intersection to fix errors in Ruby 2.6 and below diff --git a/app/views/rails_i18n_manager/form_builder/_basic_field.html.erb b/app/views/rails_i18n_manager/form_builder/_basic_field.html.erb index fd78a25..9b5633b 100644 --- a/app/views/rails_i18n_manager/form_builder/_basic_field.html.erb +++ b/app/views/rails_i18n_manager/form_builder/_basic_field.html.erb @@ -7,7 +7,7 @@ options[:label_wrapper_html][:class].concat(" col-md-1 col-form-label text-md-end").strip! options[:input_wrapper_html][:class] ||= "" - options[:input_wrapper_html][:class].concat(" col-auto g-md-0").strip! + options[:input_wrapper_html][:class].concat(" col-md-11").strip! end if type == :text_area @@ -49,7 +49,7 @@ <% field = capture do %> <% if type == :view %> - <%= text_field_tag nil, options[:input_html][:value], options[:input_html] %> + <%= text_area_tag nil, options[:input_html][:value], options[:input_html] %> <% elsif type == :select %> <%= f.select( diff --git a/app/views/rails_i18n_manager/translations/_translation_value_fields.html.slim b/app/views/rails_i18n_manager/translations/_translation_value_fields.html.slim index 93854f1..0c5f4be 100644 --- a/app/views/rails_i18n_manager/translations/_translation_value_fields.html.slim +++ b/app/views/rails_i18n_manager/translations/_translation_value_fields.html.slim @@ -7,4 +7,4 @@ .nested-fields.translation-value-fields = f.hidden_field :locale - = f.field :translation, type: :textarea, label: "#{locale}", required: required, help_text: help_text, field_layout: :horizontal, input_html: {rows: 1, width: "100%;"} + = f.field :translation, type: :textarea, label: "#{locale}", required: required, help_text: help_text, field_layout: :horizontal, input_html: {rows: 1}