Sha256: 0e45ac3f95cb28ac2f3301ebcecc805145dba03c0e79e5c0666d6888e039ab95

Contents?: true

Size: 1.64 KB

Versions: 9

Compression:

Stored size: 1.64 KB

Contents

<div class="row column decidim_awesome-form">
  <% if config_enabled? :scoped_styles %>
    <p class="help-text"><%= t("help.scoped_styles", scope: "decidim.decidim_awesome.admin.config.form") %>
      <%= t("help.scoped_styles_variables", scope: "decidim.decidim_awesome.admin.config.form") %>
    </p>
    <p class="help-text" style="white-space: unset">
      <% ["primary", "secondary", "success", "warning", "alert", "highlight", "highlight_alternative"].each do |color| %>
        <span class="color-box <%= color %>" style="background-color: <%= current_organization.colors[color] %>"></span> var(--<%= color %>)
      <% end %>
    </p>

    <% form.object.scoped_styles&.each do |key, value| %>
      <div class="scoped_styles_container" data-key="<%= key %>">
        <%= render(partial: "decidim/decidim_awesome/admin/config/autoedit_box_label", locals: { var: "scoped_styles", key: key, scope: "scoped_style_#{key}", delete_path: decidim_admin_decidim_awesome.scoped_style_path(key: key) }) %>
        <p class="form-error is-visible" id="custom-style-error-<%= key %>"><%= errors[key.to_sym].join("<br>") if errors %></p>
        <%= text_area_tag key, value, name: "config[scoped_styles][#{key}]", rows: 5 %>
        <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: "scoped_style_#{key}", constraints: constraints_for("scoped_style_#{key}") }) %>
      </div>
    <% end %>

    <%= link_to t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_styles"), decidim_admin_decidim_awesome.scoped_styles_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_styles.html.erb
decidim-decidim_awesome-0.10.1 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.10.0 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.9.3 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.9.1 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.8.3 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.8.2 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.8.1 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
decidim-decidim_awesome-0.8.0 app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb