mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Hide 'profile type' form element for non super-admin users
This commit is contained in:
@@ -36,24 +36,25 @@
|
||||
= f.check_box :is_primary_producer, 'ng-model' => 'Enterprise.is_primary_producer'
|
||||
|
||||
= f.label :is_primary_producer, 'Producer'
|
||||
.row
|
||||
.alpha.eleven.columns
|
||||
.three.columns.alpha
|
||||
= f.label :type, 'Profile type'
|
||||
.with-tip{'data-powertip' => "Full - enterprise may have products and relationships.<br />Single - enterprise may have products but no relationships.<br />Profile - enterprise has a profile but no products or relationships.<br />"}
|
||||
%a What's this?
|
||||
.two.columns
|
||||
= f.radio_button :type, "full"
|
||||
|
||||
= f.label :type, "Full", value: "full"
|
||||
.two.columns
|
||||
= f.radio_button :type, "single"
|
||||
|
||||
= f.label :type, "Single", value: "single"
|
||||
.four.columns.omega
|
||||
= f.radio_button :type, "profile"
|
||||
|
||||
= f.label :type, "Profile", value: "profile"
|
||||
- if spree_current_user.admin?
|
||||
.row
|
||||
.alpha.eleven.columns
|
||||
.three.columns.alpha
|
||||
= f.label :type, 'Profile type'
|
||||
.with-tip{'data-powertip' => "Full - enterprise may have products and relationships.<br />Single - enterprise may have products but no relationships.<br />Profile - enterprise has a profile but no products or relationships.<br />"}
|
||||
%a What's this?
|
||||
.two.columns
|
||||
= f.radio_button :type, "full"
|
||||
|
||||
= f.label :type, "Full", value: "full"
|
||||
.two.columns
|
||||
= f.radio_button :type, "single"
|
||||
|
||||
= f.label :type, "Single", value: "single"
|
||||
.four.columns.omega
|
||||
= f.radio_button :type, "profile"
|
||||
|
||||
= f.label :type, "Profile", value: "profile"
|
||||
.row
|
||||
.three.columns.alpha
|
||||
%label Visible in search?
|
||||
|
||||
@@ -127,7 +127,7 @@ feature %q{
|
||||
choose 'Single'
|
||||
fill_in 'enterprise_description', :with => 'Connecting farmers and eaters'
|
||||
fill_in 'enterprise_long_description', :with => 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro.'
|
||||
|
||||
|
||||
# Check Angularjs switching of sidebar elements
|
||||
uncheck 'enterprise_is_primary_producer'
|
||||
uncheck 'enterprise_is_distributor'
|
||||
|
||||
Reference in New Issue
Block a user