2024-09-06 19:11:20 +00:00
|
|
|
-# TODO: convertir los atributos draft a un tipo
|
|
|
|
- if attribute == :draft && site.invitade?(current_usuarie)
|
|
|
|
-# Nada
|
|
|
|
- else
|
|
|
|
.form-check
|
|
|
|
= hidden_field_tag "#{base}[#{attribute}]", '0', id: nil
|
|
|
|
.custom-control.custom-switch
|
|
|
|
= check_box_tag "#{base}[#{attribute}]", '1', metadata.value,
|
|
|
|
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),
|
|
|
|
class: 'custom-control-label'
|
2019-08-20 22:11:10 +00:00
|
|
|
|
2024-09-06 19:11:20 +00:00
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|