From 7eeb50d30281321ea28e957df4707fab91c06ca8 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 19 Jun 2018 14:50:53 -0300 Subject: [PATCH] visualizar los campos privados con un icono y texto alternativo --- app/views/posts/_form.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 7e2b00d..ff38268 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -78,9 +78,10 @@ - @post.template_fields.each do |template| - next unless type = template.type .form-group - = label_tag "post_#{template}", template.help.present? ? template.help : template.human - - if template.private? - %small.text-muted.form-text.pull-right= t('posts.private') + = label_tag "post_#{template}" do + - if template.private? + = fa_icon 'lock', alt: t('posts.private') + = template.help.present? ? template.help : template.human - name = "post[#{template}]" - value = @post.new? ? template.values : @post.get_front_matter(template) - case type