0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.144.255.247


Current Path : /var/www/oasis/js/
Upload File :
Current File : /var/www/oasis/js/pwschange.js

function callEnableChangePassword() {
  $("#page_main_div").load("../html_modules/pwschange.html", function () {
    document.getElementById("display_module_name").innerHTML =
      "Change Password";
    document.getElementById("module_name_for_save").value = "Change Password";
    getDefaultHeadFooterLinks("Change Password New");
  });
}

function saveNewPws() {
  let opws = $("#opws").val();
  let pws = $("#pws").val();
  let fpws1 = $("#fpws1").val();

  if (opws == "") {
    alert("Enter Old Password");
    $("#opws").focus();
    return;
  }

  if (pws == "") {
    alert("Enter Password");
    $("#pws").focus();
    return;
  }

  if (pws != fpws1) {
    alert("Password and Confirm Password not Matching");
    $("#pws").focus();
    return;
  }

  $.ajax({
    type: "GET",
    url: $host_url + "saveNewPws",
    data: "opws=" + opws + "&pws=" + pws,
    success: function ($responce) {
      $responce = eval("(" + $responce + ")");
      if ($responce.error_code == 0) {
        logout();
        return;
      } else {
        alert($responce.data);
        return;
      }
    },
  });
}