Commit b8f10d32e0aa8c29cb8bc725185759bc0a7263dc

Authored by Rodrigo Souto
1 parent 563ef4f0

Fix form_for calls to new api

app/views/licenses/_form.html.erb
1 1 <%= error_messages_for :license %>
2 2  
3   -<%= form_for :license, @license do |f| %>
  3 +<%= form_for :license do |f| %>
4 4 <%= hidden_field_tag(:license_id, params[:license_id]) %>
5 5 <%= required labelled_form_field(_('Name'), f.text_field(:name)) %>
6 6 <%= labelled_form_field(_('License url'), f.text_field(:url)) %>
... ...
plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb
... ... @@ -94,6 +94,7 @@ class ShoppingCartPluginController &lt; PublicController
94 94 end
95 95  
96 96 def buy
  97 + @customer = user || Person.new
97 98 if validate_cart_presence
98 99 @cart = cart
99 100 @enterprise = environment.enterprises.find(cart[:profile_id])
... ...
plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb
1   -<% person = user.nil? ? Person.new : user %>
2 1 <div id='cart-request-box'>
3   - <% form_for(:customer, person, :url => {:action => 'send_request'},
  2 + <% form_for(:customer, :url => {:action => 'send_request'},
4 3 :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form' }) do |f| %>
5 4 <div id="cart-form-main">
6 5 <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %>
... ...
plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb
1 1 <h1> <%= _('Basket options') %> </h1>
2 2  
3   -<%= form_for(:settings, @settings, :url => {:action => 'edit'}, :html => {:method => 'post'}) do |f| %>
  3 +<%= form_for(:settings, :url => {:action => 'edit'}, :html => {:method => 'post'}) do |f| %>
4 4 <%= labelled_form_field(_('Enable shopping basket'), f.check_box(:enabled)) %>
5 5 <%= labelled_form_field(_('Enable delivery fields on orders'), f.check_box(:delivery)) %>
6 6 <% display_delivery_settings = @settings.delivery ? 'auto' : 'none' %>
... ...