2019-08-23 18:29:07 +00:00
|
|
|
.form-check
|
2019-09-30 18:20:23 +00:00
|
|
|
= hidden_field_tag "post[#{attribute}]", '0'
|
2020-03-31 20:52:41 +00:00
|
|
|
= check_box_tag "post[#{attribute}]", '1', metadata.value,
|
2019-08-23 18:29:07 +00:00
|
|
|
class: "form-check-input #{invalid(post, attribute)}",
|
2019-09-12 18:11:39 +00:00
|
|
|
aria: { describedby: id_for_help(attribute) },
|
|
|
|
autofocus: autofocus
|
2019-08-20 22:11:10 +00:00
|
|
|
= label_tag "post_#{attribute}", post_label_t(attribute, post: post),
|
|
|
|
class: 'form-check-label'
|
|
|
|
|
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|