mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-27 00:14:58 -04:00
The label-beside-input forms (label col-md-2, input col-md-8) relied on form-horizontal and form-group acting as a row. Each field wrapper is now a real .row.mb-3, labels are col-form-label, help text is form-text, and the leftover form-horizontal and form-actions classes, which do nothing in Bootstrap 5, are dropped. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
- @comment ||= Comment.new(commentable: @commentable)
|
|
.card.col-md-8.col-lg-7.mx-auto.float-none.white.z-depth-1.py-2.px-2
|
|
.card-body
|
|
- if content_for? :title
|
|
%h1.h2-responsive.text-center
|
|
%strong=yield :title
|
|
= form_for(@comment) do |f|
|
|
- if @comment.errors.any?
|
|
#error_explanation
|
|
%h2
|
|
= pluralize(@comment.errors.size, "error")
|
|
prohibited this comment from being saved:
|
|
%ul
|
|
- @comment.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
.md-form
|
|
= f.text_area :body, rows: 6, class: 'form-control md-textarea', autofocus: 'autofocus', required: true, pattern: '\w+'
|
|
= f.label :body, "Your comment:"
|
|
|
|
%span.form-text
|
|
= render partial: "shared/markdown_help"
|
|
.actions.text-end
|
|
= f.submit 'Post comment', class: 'btn btn-primary'
|
|
.field
|
|
= f.hidden_field :commentable_id, value: @commentable.id
|
|
= f.hidden_field :commentable_type, value: @commentable.class.name
|