Skip to content

Commit

Permalink
hide alternative invoice checkbox if invoices feature is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
abdellani committed Feb 22, 2024
1 parent 4bb1afc commit 335c247
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/admin/invoice_settings/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
= check_box_tag 'preferences[enable_invoices?]', '1', Spree::Config[:enable_invoices?]
= label_tag nil, t('.enable_invoices?')

.field.align-center
= hidden_field_tag 'preferences[invoice_style2?]', '0'
= check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?]
= label_tag nil, t('.invoice_style2?')
- if ! OpenFoodNetwork::FeatureToggle.enabled?(:invoices, spree_current_user)
.field.align-center
= hidden_field_tag 'preferences[invoice_style2?]', '0'
= check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?]
= label_tag nil, t('.invoice_style2?')

.field.align-center
= hidden_field_tag 'preferences[enterprise_number_required_on_invoices?]', '0'
Expand Down

0 comments on commit 335c247

Please sign in to comment.