Sha256: 4cc6f009f96dce17c719577d78b82c04d330ef76efd5e06a0dcd4a82546f04d6

Contents?: true

Size: 1.67 KB

Versions: 9

Compression:

Stored size: 1.67 KB

Contents

<div class="callout warning"><%= t("caution", scope: "decidim.decidim_awesome.admin.config") %></div>
<div class="row column decidim_awesome-form">
  <% if config_enabled? :proposal_custom_fields %>
    <p class="help-text"><%= t("help.proposal_custom_fields", scope: "decidim.decidim_awesome.admin.config.form") %></p>
    <p class="help-text"><%= t("help.proposal_custom_fields_example", scope: "decidim.decidim_awesome.admin.config.form") %></p>
    <p class="help-text"><%= t("help.proposal_custom_fields_translations", scope: "decidim.decidim_awesome.admin.config.form") %></p>

    <% form.object.proposal_custom_fields&.each do |key, value| %>
      <div class="proposal_custom_fields_container" data-key="<%= key %>">
        <%= render(partial: "decidim/decidim_awesome/admin/config/autoedit_box_label", locals: { var: "proposal_custom_fields", key: key, scope: "proposal_custom_field_#{key}", delete_path: decidim_admin_decidim_awesome.proposal_custom_field_path(key: key) }) %>
        <p class="form-error is-visible"><%= errors[key.to_sym].join("<br>") if errors %></p>
        <%= hidden_field_tag key, value, name: "config[proposal_custom_fields][#{key}]" %>
        <div class="proposal_custom_fields_editor">
          <div class="loading-spinner"></div>
        </div>
        <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: "proposal_custom_field_#{key}", constraints: constraints_for("proposal_custom_field_#{key}") }) %>
      </div>
    <% end %>

    <%= link_to t(".new"), decidim_admin_decidim_awesome.proposal_custom_fields_path, method: :post %>

  <% end %>
</div>

<%= javascript_pack_tag "decidim_decidim_awesome_admin_form_exit_warn" %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.10.2 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.10.1 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.10.0 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.9.3 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.9.1 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.8.3 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.8.2 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.8.1 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
decidim-decidim_awesome-0.8.0 app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb