about summary refs log tree commit diff stats
path: root/app/views/admin/blogs/_form.html.haml
blob: 55a297acc43e798450669ff44a8df1a882dfce3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- if f.object.errors.any?
  %ul#errors
    - f.object.errors.full_messages.each do |error|
      %li= error
%fieldset#content
  .title-field
    = f.label :title
    = f.text_field :title, placeholder: "Title"
  .slug-field
    = f.label :slug, "https://feffernoo.se/says/"
    = f.text_field :slug, placeholder: "insert-slug-here"
  .body-field
    = f.label :body
    = f.cktext_area :body
%fieldset#details
  .details-module
    = f.fields_for :records, Record.new do |builder|
      .should-create-record-field
        = builder.check_box :_destroy, {checked: false}, "0", "1"
        = builder.label :_destroy, "Create record?"
      .record-description-field
        = builder.text_area :description, placeholder: "record text"
  .details-module= f.submit