Sha256: ded8484a1df0a0ea65d746c17636391853fb0e68396a4dec8311250b7ba7249e

Contents?: true

Size: 1.42 KB

Versions: 7

Compression:

Stored size: 1.42 KB

Contents

<% @model = Character::Redirect %>

<div class='chr-form-large'>
  <%= simple_form_for :objects, url: @action_url, method: :post do |form| %>
    <%= hidden_field_tag :class_name, @model.to_s %>

    <% @model.all.each do |redirect| %>
      <%= form.simple_fields_for "[]", redirect do |f| %>
        <div class='fields'>
          <a class='action_delete' data-item-class='fields' href='#'><i class='chr-icon icon-close-alt'></i></a>
          <%= f.input :path, label: false, placeholder: 'Path', required: true %>
          <%= f.input :type, collection: @model::TYPE_CHOICES, include_blank: false, required: true, label: false %>
          <%= f.input :destination, label: false, placeholder: 'Redirect to', required: true %>
          <%= f.input :_destroy, as: :hidden, value: false %>
        </div>
      <% end %>
    <% end %>

    <div id='template' class='fields'>
      <a class='action_delete' data-item-class='fields' href='#' style='display: none;'><i class='chr-icon icon-close-alt'></i></a>
      <%= form.simple_fields_for "[]", @model.new do |f| %>
        <%= f.input :path, label: false, placeholder: 'Path', required: true %>
        <%= f.input :type, collection: @model::TYPE_CHOICES, include_blank: false, required: true, label: false %>
        <%= f.input :destination, label: false, placeholder: 'Redirect to', required: true %>
      <% end %>
    </div>

    <a href='#' class='action_add'>Add a redirect</a>
  <% end %>
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
character-1.0.6 app/views/character/settings/redirects.html.erb
character-1.0.5 app/views/character/settings/redirects.html.erb
character-1.0.4 app/views/character/settings/redirects.html.erb
character-1.0.3 app/views/character/settings/redirects.html.erb
character-1.0.2 app/views/character/settings/redirects.html.erb
character-1.0.1 app/views/character/settings/redirects.html.erb
character-1.0.0 app/views/character/settings/redirects.html.erb