Sha256: bf1d87241bb64fa8ced2cc14154683c7a34b182b5178643dd9cdc773b6e4f00e

Contents?: true

Size: 1.37 KB

Versions: 4

Compression:

Stored size: 1.37 KB

Contents

<summary><%= t(".question") %></summary>

<div>
  <p><%= translated_attribute(question.body) %></p>

  <% @form = form || Decidim::Meetings::AnswerForm.new(question_id: question.id, current_user: current_user) %>
  <%= decidim_form_for(@form, url: meeting_polls_answers_path(meeting), method: :post, remote: true, html: { class: "form answer-questionnaire" }, data: { "safe-path" => meeting_live_event_path(meeting) }) do |form| %>
    <div class="row column answer question" data-max-choices="<%= question.max_choices %>">
      <small class="form-error max-choices-alert"><%= t(".max_choices_alert") %></small>

      <%= render partial: "decidim/meetings/polls/answers/#{question.question_type}", locals: { answer: @form.answer, question: question, answer_form: form, disabled: question.answered_by?(current_user), field_id: question.id  } %>

      <%= form.hidden_field :question_id %>

      <% @form.errors.full_messages.each do |msg| %>
        <small class="form-error is-visible margin-top-1"><%= msg %></small>
      <% end %>
    </div>
    <% if question.answered_by?(current_user) %>
      <div class="callout success margin-top-1">
        <%= t(".question_replied") %>
      </div>
    <% else %>
      <div class="text-right">
        <button class="button button--nomargin primary small margin-top-1"><%= t(".reply_question") %></button>
      </div>
    <% end %>
  <% end %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-meetings-0.27.9 app/views/decidim/meetings/polls/questions/_published_question.html.erb
decidim-meetings-0.27.8 app/views/decidim/meetings/polls/questions/_published_question.html.erb
decidim-meetings-0.27.7 app/views/decidim/meetings/polls/questions/_published_question.html.erb
decidim-meetings-0.27.6 app/views/decidim/meetings/polls/questions/_published_question.html.erb