Sha256: 6c62a5d1a113da343461eba94cf3068868906ef539d0b4cb46dd7e5e1dc63ad6

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

<button class="posts__post_newSurvey-btn" type="button" aria-haspopup="true" aria-controls="posts__post_newSurvey_questionsContainer">
  <%= t("decidim.components.posts.newFeed.newSurvey.newQuestion") %>
  <%= icon "add-line" %>
</button>
<div id="posts__post_newSurvey_liveRegion" aria-live="polite" class="sr-only"></div>
<div id="posts__post_newSurvey_questionsContainer" aria-live="polite">
  <template id="question_template">
    <%#= form.fields_for :questions, @form.questions.new, child_index: "NEW_RECORD" do |question_form| %>
    <%= fields_for "post[questions][NEW_RECORD]", Decidim::Posts::Question.new do |question_form| %>
      <%= render partial: "decidim/posts/posts/new_survey_question", locals: { form: question_form } %>
    <% end %>
  </template>
  <template id="answer_template">
    <%#= form.fields_for :answers, @form.answers.new, child_index: "NEW_RECORD" do |answer_form| %>
    <%= fields_for "post[questions][QUESTION_RECORD][answers][NEW_RECORD]", Decidim::Posts::Answer.new do |answer_form| %>
      <%= render partial: "decidim/posts/posts/new_survey_answer", locals: { form: answer_form } %>
    <% end %>
  </template>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-posts-1.0.0 app/views/decidim/posts/posts/_new_survey.html.erb