Sha256: 619c429b90a401e511bea131092e247797ff37473728474ea09bc9063580e7fa

Contents?: true

Size: 1.67 KB

Versions: 9

Compression:

Stored size: 1.67 KB

Contents

<% help_text = translated_attribute(component_settings.attachment_help).strip %>

<div class="card multifield-field" id="<%= id %>-field">
  <div class="card-divider multifield-field-divider">
    <h3 class="heading6 card-title">
      <span class="card-title-text">
        <%== t(".attachment_legend") %>
      </span>

      <button class="button tiny hollow remove-field button--title" aria-label="<%= t(".remove") %>">
        <%== icon("trash") %>
      </button>

      <button class="button tiny hollow move-down-field button--title hide-for-small-only" aria-label="<%= t(".down") %>">
        <%== icon("arrow-bottom") %>
      </button>

      <button class="button tiny hollow move-up-field button--title hide-for-small-only" aria-label="<%= t(".up") %>">
        <%== icon("arrow-top") %>
      </button>
    </h3>
  </div>

  <div class="card-section">
    <div class="row column">
      <% if help_text && help_text.length > 0 %>
        <p class="help-text"><%= help_text %></p>
      <% end %>

      <div class="field">
        <% if form.send(:attribute_required?, :title) %>
          <%= form.text_field :title %>
        <% else %>
          <%
          # Force the required tag on the form to indicate the user that the
          # title is required always when the file is given.
          %>
          <%= form.text_field :title, label: form.label_for(:title) + required_tag %>
        <% end %>
      </div>

      <div class="field">
        <%= upload_field form, :file %>
      </div>

      <%= form.hidden_field :id %>
      <%= form.hidden_field :weight, value: form.object.weight || 0, class: "position-input" %>
      <%= form.hidden_field :deleted %>
    </div>
  </div>
</div>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-plans-0.18.2 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.18.1 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.18.0 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.17.0 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.16.9 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.16.8 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.16.7 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.16.6 app/views/decidim/plans/shared/_attachment_fields.html.erb
decidim-plans-0.16.5 app/views/decidim/plans/shared/_attachment_fields.html.erb