<commit_before>let _init_edit = function() {
  var connect,
      form,
      result;

  let data = getEditData();

  if(!(data.name.empty && data.surname.empty && data.password.empty && data.phone.empty)) {
    if(data.password.success && data.phone.success) {
      form = 'name=' + data.name.value + '&surname=' + data.surname.value + '&pass=' + data.password.value[0] + '&phone=' + data.phone.value;
      connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
      connect.onreadystatechange = function() {
        if(connect.readyState == 4 && connect.status == 200) {
          if(connect.responseText == 1) {
            result = '<div class="alert alert-success alert-dismissible fade show" role="alert" style="border-radius: 0;">';
            result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
            result += '<h4>Edición completada!</h4>';
            result += '<p><strong>Estás siendo redirigido...</strong></p>';
            result += '</div>';
            Func.$('#_AJAX_EDIT_').innerHTML = result;
            location.reload();
          } else {
            result = '<div class="alert alert-danger alert-dismissible fade show" role="alert" style="border-radius: 0;">';
            result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
            result += '<p><strong>ERROR: </strong>' + connect.responseText + '</p>';
            result += '</div>';
            Func.$('#_AJAX_EDIT_').innerHTML = result;
          }
        } else if(connect.readyState != 4) {
          result = '<div class="alert alert-warning alert-dismissible fade show" role="alert" style="border-radius: 0;">';
          result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
          result += '<h4>Processing...</h4>';
          result += '<p><strong>Tu solicitud esta siendo procesada...</strong></p>';
          result += '</div>';
          Func.$('#_AJAX_EDIT_').innerHTML = result;
        }
      }
      connect.open('POST','ajax.php?for=users&mode=edit',true);
      connect.setRequestHeader('Content-Type','application/x-www-form-urlencoded');<commit_msg>Se finaliza editar usuario<commit_after>let _init_edit = function() {
  var connect,
      form,
      result;

  let data = getEditData();

  if(!(data.name.empty && data.surname.empty && data.password.empty && data.phone.empty)) {
    if(!data.name.empty || !data.surname.empty || (!data.password.empty && data.password.success) || (!data.password.empty && data.phone.success)) {
      form = 'name=' + data.name.value + '&surname=' + data.surname.value + '&pass=' + data.password.value[0] + '&phone=' + data.phone.value;
      connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
      connect.onreadystatechange = function() {
        if(connect.readyState == 4 && connect.status == 200) {
          if(connect.responseText == 1) {
            result = '<div class="alert alert-success alert-dismissible fade show" role="alert" style="border-radius: 0;">';
            result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
            result += '<h4>Edición completada!</h4>';
            result += '<p><strong>Estás siendo redirigido...</strong></p>';
            result += '</div>';
            Func.$('#_AJAX_EDIT_').innerHTML = result;
            location.reload();
          } else {
            result = '<div class="alert alert-danger alert-dismissible fade show" role="alert" style="border-radius: 0;">';
            result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
            result += '<p><strong>ERROR: </strong>' + connect.responseText + '</p>';
            result += '</div>';
            Func.$('#_AJAX_EDIT_').innerHTML = result;
          }
        } else if(connect.readyState != 4) {
          result = '<div class="alert alert-warning alert-dismissible fade show" role="alert" style="border-radius: 0;">';
          result += '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
          result += '<h4>Processing...</h4>';
          result += '<p><strong>Tu solicitud esta siendo procesada...</strong></p>';
          result += '</div>';
          Func.$('#_AJAX_EDIT_').innerHTML = result;
        }
      }
      connect.open('POST','ajax.php?for=users&mode=edit',true);
      connect.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
{'fraction_non_alphanumeric': 0.19330855018587362, 'fraction_numerical': 0.0057827344072697235, 'mean_word_length': 3.04933110367893, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2738547', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1372, 'n_words': 264}