2019-08-23 18:29:07 +00:00
|
|
|
.form-group
|
2020-11-27 22:32:16 +00:00
|
|
|
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
|
2021-02-11 15:13:18 +00:00
|
|
|
= hidden_field_tag "#{base}[#{attribute}][]", ''
|
2019-08-16 23:25:07 +00:00
|
|
|
|
2020-05-23 19:34:45 +00:00
|
|
|
.taggable{ dir: dir, lang: locale, data: { values: metadata.value.to_json,
|
2020-11-27 22:32:16 +00:00
|
|
|
name: "#{base}[#{attribute}][]", list: id_for_datalist(attribute),
|
2019-08-16 23:25:07 +00:00
|
|
|
remove: 'false', legend: post_label_t(attribute, post: post),
|
2020-05-23 16:52:58 +00:00
|
|
|
button: t('posts.attributes.add'),
|
2019-08-16 23:25:07 +00:00
|
|
|
described: id_for_help(attribute) } }
|
|
|
|
|
2020-11-27 22:32:16 +00:00
|
|
|
= text_field(*field_name_for(base, attribute, '[]'),
|
2019-08-16 23:25:07 +00:00
|
|
|
value: metadata.value.join(', '),
|
|
|
|
**field_options(attribute, metadata))
|
|
|
|
|
2019-08-13 19:09:23 +00:00
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|
2019-08-16 23:25:07 +00:00
|
|
|
|
|
|
|
%datalist{ id: id_for_datalist(attribute) }
|
2020-05-23 15:38:03 +00:00
|
|
|
- metadata.values.each do |value|
|
2019-08-16 23:25:07 +00:00
|
|
|
%option{ value: value }
|