Sha256: 56a9f78839159de282f70c707e56f7347f9a18594b854490679a3cc066e59f66

Contents?: true

Size: 1.43 KB

Versions: 13

Compression:

Stored size: 1.43 KB

Contents

<%= form_for(form_object, url: decidim_comments.comments_path(order:), method: :post, remote: true, html: { id: form_id }) do |form| %>
  <%= form.hidden_field :commentable_gid, id: nil %>
  <%= form.hidden_field :alignment, id: nil, class: "alignment-input" %>
  <%= comment_as_for(form) %>

  <div class="flex justify-between items-end mb-4">
    <label class="comment__form-label" for="<%= add_comment_id %>">
      <%= t("decidim.components.add_comment_form.form.body.label") %>
    </label>

    <span id="<%= add_comment_id %>-remaining-characters" class="remaining-character-count"></span>
  </div>

  <%= form.text_area(
    :body,
    id: add_comment_id,
    class: "w-full min-h-[160px]",
    maxlength: comments_max_length,
    required: true,
    placeholder: t("decidim.components.add_comment_form.form.body.placeholder"),
    label: false,
    data: { remaining_characters: "##{add_comment_id}-remaining-characters", input_emoji: true }
  ) %>

  <div class="comment__form-submit">
    <% if alignment_enabled? %>
      <%= render :opinion %>
    <% end %>

    <button type="submit" class="button button__sm button__secondary" disabled="disabled">
      <span>
      <% if reply? %>
        <%= t("decidim.components.add_comment_form.form.submit_reply") %>
      <% else %>
        <%= t("decidim.components.add_comment_form.form.submit_root_comment") %>
      <% end %>
      </span>
      <%= icon "chat-1-line" %>
    </button>
  </div>
<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-comments-0.29.1 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.4 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.29.0 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.3 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.29.0.rc4 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.29.0.rc3 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.29.0.rc2 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.29.0.rc1 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.2 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.1 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.0 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.0.rc5 app/cells/decidim/comments/comment_form/show.erb
decidim-comments-0.28.0.rc4 app/cells/decidim/comments/comment_form/show.erb