<%= form_title %>
<%= link_to t(".skip_template"), decidim_admin_templates.skip_questionnaire_templates_path(questionnaire_id: questionnaire, url: request.url), class: "button button__sm button__secondary", method: :post %>

<%= decidim_form_for([questionnaire], url: decidim_admin_templates.apply_questionnaire_templates_url(questionnaire_id: questionnaire, url: request.url), method: :post, html: { class: "form form-defaults choose_questionnaire_templates" }) do |form| %>
<%= t(".description") %> <%= datalist_select(templates, { id: "choose-template", list: "template-list", label: t(".label"), name: "select-template", placeholder: t("placeholder", scope: "decidim.templates.admin.questionnaire_templates.choose"), data: { previewurl: decidim_admin_templates.preview_questionnaire_templates_url(format: :js) } } ) { form.hidden_field :questionnaire_template_id } %>

<%= form.submit t(".create_from_template"), class: "button button__sm button__secondary" %>
<% end %>
<%= append_javascript_pack_tag "decidim_templates" %> <%= append_stylesheet_pack_tag "decidim_templates" %>