25 lines
1 KiB
Text
25 lines
1 KiB
Text
|
= form_tag site_post_path(@site, @post), method: :patch, class: 'form' do
|
||
|
.form-group
|
||
|
= submit_tag t('posts.save'), class: 'btn btn-success'
|
||
|
.form-group
|
||
|
= text_field 'post', 'title', value: @post.title, class: 'form-control',
|
||
|
placeholder: t('posts.title')
|
||
|
.form-group
|
||
|
= text_area_tag 'post[content]', @post.content, autofocus: true,
|
||
|
class: 'form-control post-content'
|
||
|
.form-group
|
||
|
= label_tag 'post_date', t('posts.date')
|
||
|
= date_field 'post', 'date', value: @post.date.strftime('%F'),
|
||
|
class: 'form-control'
|
||
|
%small.text-muted.form-text= t('posts.date_help')
|
||
|
.form-group
|
||
|
= label_tag 'post_categories', t('posts.categories')
|
||
|
= text_field 'post', 'categories', value: @post.categories.join(', '),
|
||
|
class: 'form-control'
|
||
|
%small.text-muted.form-text= t('posts.tags_help')
|
||
|
.form-group
|
||
|
= label_tag 'post_tags', t('posts.tags')
|
||
|
= text_field 'post', 'tags', value: @post.tags.join(', '),
|
||
|
class: 'form-control'
|
||
|
%small.text-muted.form-text= t('posts.tags_help')
|