<commit_before>// ELMO.SmsTestConsole
//
// Handles sending and displaying test SMS requests.
(function(ns, klass) {

  // constructor
  ns.SmsTestConsole = klass = function() { var self = this;
    self.form = $("form#new_sms_test");

    // attach to the form submit event
    self.form.on("submit", function(){ self.submit(); return false; })
  }
  
  klass.prototype.submit = function() { var self = this;
    $("form#new_sms_test .loading_indicator img").show();
    
    $.ajax({
      type: 'POST',
      url: self.form.attr("action"),
      data: self.form.serialize(),
      success: function(data) {
        $(".sms_test_result").html(data);
      },
      error: function() {
        $(".sms_test_result").html("<em>There was an error submitting your test.</em>");
      },
      complete: function() {
        // hide the loading indicator
        $("form#new_sms_test .loading_indicator img").hide();
        
        // show the header
        $(".sms_tests_new h2").show();
      }
    })
  }
  
})(ELMO);<commit_msg>fixed sms console to boot to login page<commit_after>// ELMO.SmsTestConsole
//
// Handles sending and displaying test SMS requests.
(function(ns, klass) {

  // constructor
  ns.SmsTestConsole = klass = function() { var self = this;
    self.form = $("form#new_sms_test");

    // attach to the form submit event
    self.form.on("submit", function(){ self.submit(); return false; })
  }
  
  klass.prototype.submit = function() { var self = this;
    $("form#new_sms_test .loading_indicator img").show();
    
    Utils.ajax_with_session_timeout_check({
      type: 'POST',
      url: self.form.attr("action"),
      data: self.form.serialize(),
      success: function(data) {
        $(".sms_test_result").html(data);
      },
      error: function() {
        $(".sms_test_result").html("<em>There was an error submitting your test.</em>");
      },
      complete: function() {
        // hide the loading indicator
        $("form#new_sms_test .loading_indicator img").hide();
        
        // show the header
        $(".sms_tests_new h2").show();
      }
    })
  }
  
})(ELMO);
{'fraction_non_alphanumeric': 0.16265912305516267, 'fraction_numerical': 0.000942951438000943, 'mean_word_length': 2.548494983277592, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6945277', 'n_tokens_mistral': 675, 'n_tokens_neox': 667, 'n_words': 152}