Sha256: e31c470749543b9b0b9c27a0945024d219db1cbe65f4e9bdb793fee5cfdaee4a

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 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:) %>
  <%= decidim_form_for(@form, url: meeting_polls_answers_path(meeting), method: :post, remote: true, html: { class: "form-defaults mt-4" }, data: { "safe-path" => meeting_live_event_path(meeting) }) do |form| %>
    <div class="answer question" data-max-choices="<%= question.max_choices %>">
      <%= render partial: "decidim/meetings/polls/answers/#{question.question_type}", locals: { answer: @form.answer, question:, answer_form: form, disabled: question.answered_by?(current_user), field_id: question.id } %>

      <%= form.hidden_field :question_id %>

      <small class="form-error max-choices-alert"><%= t(".max_choices_alert") %></small>

      <% @form.errors.full_messages.each do |msg| %>
        <small class="form-error is-visible mt-1"><%= msg %></small>
      <% end %>
    </div>
    <% if question.answered_by?(current_user) %>
      <%= cell("decidim/announcement", t(".question_replied"), callout_class: "success" ) %>
    <% else %>
      <div class="text-right">
        <button class="ml-auto button button button__sm button__secondary"><%= t(".reply_question") %></button>
      </div>
    <% end %>
  <% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-meetings-0.28.0.rc5 app/views/decidim/meetings/polls/questions/_published_question.html.erb
decidim-meetings-0.28.0.rc4 app/views/decidim/meetings/polls/questions/_published_question.html.erb