5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 01:06:21 +00:00
This commit is contained in:
f 2020-01-22 17:42:08 -03:00
parent 597daceb5b
commit 55a37edae0
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
4 changed files with 15 additions and 10 deletions

View file

@ -0,0 +1,5 @@
# frozen_string_literal: true
# Un campo de correo
# TODO: Validar que tenga un formato correo
class MetadataString < MetadataString; end

View file

@ -2,13 +2,4 @@
# Un campo de correo # Un campo de correo
# TODO: Validar que tenga un formato correo # TODO: Validar que tenga un formato correo
class MetadataString < MetadataTemplate class MetadataString < MetadataString; end
# Una string vacía
def default_value
''
end
def value
super.strip
end
end

View file

@ -0,0 +1,3 @@
%tr{ id: attribute }
%th= post_label_t(attribute, post: post)
%td{ style: "background-color: #{metadata.value}" } = metadata.value

View file

@ -0,0 +1,6 @@
.form-group
= label_tag "post_#{attribute}", post_label_t(attribute, post: post)
= color_field 'post', attribute, value: metadata.value,
**field_options(attribute, metadata)
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata