From 76c6c260d1b65db43e3bc64feba42552e4e1426f Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 24 Oct 2014 11:48:13 +1100 Subject: [PATCH] Add row containers to make grid nesting work --- .../overview/_change_type_form.html.haml | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/app/views/spree/admin/overview/_change_type_form.html.haml b/app/views/spree/admin/overview/_change_type_form.html.haml index 0b1bbfabb8..82a89e46de 100644 --- a/app/views/spree/admin/overview/_change_type_form.html.haml +++ b/app/views/spree/admin/overview/_change_type_form.html.haml @@ -2,48 +2,50 @@ html: { name: "change_type", id: "change_type", novalidate: true, "ng-app" => "admin.enterprises", "ng-controller"=> 'sellsCtrl' } do |change_type_form| -# Have to use hidden:'true' on this input rather than type:'hidden' as the latter seems to break ngPattern and therefore validation %input{ hidden: "true", name: "sells", ng: { required: true, pattern: "/^(none|own)$/", model: 'sells', value: "sells"} } - .options.sixteen.columns.alpha - - if @enterprise.is_primary_producer - %input{ type: 'checkbox', hidden: true, name: "producer_profile_only", ng: { required: true, model: 'producer_profile_only', value: "producer_profile_only"} } - .basic_producer.option.one-third.column.alpha - %a.full-width.button.selector{ ng: { click: "sells='none';producer_profile_only=true;", class: "{selected: sells=='none' && producer_profile_only==true}" } } - .top - %h3 Producer Profile - %p Connect through OFN - .bottom ALWAYS FREE - %p.description - You want to use Open Food Network as a place for people to find and contact you. - .producer_shop.option.one-third.column - %a.full-width.button.selector{ ng: { click: "sells='none';producer_profile_only=false;", class: "{selected: sells=='none' && producer_profile_only==false}" } } - .top - %h3 Sell products - %p As a supplier - .bottom ALWAYS FREE - %p.description - Add your products to Open Food Network, allowing customers to see your product range, and allowing you to act as a supplier to other shopfronts. + .row + .options.sixteen.columns.alpha + - if @enterprise.is_primary_producer + %input{ type: 'checkbox', hidden: true, name: "producer_profile_only", ng: { required: true, model: 'producer_profile_only', value: "producer_profile_only"} } + .basic_producer.option.one-third.column.alpha + %a.full-width.button.selector{ ng: { click: "sells='none';producer_profile_only=true;", class: "{selected: sells=='none' && producer_profile_only==true}" } } + .top + %h3 Producer Profile + %p Connect through OFN + .bottom ALWAYS FREE + %p.description + You want to use Open Food Network as a place for people to find and contact you. - .full_hub.option.one-third.column.omega.disabled - %a.full-width.button.selector{ ng: { click: "sells='own';producer_profile_only=false;", class: "{selected: sells=='own' && producer_profile_only==false}" } } - .top - %h3 Sell products - %p Through an OFN shopfront - .bottom 30 DAY TRIAL - %p.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 + %a.full-width.button.selector{ ng: { click: "sells='none';producer_profile_only=false;", class: "{selected: sells=='none' && producer_profile_only==false}" } } + .top + %h3 Sell products + %p As a supplier + .bottom ALWAYS FREE + %p.description + Add your products to Open Food Network, allowing customers to see your product range, and allowing you to act as a supplier to other shopfronts. - - else - .shop_profile.option.one-third.column.alpha - %a.full-width.button.selector{ ng: { class: "{selected: sells=='none'}" } } - .top - %h3 Shop Profile - %p Get a listing - .bottom ALWAYS FREE - %p.description - You want to use OFN as a place for people to find and contact you. + .full_hub.option.one-third.column.omega.disabled + %a.full-width.button.selector{ ng: { click: "sells='own';producer_profile_only=false;", class: "{selected: sells=='own' && producer_profile_only==false}" } } + .top + %h3 Sell products + %p Through an OFN shopfront + .bottom 30 DAY TRIAL + %p.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. - .sixteen.columns.alpha - .admin-cta - %span.error{ ng: { show: "(change_type.sells.$error.pattern || change_type.sells.$error.pattern) && submitted" } } - Please choose one of the options above. - %input{ type: 'submit', value: 'Next', ng: { click: "submit(change_type)" } } \ No newline at end of file + - else + .shop_profile.option.one-third.column.alpha + %a.full-width.button.selector{ ng: { class: "{selected: sells=='none'}" } } + .top + %h3 Shop Profile + %p Get a listing + .bottom ALWAYS FREE + %p.description + You want to use OFN as a place for people to find and contact you. + .row + .sixteen.columns.alpha + .admin-cta + %span.error{ ng: { show: "(change_type.sells.$error.pattern || change_type.sells.$error.pattern) && submitted" } } + Please choose one of the options above. + %input{ type: 'submit', value: 'Next', ng: { click: "submit(change_type)" } } \ No newline at end of file