5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 20:46:22 +00:00
panel/app/views/posts/attributes/_boolean.haml

13 lines
527 B
Text
Raw Normal View History

2019-08-23 18:29:07 +00:00
.form-check
= hidden_field_tag "#{base}[#{attribute}]", '0', id: ''
2020-09-01 21:48:28 +00:00
.custom-control.custom-switch
= 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
= 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