From 4cb98dd4ace310a5290ce01157c4504cfa09101f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 3 Feb 2021 21:44:33 +0100 Subject: [PATCH] Fill all space available These two fields (Display As, and Unit Names) are mutually exclusive: they are never displayed at the same time. Use all the available space. --- app/views/spree/admin/products/_display_as.html.haml | 2 +- app/views/spree/admin/products/new.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/spree/admin/products/_display_as.html.haml b/app/views/spree/admin/products/_display_as.html.haml index 04af12bdce..0e5a80673a 100644 --- a/app/views/spree/admin/products/_display_as.html.haml +++ b/app/views/spree/admin/products/_display_as.html.haml @@ -1,4 +1,4 @@ -.three.columns.omega{ "ng-if" => "product.variant_unit_with_scale != 'items'" } +.six.columns.omega{ "ng-if" => "product.variant_unit_with_scale != 'items'" } = f.field_container :display_as do = f.label :product_display_as, t('.display_as') %input#product_display_as.fullwidth{name: "product[display_as]", placeholder: "{{ placeholder_text }}", type: "text"} diff --git a/app/views/spree/admin/products/new.html.haml b/app/views/spree/admin/products/new.html.haml index 4f6aa4df8e..c68ce3f3bd 100644 --- a/app/views/spree/admin/products/new.html.haml +++ b/app/views/spree/admin/products/new.html.haml @@ -37,7 +37,7 @@ %input{ type: 'hidden', 'ng-value' => 'product.master.unit_value', name: 'product[unit_value]' } %input{ type: 'hidden', 'ng-value' => 'product.master.unit_description', name: 'product[unit_description]' } = render 'display_as', f: f - .three.columns.omega{ 'ng-show' => "product.variant_unit_with_scale == 'items'" } + .six.columns.omega{ 'ng-show' => "product.variant_unit_with_scale == 'items'" } = f.field_container :unit_name do = f.label :product_variant_unit_name, t(".unit_name") %span.required *