diff --git a/app/decorators/odk/form_decorator.rb b/app/decorators/odk/form_decorator.rb index 9e60131e7a..53a4a54c42 100644 --- a/app/decorators/odk/form_decorator.rb +++ b/app/decorators/odk/form_decorator.rb @@ -9,11 +9,10 @@ class FormDecorator < BaseDecorator IR_QUESTION = "ir01" IR_CODE = "ir02" - def default_response_name_instance_tag - if default_response_name.present? - content_tag(:meta, tag(:instanceName)) - else - "" + def meta_tags + content_tag("orx:meta") do + h.concat(tag("orx:instanceID")) + h.concat(tag("orx:instanceName")) if default_response_name.present? end end diff --git a/app/views/forms/odk/_instances.xml.erb b/app/views/forms/odk/_instances.xml.erb index a04f4837f7..7e31b15eba 100644 --- a/app/views/forms/odk/_instances.xml.erb +++ b/app/views/forms/odk/_instances.xml.erb @@ -1,6 +1,5 @@ <%= content_tag(:data, id: @form.id, version: @form.number) do %> - <%= @form.default_response_name_instance_tag %> <%= render("forms/odk/instance_node", node: @form.root_group) %> <%# Incomplete response question nodes %> @@ -9,9 +8,7 @@ <%= tag(ODK::FormDecorator::IR_CODE) %> <% end %> - - - + <%= @form.meta_tags %> <% end %> diff --git a/spec/fixtures/odk/forms/default_patterns.xml b/spec/fixtures/odk/forms/default_patterns.xml index b4526bc6e3..9157e31804 100644 --- a/spec/fixtures/odk/forms/default_patterns.xml +++ b/spec/fixtures/odk/forms/default_patterns.xml @@ -5,9 +5,6 @@ - - - <*itemcode1*>
<*itemcode2*/> @@ -19,6 +16,7 @@ <*itemcode6*/> +