This commit is contained in:
Nicolas Bally 2020-06-26 16:40:18 +02:00
parent 5f0dbd2ff0
commit 361170791d
3 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class MOdrPlace < ApplicationRecord
def member_label def member_label
self.name+" - "+self.city.to_s self.enseigne.to_s+" - "+self.name.to_s+" - "+self.city.to_s
end end

View File

@ -20,7 +20,7 @@
-if f.object.m_odr_file_type_id == 2 -if f.object.m_odr_file_type_id == 2
%table.m_odr_file_products_form.form-table %table.m_odr_file_products_form.form-table
= f.input :buy_at, :label => "Date de l'achat", :as => :date = f.input :buy_at, :label => "Date de l'achat", :as => :date
= f.input :m_odr_place, :label => "Revendeur :", :as => :date, :collection => MOdrPlace.order("name ASC, city ASC").all, :member_label => :member_label, :as => :select = f.input :m_odr_place, :label => "Revendeur :", :as => :date, :collection => MOdrPlace.order("enseigne ASC, name ASC, city ASC").all, :member_label => :member_label, :as => :select
=f.semantic_fields_for :m_odr_file_products do |form| =f.semantic_fields_for :m_odr_file_products do |form|
=render :partial => "admin/m_odr_file_products/form", :locals => {:form => form} =render :partial => "admin/m_odr_file_products/form", :locals => {:form => form}

View File

@ -2,7 +2,12 @@
.content .content
=f.inputs do =f.inputs do
= f.input :enseigne, :label => "Enseigne :"
= f.input :name, :label => "Nom :" = f.input :name, :label => "Nom :"
= f.input :address2, :label => "Adresse :"
= f.input :cp, :label => "Code postal :"
= f.input :city, :label => "Ville :"