.tab-selector__target#file.is-inactive{ 'data-dough-tab-selector-target' => 'file' }
  %h3.l-tab-panels__heading
    = t('links.file.header')
  = form_tag(site_links_files_path, method: 'get', remote: true) do
    = label_tag(:link, t('links.current'))
    = text_field_tag(:link, nil, data: {'dough-linkmanager-link-type' => 'file'}, disabled: 'disabled')
    = label_tag(:search, nil, class: 'visually-hidden')
    = text_field_tag(:search, '', placeholder: t('links.file.placeholder'), class: 'form__input form__input--constrained search__input t-search-box')
    = button_tag(:search, type: 'submit', name: nil, class: 'button--action button--search-action t-search-btn') do
      %span.button__text.fa.fa-search

  .js-linkable-files

  %span.button-menu
    %button.button--action{ 'data-dough-linkmanager-insertlink' => true }
      = t('links.file.insert_button')

.tab-selector__target#file.is-inactive{ 'data-dough-tab-selector-target' => 'file' }
  %h3.l-tab-panels__heading
    = t('links.file.header')
  = form_tag(site_links_files_path, method: 'get', remote: true) do
    = label_tag(:link, t('links.current'))
    = text_field_tag(:link, nil, data: {'dough-linkmanager-link-type' => 'file'}, disabled: 'disabled')
    = label_tag(:search, nil, class: 'visually-hidden')
    = text_field_tag(:search, '', placeholder: t('links.file.placeholder'), class: 'form__input form__input--constrained search__input t-search-box')
    = button_tag(:search, type: 'submit', name: nil, class: 'button--action button--search-action t-search-btn') do
      %span.button__text.fa.fa-search

    .choose-sort-by
      = label_tag :sort_by
      = select_tag(:order, options_to_sort_files(selected_option: @order),  prompt: I18n.t('files.index.sort_by.placeholder'),   data: { dough_component: 'SelectSubmitter' })

  .js-linkable-files

  %span.button-menu
    %button.button--action{ 'data-dough-linkmanager-insertlink' => true }
      = t('links.file.insert_button')

Sort files in link dialog
Sort files in link dialog
