mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
angular_select
This commit is contained in:
@@ -20,7 +20,7 @@ class AngularFormBuilder < ActionView::Helpers::FormBuilder
|
||||
@template.text_field_tag name, value, :id => id
|
||||
end
|
||||
|
||||
def angular_select(method, choices, options = {}, html_options = {})
|
||||
# ...
|
||||
def angular_select(method, choices, angular_field, options = {}, html_options = {})
|
||||
@template.select_tag method, @template.angular_options_for_select(choices, angular_field)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
= enterprise_fee_set_form.angular_fields_for :collection do |f|
|
||||
%tr{'ng-repeat' => 'enterprise_fee in enterprise_fees'}
|
||||
%td=# f.collection_select :enterprise_id, Enterprise.all, :id, :name, :include_blank => true
|
||||
%td=# f.angular_select :fee_type, enterprise_fee_options
|
||||
%td= f.angular_select :fee_type, enterprise_fee_type_options, 'enterprise_fee.fee_type'
|
||||
%td= f.angular_text_field :name
|
||||
%td=# f.collection_select :calculator_type, @calculators, :name, :description, {}, {:class => 'calculator_type'}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user