public/scripts/page-create-orphanage.js
// remover e limpar o campo de foto
remover e limpar o campo de foto
remover e limpar o campo de foto
function deleteField(event){
    const span = event.currentTarget
    const fieldsContainer = document.querySelectorAll('.new-upload')
    if (fieldsContainer.length < 2){
      span.parentNode.children[0].value = ""
      return
    }
    span.parentNode.remove()
  }
function deleteField ( event ) { const span = event . currentTarget const fieldsContainer = document . querySelectorAll ( '.new-upload' ) if ( fieldsContainer . length < 2 ) { span . parentNode . children [ 0 ] . value = "" return } span . parentNode . remove ( ) }
remover e limpar o campo de foto
remover e limpar o campo de foto
// limpar o valor do campo // deletar o campo