From f6da78738d8255137d17a911aa913c1c4141f954 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 24 Jul 2018 15:43:30 -0300 Subject: [PATCH] ocultar la direccion del texto tambien --- app/views/posts/_form.haml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 352b92ba..e61cb105 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -19,12 +19,13 @@ = hidden_field_tag 'template', params[:template] .form-group = submit_tag t('posts.save'), class: 'btn btn-success submit-post' - .form-group - = label_tag 'post_dir', t('posts.dir') - = select_tag 'post[dir]', - options_for_select([[t('posts.ltr'), 'ltr'], [t('posts.rtl'), 'rtl']], direction), - { class: 'form-control' } - %small.text-muted.form-text= t('posts.dir_help') + - if @post.has_field? :dir + .form-group + = label_tag 'post_dir', t('posts.dir') + = select_tag 'post[dir]', + options_for_select([[t('posts.ltr'), 'ltr'], [t('posts.rtl'), 'rtl']], direction), + { class: 'form-control' } + %small.text-muted.form-text= t('posts.dir_help') .form-group = label_tag 'post_title', t('posts.title') = text_field 'post', 'title', value: @post.title, class: field_class, required: true