<commit_before>horizon.user = {

  init: function() {
    $("#id_password").change(function () {
      if ($("#id_confirm_password").val() !== "") {
        horizon.user.check_passwords_match();
      }
    });

    $("#id_confirm_password").change(function () {
      horizon.user.check_passwords_match();
    });
  },

  check_passwords_match: function() {
    var row = $("label[for='id_confirm_password']");
    var error_id = "id_confirm_password_error";
    var msg = "<span id='" + error_id + "' class='help-block'>" + gettext("Passwords do not match.") + "</span>";

    var password = <PASSWORD>").val();
    var confirm_password = <PASSWORD>").<PASSWORD>();

    if (password !== confirm_password && $("#" + error_id).length === 0) {
      $(row).parent().addClass("error");
      $(row).after(msg);
    } else if (password === <PASSWORD>_password) {
      $(row).parent().removeClass("error");
      $("#" + error_id).remove();
    }
  }
};
<commit_msg>Adds styling of "Confirm Password" Field in user forms<commit_after>horizon.user = {

  init: function() {
    $("#id_password").change(function () {
      if ($("#id_confirm_password").val() !== "") {
        horizon.user.check_passwords_match();
      }
    });

    $("#id_confirm_password").change(function () {
      horizon.user.check_passwords_match();
    });
  },

  check_passwords_match: function() {
    var row = $("input#id_confirm_password");
    var error_id = "id_confirm_password_error";
    var msg = "<span id='" + error_id + "' class='help-block alert alert-danger'>" + gettext("Passwords do not match.") + "</span>";

    var password = <PASSWORD>").val();
    var confirm_password = $("#<PASSWORD>").val();

    if (password !== <PASSWORD>_password && $("#" + error_id).length === 0) {
      $(row).parent().addClass("has-error");
      $(row).after(msg);
    } else if (password === <PASSWORD>_password) {
      $(row).parent().removeClass("has-error");
      $("#" + error_id).remove();
    }
  }
};


{'fraction_non_alphanumeric': 0.21457286432160805, 'fraction_numerical': 0.0010050251256281408, 'mean_word_length': 3.4342984409799553, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '3619360', 'n_tokens_mistral': 637, 'n_tokens_neox': 632, 'n_words': 104}