5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 17:56:22 +00:00
panel/app/views/posts/attributes/_array.haml
2019-08-23 15:29:07 -03:00

18 lines
685 B
Text

.form-group
= label_tag "post_#{attribute}", post_label_t(attribute, post: post)
.taggable{ data: { values: metadata.value.join(','),
name: "post[#{attribute}][]", list: id_for_datalist(attribute),
remove: 'false', legend: post_label_t(attribute, post: post),
described: id_for_help(attribute) } }
= text_field(*field_name_for('post', attribute, '[]'),
value: metadata.value.join(', '),
**field_options(attribute, metadata))
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata
%datalist{ id: id_for_datalist(attribute) }
- site.everything_of(attribute).each do |value|
%option{ value: value }