diff --git a/app/components/input/select_component/select_component.html.haml b/app/components/input/select_component/select_component.html.haml new file mode 100644 index 000000000..242f79405 --- /dev/null +++ b/app/components/input/select_component/select_component.html.haml @@ -0,0 +1,2 @@ += render Input::InputFieldComponent.new(name: @name, error_message: @error_message, helper_text: @helper_text, label: @label) do + = render SelectInputComponent.new(id: @id, name: @name, values: @values , selected: @selected , multiple: @multiple, open_to_add_values: @open_to_add_values ) \ No newline at end of file diff --git a/app/components/ontology_subscribe_button_component.rb b/app/components/ontology_subscribe_button_component.rb index 143e8e2dc..c077e91ce 100644 --- a/app/components/ontology_subscribe_button_component.rb +++ b/app/components/ontology_subscribe_button_component.rb @@ -17,8 +17,10 @@ def initialize(ontology_id:, subscribed:, user_id:, count: 0, link: 'javascript: }, title: title } + @link = link + @count = count end - + def title if @subscribed "#{@sub_text} this resource" diff --git a/app/components/select_input_component.rb b/app/components/select_input_component.rb index 25f905100..59bc95d50 100644 --- a/app/components/select_input_component.rb +++ b/app/components/select_input_component.rb @@ -14,6 +14,10 @@ def initialize(id:, name:, values:, selected: nil, multiple: false, open_to_add_ @data = data @required = required end + + def call + select_input_tag(@id, @values, @selected, multiple: @multiple, open_to_add_values: @open_to_add_values) + end def call select_input_tag(@id, @name, @values, @selected, multiple: @multiple, open_to_add_values: @open_to_add_values,