mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:41:41 +00:00
los campos tienen etiquetas y ayudas
This commit is contained in:
parent
66007e90d3
commit
c0590164f0
3 changed files with 14 additions and 3 deletions
|
@ -222,8 +222,12 @@ class Post
|
|||
h
|
||||
end
|
||||
|
||||
def label
|
||||
(complex? && contents.dig('label')) || human
|
||||
end
|
||||
|
||||
def help
|
||||
(complex? && contents.dig('help')) || human
|
||||
complex? && contents.dig('help')
|
||||
end
|
||||
|
||||
def nested_fields
|
||||
|
|
|
@ -94,7 +94,9 @@
|
|||
= fa_icon 'link', title: t('posts.anchor')
|
||||
- if template.private?
|
||||
= fa_icon 'lock', title: t('posts.private')
|
||||
= template.help
|
||||
= template.label
|
||||
- if template.help
|
||||
%small.text-muted.form-text= template.help
|
||||
= render "posts/template_field/#{type}", template: template, name: template.key, value: value
|
||||
.invalid-feedback= t('posts.invalid')
|
||||
.form-group
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
.form-group
|
||||
= label_tag name.join('_'), template.help, id: name.join('_')
|
||||
= label_tag name.join('_'), id: name.join('_') do
|
||||
- if template.private?
|
||||
= fa_icon 'lock', title: t('posts.private')
|
||||
= template.label
|
||||
- if template.help
|
||||
%small.text-muted.form-text= template.help
|
||||
= render "posts/template_field/#{template.type}",
|
||||
template: template,
|
||||
name: name,
|
||||
|
|
Loading…
Reference in a new issue