diff --git a/app/controllers/madmp_fragments_controller.rb b/app/controllers/madmp_fragments_controller.rb index 216a947..2ff82c2 100644 --- a/app/controllers/madmp_fragments_controller.rb +++ b/app/controllers/madmp_fragments_controller.rb @@ -213,6 +213,7 @@ research_output = answer.research_output section = question.section plan = answer.plan + template = section.phase.template return { "answer" => { @@ -231,6 +232,7 @@ }, formats: [:html]) : nil, "form" => render_to_string(partial: "madmp_fragments/new_edit", locals: { + template: template, question: question, answer: answer, fragment: fragment , @@ -238,7 +240,8 @@ research_output: research_output, dmp_id: fragment.dmp_id, parent_id: fragment.parent_id, - readonly: false + readonly: false, + base_template_org: template.base_org }, formats: [:html]), "answer_status" => render_to_string(partial: "answers/status", locals: { answer: answer diff --git a/app/views/branded/madmp_fragments/_new_edit.html.erb b/app/views/branded/madmp_fragments/_new_edit.html.erb index a627698..d572ba3 100644 --- a/app/views/branded/madmp_fragments/_new_edit.html.erb +++ b/app/views/branded/madmp_fragments/_new_edit.html.erb @@ -1,4 +1,4 @@ -<%# locals: { template, question, fragment, madmp_schema, research_output, readonly, locking } %> +<%# locals: { template, question, fragment, madmp_schema, research_output, readonly, locking, base_template_org } %> @@ -34,7 +34,7 @@ readonly: readonly, classname: classname, fragment_id: fragment_id, - template_locale: question.template.locale + template_locale: template.locale }) %>