Sha256: a5e93d3fce7ac520c6fb2b7abe4821d1c6595ff3caa24797e2d1f76a23c1ce87
Contents?: true
Size: 1.24 KB
Versions: 9
Compression:
Stored size: 1.24 KB
Contents
= simple_form_for(post, (EffectivePosts.simple_form_options || {}).merge(url: (post.persisted? ? effective_posts.post_path(post.id) : effective_posts.posts_path))) do |f| = f.input :title, hint: 'The title of your post.' - if Array(EffectivePosts.categories).length > 1 = f.input :category, as: (defined?(EffectiveFormInputs) ? :effective_select : :select), collection: EffectivePosts.categories, include_blank: false - else = f.input :category, as: :hidden, input_html: { value: (EffectivePosts.categories.first || 'posts') } = render partial: '/effective/posts/additional_fields', locals: { post: post, form: f, f: f } = f.input :published_at, as: (defined?(EffectiveFormInputs) ? :effective_date_time_picker : :datetime), label: 'Publish date', hint: 'When should this be displayed on the website.' = f.input :body, as: (defined?(EffectiveFormInputs) ? :effective_ckeditor_text_area : :text), hint: 'The body of your post. You can add content here, or with the full screen editor on the next page.', toolbar: 'simple', required: true .form-actions = f.button :submit, 'Save', data: { disable_with: 'Saving...' }, class: 'btn btn-primary' = link_to 'Cancel', effective_posts.posts_path
Version data entries
9 entries across 9 versions & 1 rubygems