Allow super admin users to enable subscriptions for enterprises

This commit is contained in:
Rob Harrington
2018-05-18 13:50:00 +10:00
committed by Maikel Linke
parent 16211da5f6
commit 184bf9ce36
2 changed files with 15 additions and 13 deletions

View File

@@ -77,16 +77,16 @@
= f.radio_button :allow_order_changes, true, "ng-model" => "Enterprise.allow_order_changes", "ng-value" => "true"
= f.label :allow_order_changes, t('.allow_order_changes_true'), value: :true
-# .row
-# .alpha.eleven.columns
-# .three.columns.alpha
-# %label= t '.enable_subscriptions'
-# %div{'ofn-with-tip' => t('.enable_subscriptions_tip')}
-# %a= t 'admin.whats_this'
-# .three.columns
-# = f.radio_button :enable_subscriptions, true
-# = f.label :enable_subscriptions, t('.enable_subscriptions_true'), value: :true
-# .five.columns.omega
-# = f.radio_button :enable_subscriptions, false
-# = f.label :enable_subscriptions, t('.enable_subscriptions_false'), value: :false
- if spree_current_user.admin?
.row
.alpha.eleven.columns
.three.columns.alpha
%label= t '.enable_subscriptions'
%div{'ofn-with-tip' => t('.enable_subscriptions_tip')}
%a= t 'admin.whats_this'
.three.columns
= f.radio_button :enable_subscriptions, true
= f.label :enable_subscriptions, t('.enable_subscriptions_true'), value: :true
.five.columns.omega
= f.radio_button :enable_subscriptions, false
= f.label :enable_subscriptions, t('.enable_subscriptions_false'), value: :false

View File

@@ -167,6 +167,7 @@ feature %q{
page.first("input[name='enterprise\[preferred_shopfront_message\]']", visible: false).set('This is my shopfront message.')
page.should have_checked_field "enterprise_preferred_shopfront_order_cycle_order_orders_close_at"
choose "enterprise_preferred_shopfront_order_cycle_order_orders_open_at"
choose "enterprise_enable_subscriptions_true"
click_button 'Update'
@@ -195,6 +196,7 @@ feature %q{
page.should have_content 'This is my shopfront message.'
page.should have_checked_field "enterprise_preferred_shopfront_order_cycle_order_orders_open_at"
expect(page).to have_checked_field "enterprise_require_login_true"
expect(page).to have_checked_field "enterprise_enable_subscriptions_true"
end
describe "producer properties" do