.tab-content.active#post_content
  .page-form
    .page-form-group
      .page-form-label
        = Spina::Admin::Conferences::Blog::Post.human_attribute_name :title
      .page-form-content
        = f.text_field :title, placeholder: Spina::Admin::Conferences::Blog::Post.human_attribute_name(:title_placeholder)

    .page-form-group
      .page-form-label
        = Spina::Admin::Conferences::Blog::Post.human_attribute_name :excerpt
      .page-form-content
        .page-form-rich-text
          = f.hidden_field :excerpt, id: 'excerpt_input'
          %trix-editor.text-input.trix-content{ input: 'excerpt_input' }


    .page-form-group
      .page-form-label
        = Spina::Admin::Conferences::Blog::Post.human_attribute_name :content
      .page-form-content
        .page-form-rich-text
          = f.hidden_field :content, id: 'content_input'
          %trix-editor.text-input.trix-content{ input: 'content_input' }

    .page-form-group
      .page-form-label
        = Spina::Admin::Conferences::Blog::Post.human_attribute_name :image_id
      .page-form-control{ data: { controller: 'image-form' } }
        .page-form-media-picker
          %div{ style: 'width: 100%' }
            = link_to spina.admin_media_picker_path(selected_ids: [f.object.image_id],
              input: "media_picker_#{f.object.object_id}_image_id", mode: 'single'), remote: true, class: 'image',
              data: { target: 'image-form.image' } do
              .page-form-media-picker-placeholder= t 'spina.images.choose_image'
              %div{ id: "media_picker_#{f.object.object_id}_image_id" }
                = hidden_field_tag :signed_blob_id, '', data: { target: 'image-form.signedBlobId' }
                = hidden_field_tag :filename, '', data: { target: 'image-form.filename' }
                = f.hidden_field :image_id, data: { target: 'image-form.imageId' }
              %div
                - if f.object.image.present?
                  = image_tag main_app.url_for(f.object.image.variant(resize: '400x300^', crop: '400x300+0+0')), width: 200, height: 150

          = button_tag type: :default, class: 'button button-small button-white',
            data: { action: 'image-form#remove' } do
            %i.icon.icon-cross{ style: 'margin: 0; font-size: 10px' }