This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/app/views/admin/particulars/_form.html.haml

57 lines
2.3 KiB
Plaintext

=form.hidden_field :particular_type
=form.hidden_field :skip_validation, :class => "skip_validation"
=form.hidden_field :pro
=#form.input :price_in_bl, :label => "Afficher les prix dans le BL ?"
%div{:style => "max-width:600px;"}
.organisation_fields
=form.input :organisation, :label => false, :placeholder => "Raison sociale"
=form.input :com_name, :label => false, :placeholder => "Enseigne commerciale"
%table
%tr
%td{:style => "width:20%;padding-right:4px;"}
=form.input :civilite, :label => false, :placeholder => "Civilité"#, :as => :select, :collection => [[qit("don-particular-civilite-mme","Mme."), "Mme"], [qit("don-particular-civilite-m","M."), "M"]], :include_blank => true
%td{:style => "width:40%;padding-right:4px;"}
=form.input :name, :label => false, :placeholder => "Nom"
%td{:style => "width:40%"}
=form.input :firstname, :label => false, :placeholder => "Prénom"
=form.input :address_2, :label => false, :placeholder => "Adresse"
=form.input :address_3, :label => false, :placeholder => "Adresse suite"
%table
%tr
%td{:style => "width:30%;padding-right:4px;"}
=form.input :cp, :label => false, :placeholder => "Code postal"
%td{:style => "width:70%"}
=form.input :city, :label => false, :placeholder => "Ville"
=form.input :country, :label => false, :placeholder => "Pays", :priority_countries => ["FR", "CH", "BE"], :include_blank => false, :locale => @lang.slug if @lang
=#form.input :email, :label => false, :placeholder => qit("don-particular-email","Email")
=#form.input :tel, :label => false, :placeholder => qit("don-particular-phone","Téléphone")
-if !params[:controller] == "p_customer_sheets"
Contacts de l'adresse :
.p_contacts_form
=form.semantic_fields_for :p_contacts do |form|
=render :partial => "admin/p_contacts/form", :locals => {:form => form}
%p= link_to_add_fields ic(:plus)+" Ajouter un contact à l'adresse", form, :p_contacts
=#form.input :open_ranges, :label => "Horaires d'ouvertures :", :collection => OpenRange.all, :as => :check_boxes
:coffeescript
@organisation_check = (element) ->
if element.is(':checked')
element.closest('form').find('.organisation_fields').show()
element.css('background', 'red')
else
element.closest('form').find('.organisation_fields').hide()
%hr