Sha256: e483bcc035c71f9475733f6437490c4abbf5741c6d67ad10d895a89d1b031856

Contents?: true

Size: 910 Bytes

Versions: 2

Compression:

Stored size: 910 Bytes

Contents

<%= content_tag :div,
  class: link_editor.css_classes,
  data: link_editor.data_attributes do %>
  <%= element_form.fields_for(:ingredients, link_editor.ingredient) do |f| %>
    <%= ingredient_label(link_editor) %>
    <%= f.text_field :value,
      class: "thin_border text_with_icon disabled",
      name: nil,
      id: nil,
      disabled: true
    %>
    <%= f.hidden_field :value, "data-link-value": true %>
    <%= f.hidden_field :link_title, "data-link-title": true %>
    <%= f.hidden_field :link_class_name, "data-link-class": true %>
    <%= f.hidden_field :link_target, "data-link-target": true %>
  <% end %>
  <%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: link_editor %>
<% end %>

<script>
  $("#<%= link_editor.form_field_id %>").on("change", function() {
    $("[data-ingredient-id='<%= link_editor.id %>'] input.text_with_icon").val($(this).val());
  });
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alchemy_cms-6.0.0.b2 app/views/alchemy/ingredients/_link_editor.html.erb
alchemy_cms-6.0.0.b1 app/views/alchemy/ingredients/_link_editor.html.erb