diff --git a/app/views/licenses/_form.html.erb b/app/views/licenses/_form.html.erb index 9df124c..ea5c5e5 100644 --- a/app/views/licenses/_form.html.erb +++ b/app/views/licenses/_form.html.erb @@ -1,6 +1,6 @@ <%= error_messages_for :license %> -<%= form_for :license, @license do |f| %> +<%= form_for :license do |f| %> <%= hidden_field_tag(:license_id, params[:license_id]) %> <%= required labelled_form_field(_('Name'), f.text_field(:name)) %> <%= labelled_form_field(_('License url'), f.text_field(:url)) %> diff --git a/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb b/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb index 7b03be2..2c62084 100644 --- a/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb +++ b/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb @@ -94,6 +94,7 @@ class ShoppingCartPluginController < PublicController end def buy + @customer = user || Person.new if validate_cart_presence @cart = cart @enterprise = environment.enterprises.find(cart[:profile_id]) diff --git a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb index e4ebb27..8b97cf5 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb @@ -1,6 +1,5 @@ -<% person = user.nil? ? Person.new : user %>
- <% form_for(:customer, person, :url => {:action => 'send_request'}, + <% form_for(:customer, :url => {:action => 'send_request'}, :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form' }) do |f| %>
<%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %> diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb index 989e92a..8c01d0d 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb @@ -1,6 +1,6 @@

<%= _('Basket options') %>

-<%= form_for(:settings, @settings, :url => {:action => 'edit'}, :html => {:method => 'post'}) do |f| %> +<%= form_for(:settings, :url => {:action => 'edit'}, :html => {:method => 'post'}) do |f| %> <%= labelled_form_field(_('Enable shopping basket'), f.check_box(:enabled)) %> <%= labelled_form_field(_('Enable delivery fields on orders'), f.check_box(:delivery)) %> <% display_delivery_settings = @settings.delivery ? 'auto' : 'none' %> -- libgit2 0.21.2