5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 03:26:22 +00:00
panel/app/views/posts/attributes/_boolean.haml
f 5f3bbbfb1f
hacer funcionar los metadatos booleanos
de yapa, eliminar casos especiales en el formulario
2019-09-30 15:20:23 -03:00

11 lines
465 B
Text

.form-check
= hidden_field_tag "post[#{attribute}]", '0'
= check_box_tag "post[#{attribute}]", metadata.value, metadata.value,
class: "form-check-input #{invalid(post, attribute)}",
aria: { describedby: id_for_help(attribute) },
autofocus: autofocus
= label_tag "post_#{attribute}", post_label_t(attribute, post: post),
class: 'form-check-label'
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata