.modal.fade{ id: 'delete-staging-workflow', tabindex: -1, role: 'dialog' }
  .modal-dialog.modal-dialog-centered{ role: 'document' }
    .modal-content
      .modal-header
        %h5.modal-title
          Do you want to delete the staging for #{project}?
      .modal-body
        %p Please confirm deletion of the staging for #{project}
        = form_for(staging_workflow, method: :delete, remote: true, id: 'staging-workflow-delete', url: staging_workflow_path) do |f|
          - if staging_workflow.staging_projects.any?
            %p Check the staging projects you want to be deleted:
            -# TODO: Adding a "Select all staging projects" checkbox could be nice
            = f.collection_check_boxes(:staging_project_ids, staging_workflow.staging_projects,
                                       :id, :name, include_hidden: false) do |staging_project_fields|
              .form-check
                = staging_project_fields.check_box(class: 'form-check-input', checked: false)
                = staging_project_fields.label(class: 'form-check-label')
          %br
          .modal-footer
            %i.fas.fa-spinner.fa-spin.delete-spinner.d-none
            %button.btn.btn-sm.btn-outline-secondary.px-4{ data: { 'bs-dismiss': 'modal' }, type: 'button' }
              Cancel
            = f.submit('Delete', class: 'btn btn-sm btn-danger px-4')

- content_for :ready_function do
  setSpinnersForDeletion();
