Sha256: ad4c6046f9fac0c94c22139516917ad6a27bafcc3bed1f31b792aff0c50af42d

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

<% path = @term.persisted? ? category_term_path(params[:category_id], @term) : category_terms_path(params[:category_id]) %>

<%= form_with(model: term, local: true, url: path ) do |form| %>
  <% if term.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(term.errors.count, "error") %> prohibited this term from being saved:</h2>

      <ul>
      <% term.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

    <div class="form-group">
      <%= form.select :category_id, PolicyManager::Category.all.map{|o| [o.name, o.id]}, :selected => params[:category_id] %>
      <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
    </div>
    <div class="form-group">
      <%= form.label :description %>
      <%= form.text_area :description, id: :term_description, class: "form-control" %>
    </div>

    <%= form.submit class: "btn btn-primary" %>

<% end %>

<script>
var simplemde = new SimpleMDE({ element: $("#term_description")[0] });
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gdpr_rails-0.1.0 app/views/policy_manager/terms/_form.html.erb