From 7d9c5f9e2c869205af50f9e2057475ccbf6bbaae Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 23 Oct 2014 11:40:11 +1100 Subject: [PATCH] Adding form elements for submission of sells preferences on welcome page --- .../spree/admin/overview/welcome.html.haml | 91 ++++++++++--------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/app/views/spree/admin/overview/welcome.html.haml b/app/views/spree/admin/overview/welcome.html.haml index 6aef4ee027..05bbcd845b 100644 --- a/app/views/spree/admin/overview/welcome.html.haml +++ b/app/views/spree/admin/overview/welcome.html.haml @@ -10,51 +10,54 @@ %br/ the Open Food Network - .options.sixteen.columns.alpha - - if @enterprise.is_primary_producer - .basic_producer.option.one-third.column.alpha - .selector{ ng: { click: "sells='none'", class: "{selected: sells=='none'}" } } - .top - %h2 Basic Producer - .plain_text Supply only - .bottom - %h5 ALWAYS FREE - .description - You want to use OFN as a place for people to find and contact you. - You can also add your products, allowing customers to see your product range and allowing you to act as a supplier to other shopfronts. + %form{ name: :sells, method: :put, action: main_app.set_sells_admin_enterprise_path(@enterprise) } + %input{ type: "hidden", id: "sells", name: "sells", ng: { value: "sells" } } + .options.sixteen.columns.alpha + - if @enterprise.is_primary_producer + .basic_producer.option.one-third.column.alpha + .selector{ ng: { click: "sells='none'", class: "{selected: sells=='none'}" } } + .top + %h2 Basic Producer + .plain_text Supply only + .bottom + %h5 ALWAYS FREE + .description + You want to use OFN as a place for people to find and contact you. + You can also add your products, allowing customers to see your product range and allowing you to act as a supplier to other shopfronts. - .producer_shop.option.one-third.column - .selector{ ng: { click: "sells='own'", class: "{selected: sells=='own'}" } } - .top - %h2 Producer with Shop - .plain_text Sell your products through an OFN shopfront - .bottom - %h5 30 DAY TRIAL - .description - Test out having your own shopfront with full access to all Shopfront features for 30 days. - After your trial expires you can keep your Shopfront for a subscription cost of $50 per month. + .producer_shop.option.one-third.column + .selector{ ng: { click: "sells='own'", class: "{selected: sells=='own'}" } } + .top + %h2 Producer with Shop + .plain_text Sell your products through an OFN shopfront + .bottom + %h5 30 DAY TRIAL + .description + Test out having your own shopfront with full access to all Shopfront features for 30 days. + After your trial expires you can keep your Shopfront for a subscription cost of $50 per month. - .full_hub.option.one-third.column.omega.disabled - .selector - .top.center - %h2 Full Hub - .plain_text Sell other producers' products through an OFN shopfront - .bottom.center - %h5 COMING SOON - .description - You want to offer other producers' products for sale as well as your own, establish and coodinate trading relationships with other enterprises and - A full hub subscription gives you access to our complete suite of features for managing your food enterprise. + .full_hub.option.one-third.column.omega.disabled + .selector + .top.center + %h2 Full Hub + .plain_text Sell other producers' products through an OFN shopfront + .bottom.center + %h5 COMING SOON + .description + You want to offer other producers' products for sale as well as your own, establish and coodinate trading relationships with other enterprises and + A full hub subscription gives you access to our complete suite of features for managing your food enterprise. - - else - .shop_profile.option.one-third.column.alpha - .selector{ ng: { class: "{selected: sells=='none'}" } } - .top.center - %h2 Shop Profile - .plain_text Get a listing - .bottom.center - %h5 ALWAYS FREE - .description - You want to use OFN as a place for people to find and contact you. + - else + .shop_profile.option.one-third.column.alpha + .selector{ ng: { class: "{selected: sells=='none'}" } } + .top.center + %h2 Shop Profile + .plain_text Get a listing + .bottom.center + %h5 ALWAYS FREE + .description + You want to use OFN as a place for people to find and contact you. - // Coming soon - Full Hub - // Email us if you want this option \ No newline at end of file + // Coming soon - Full Hub + // Email us if you want this option + %input{ type: 'submit' } \ No newline at end of file