-if @m_odr.start_at > Date.today and params[:force].to_s == "" %div{:style => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"} -count = ((@m_odr.start_at) - (Date.today)) -if @m_odr.landing_text? =@m_odr.landing_text -else Démarrage %div{:style => "font-weight:bold;font-weight:800;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;line-height:200px;position:relative;top:-40px"} dans .clock{:style => "margin:2em;display:inline-block;width:auto;margin:0 auto;position:relative;top:35px"} -if count > 1 jours ! -else jour ! :javascript var countup; var clock = $('.clock').FlipClock(0, { clockFace: 'Counter', minimumDigits: 1, callbacks:{ init:function (){ } } }); if(clock_max > 0){ countup = setInterval(function() { clock.increment(); if(clock.getTime().time >= clock_max) { clock.stop(); clearInterval(countup); } }, 0);} -if false %p{:style => "font-weight:bold;font-size:2em;text-transform:uppercase;font-family:'Helvetica Neue', Helvetica, sans-serif;"} jours avant l'ouverture -else -if !@m_odr_rep -@m_odr_rep = @m_odr.m_odr_reps.new(:t => params[:t]) -@m_odr_rep.particulars.build(:skip_organisation => true, :validate_name => true,:validate_tel => true ,:validate_email => true) -@m_odr_rep.m_odr_rep_ribs.build() - @m_odr.m_odr_file_types.each do |ft| -@m_odr_rep.m_odr_files.build(:m_odr_file_type_id => ft.id) #odr_form =semantic_form_for [:public, @m_odr_rep], html: { multipart: true } , :remote => false do |f| =f.hidden_field :m_odr_id =hidden_field_tag :force, params[:force] =f.hidden_field :t .form_pannel %h3 Vous =f.inputs do =f.semantic_fields_for :particulars do |f| =f.hidden_field :validate_name =f.hidden_field :skip_organisation =f.hidden_field :validate_tel %table %tr %td{:style => "width:20%;padding-right:4px;"} =f.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;"} =f.input :name, :label => false, :placeholder => "Nom" %td{:style => "width:40%"} =f.input :firstname, :label => false, :placeholder => "Prénom" =f.input :address_2, :label => false, :placeholder => "Adresse" =f.input :address_3, :label => false, :placeholder => "Adresse suite" %table %tr %td{:style => "width:30%;padding-right:4px;"} =f.input :cp, :label => false, :placeholder => "Code postal" %td{:style => "width:70%"} =f.input :city, :label => false, :placeholder => "Ville" =f.input :country, :label => false, :placeholder => "Pays", :priority_countries => ["FR", "CH", "BE"], :include_blank => false, :locale => @lang.slug =f.input :email, :label => "Email :" =f.input :tel, :label => "Tel :" .form_pannel %h3 Vos coordonnées bancaires =f.inputs do =f.semantic_fields_for :m_odr_rep_ribs do |f| %table %tr %td{:style => "width:20%;padding-right:4px;"} =f.input :bic, :label => "Bic : " %td{:style => "width:40%;padding-right:4px;"} =f.input :iban, :label => "Iban :", :input_html => {:class => "iban_input"} :javascript $('.iban_input').mask('SSAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AA', { placeholder: '____ ____ ____ ____ ____ ____ ____ ____ __' }); .form_pannel %h3 Votre achat =f.inputs do =f.input :qte, :label => "Pneu :", :as => :select, :collection => f.object.m_odr.m_odr_products.order("m_odr_brand_id ASC, m_odr_products.name"), :member_label => :member_label, :include_blank => true =f.inputs do =f.input :m_odr_product_id, :label => "Nombre de pneus :", :as => :select, :collection => [1,2], :include_blank => true =f.inputs do =f.input :m_odr_place, :label => "Point de vente :", :as => :select, :collection => f.object.m_odr.m_odr_places.order(:name), :include_blank => true =f.inputs do =f.semantic_fields_for :m_odr_files do |f| =f.input :file, :label => f.object.m_odr_file_type.name =f.hidden_field :m_odr_file_type_id %center=f.submit "Envoyer", :class => "btn btn-primary btn-lg"