mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Allow super admin users to enable subscriptions for enterprises
This commit is contained in:
committed by
Maikel Linke
parent
16211da5f6
commit
184bf9ce36
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user