<commit_before>/*
 * request.js
 * ajax clearance request submit functions
 */
$(document).ready(function(e) {
  $('.register_submit').click(function(e) {
  if ($('#new_access_password').val() != $('#new_access_password_rp').val() ){
    $('#new_access_password_rp').parent().addClass('error');
    return alert('Password mismatch.\n两次密码输入不同。');
  }
  var $this = $('.register_submit');
  $this.button('loading');
    var request = {
      'id' : $('#new_access_id').val(),
      'code' : $('#new_access_password').val(),
      'email' : $('#new_access_email').val() 
    }
    if (request.id && request.code && request.email)
    {
      $.post('/idn/access/register', request, function(data){
        window.location.href = '/idn/access/register/success';
      }, 'json');
    } else {
    $this.button('reset');
      alert('Please fill in the forms correctly.\n请正确填写表单。');
    }
  });
});<commit_msg>fixed issue #2<commit_after>/*
 * request.js
 * ajax clearance request submit functions
 */
$(document).ready(function(e) {
  $('.register_submit').click(function(e) {
  if ($('#new_access_password').val() != $('#new_access_password_rp').val() ){
    $('#new_access_password_rp').parent().addClass('error');
    return alert('Password mismatch.\n两次密码输入不同。');
  }
  var $this = $('.register_submit');
  $this.button('loading');
    var request = {
      'id' : $('#new_access_id').val(),
      'code' : $('#new_access_password').val(),
      'email' : $('#new_access_email').val() 
    }
    if (request.id && request.code && request.email)
    {
      $.post('/idn/access/register', request, function(data){
        if (data.ok)
          window.location.href = '/idn/access/register/success';
        else {
          alert(data.err);
          $this.button('reset');
        }
      }, 'json');
    } else {
    $this.button('reset');
      alert('Please fill in the forms correctly.\n请正确填写表单。');
    }
  });
});
{'fraction_non_alphanumeric': 0.21313183949973943, 'fraction_numerical': 0.0005211047420531526, 'mean_word_length': 3.201312910284464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4473228', 'n_tokens_mistral': 630, 'n_tokens_neox': 635, 'n_words': 99}