Sha256: 8b6f9ce31a6e3ebc458b5ee5e90c4125802367131182f8a492f354784637e670

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

<%= panda_cms_form_with model: post, url: url do |f| %>
  <div data-controller="text-field-update">
    <input type="hidden" value="<%= PandaCms::Current.root %>" data-text-field-update-target="existing_root">
    <%= f.text_field :title, { required: true, data: { "text-field-update-target": "input_text", action: "focusout->text-field-update#generatePath" } } %>
    <%= f.text_field :slug, { required: true, data: { prefix: PandaCms::Current.root + "/#{PandaCms.posts[:prefix]}", "text-field-update-target": "output_text" } } %>
    <%= f.select :user_id, PandaCms::User.for_select_list %>
    <%= f.datetime_field :published_at, { required: true } %>
    <%= f.select :status, PandaCms::Post.statuses.keys.map { |status| [status.humanize, status] } %>
    <%= f.rich_text_area :post_content, { meta: "Your content here will not auto-save! 😬 Use Ctrl + ⇧ + V (Win) or ⌘ + ⇧ + V (macOS) to paste without formatting." } %>
    <%= f.button %>
  </div>
<% end %>
<% content_for :head do %>
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/trix@2.0.8/dist/trix.css">
  <script type="text/javascript" src="https://unpkg.com/trix@2.0.8/dist/trix.umd.min.js"></script>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
panda_cms-0.5.10 app/views/panda_cms/admin/posts/_form.html.erb
panda_cms-0.5.9 app/views/panda_cms/admin/posts/_form.html.erb