From cc120aecb60238f962dfd207acf352ae83b4dc82 Mon Sep 17 00:00:00 2001 From: Nihal Mohammed Date: Tue, 15 Mar 2022 04:15:20 +0530 Subject: [PATCH] Add radio buttons to give Enterprise choice on sorting of items by name or supplier in invoice --- .../enterprises/form/_business_details.html.haml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/views/admin/enterprises/form/_business_details.html.haml b/app/views/admin/enterprises/form/_business_details.html.haml index b5a36a527e..7d97820dcf 100644 --- a/app/views/admin/enterprises/form/_business_details.html.haml +++ b/app/views/admin/enterprises/form/_business_details.html.haml @@ -57,3 +57,17 @@ .row{"data-controller": "updateinput"} = bf.hidden_field :_destroy, {"data-updateinput-target": "input"} = f.submit t(".reset_form"), {class: 'secondary', "data-action": "click->updateinput#update", "data-updateinput-value": "true"} + +.row + %fieldset.alpha.no-border-bottom + %legend= t('Invoice_item_sorting') + .three.columns.alpha + %label= t '.sort_items_by_supplier?' + %div{'ofn-with-tip' => t('.sort_items_by_supplier_tip')} + %a= t 'admin.whats_this' + .three.columns + = f.radio_button :preferred_invoice_order_by_supplier, true, 'ng-model' => 'Enterprise.preferred_invoice_order_by_supplier', 'ng-value' => 'true' + = f.label :enabled, t('.enabled'), value: :true + .five.columns.omega + = f.radio_button :preferred_invoice_order_by_supplier, false, 'ng-model' => 'Enterprise.preferred_invoice_order_by_supplier', 'ng-value' => 'false' + = f.label :disabled, t('.disabled'), value: :false