From 5b235f356e0ee07be45ecb66f9c8f30c8f8aeec6 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 2 Apr 2015 08:56:36 +1100 Subject: [PATCH] Replace free text with with select dropdown for property names when not super admin --- .../producer_properties/_producer_property_fields.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/admin/producer_properties/_producer_property_fields.html.haml b/app/views/admin/producer_properties/_producer_property_fields.html.haml index 79dc815f9d..314cbfc31a 100644 --- a/app/views/admin/producer_properties/_producer_property_fields.html.haml +++ b/app/views/admin/producer_properties/_producer_property_fields.html.haml @@ -4,7 +4,10 @@ %span.handle = f.hidden_field :id %td.property_name - = f.text_field :property_name, :class => 'autocomplete' + - if spree_current_user.admin? + = f.text_field :property_name, :class => 'autocomplete' + - else + = f.select :property_name, @properties, { :include_blank => true }, { class: 'select2 fullwidth' } %td.value = f.text_field :value, :class => 'autocomplete' %td.actions