$(document).on("click", '.editar_alojamento', function() {
  var alojamentoid = $(this).data('id');
  $.ajax({
      url: '/app/elements/functions/ajax.php',
      type: 'POST',
      data: {"ajax": "alojamento_editar", "alojamentoid": alojamentoid},
      cache: false,
      success: function(response){
        $('#edit_alojamento .modal-content .modal-body').html(response);
        $('#edit_alojamento .modal-content .modal-body').prepend('<input type="hidden" name="origem" value="dash" />');
      }
  });
});

$(document).on("click", '.editar_dominio', function() {
  var dominioid = $(this).data('id');
  $.ajax({
      url: '/app/elements/functions/ajax.php',
      type: 'POST',
      data: {"ajax": "dominio_editar", "dominioid": dominioid},
      cache: false,
      success: function(response){
        $('#edit_dominio .modal-content .modal-body').html(response);
        $('#edit_dominio .modal-content .modal-body').prepend('<input type="hidden" name="origem" value="dash" />');
      }
  });
});
