diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 352b92b..e61cb10 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