2019-08-23 18:29:07 +00:00
|
|
|
.form-check
|
2020-11-27 22:32:16 +00:00
|
|
|
= hidden_field_tag "#{base}[#{attribute}]", '0', id: ''
|
2020-09-01 21:48:28 +00:00
|
|
|
.custom-control.custom-switch
|
2020-11-27 22:32:16 +00:00
|
|
|
= check_box_tag "#{base}[#{attribute}]", '1', metadata.value,
|
2020-09-01 21:48:28 +00:00
|
|
|
class: "custom-control-input #{invalid(post, attribute)}",
|
|
|
|
aria: { describedby: id_for_help(attribute) },
|
|
|
|
autofocus: autofocus
|
2020-11-27 22:32:16 +00:00
|
|
|
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post),
|
2020-09-01 21:48:28 +00:00
|
|
|
class: 'custom-control-label'
|
2019-08-20 22:11:10 +00:00
|
|
|
|
2020-09-01 21:48:28 +00:00
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|