cirandas.net

ref: master

plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb


<%= _('Shopping checkout') %>

<%= button :back, _("haven't finished yet: back to shopping"), 'javascript:history.back()', class: 'cart-go-back' %> <%= form_for :order, url: {action: :send_request}, html: {onsubmit: "return Cart.send_request(this)", id: 'cart-request-form'} do |f| %>
<%=s_('Your Order')%> <% supplier_delivery = @order.supplier_delivery || profile.delivery_methods.first %> <%= items_table @cart[:items], @profile, supplier_delivery %>
<%=_('Personal identification')%> <%= f.fields_for :consumer_data, @order.consumer do |ff| %> <%= labelled_form_field('* ' + _("Name"), ff.text_field(:name, value: (user.name if user), class: 'required') ) %> <%= labelled_form_field('* ' + _("Email"), ff.text_field(:email, value: (user.email if user), class: 'required email') ) %> <%= labelled_form_field('* ' + _("Contact phone"), ff.text_field(:contact_phone, value: (user.contact_phone if user), class: 'required') ) %> <% end %>
<%=_("Payment's method")%> <%= f.fields_for :payment_data do |ff| %> <%= labelled_form_field _('Payment'), ff.select(:method, options_for_payment) %> <%= labelled_form_field(s_('shopping_cart|Change'), ff.text_field(:change)) %> <% end %>
<% if profile.delivery_methods.size > 0 %>
<%=t('controllers.profile.consumer.delivery_method')%> <%= render 'delivery_plugin/order_select', f: f, order: @order %>
<% end %>
<%= button :back, _("haven't finished yet: back to shopping"), 'javascript:history.back()' %> <%= submit_button(:send, _('Send buy request'), option:"success") %>
<% end %>
<%= javascript_include_tag 'plugins/shopping_cart/buy' %>