<%= title %>
<%= export_dropdown if allowed_to? :export_answers, :questionnaire %>

<%= form.translated :text_field, :title, autofocus: true %>
<%= form.translated :editor, :description, toolbar: :full, lines: 30, label: t("models.components.description", scope: "decidim.forms.admin") %>
<%= form.translated :editor, :tos, toolbar: :full, lines: 10, label: t("models.components.tos", scope: "decidim.forms.admin") %>
<% if questionnaire.questions_editable? %> <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %> <%= render "decidim/forms/admin/questionnaires/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %> <% end %> <% else %>
<%= t(".already_answered_warning") %>
<% end %>
<% @form.questions.each_with_index do |question, index| %> <%= fields_for "questionnaire[questions][]", question do |question_form| %> <%= render "decidim/forms/admin/questionnaires/question", form: question_form, id: tabs_id_for_question(question), editable: questionnaire.questions_editable?, child_template_selector: "#answer-option-template-#{index}" %> <%= render "decidim/forms/admin/questionnaires/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-#{index}" %> <% end %> <% end %>
<% if questionnaire.questions_editable? %> <% end %>
<% if questionnaire.questions_editable? %> <%= javascript_include_tag "decidim/forms/admin/forms" %> <% end %>