$$(document).on('page:init', '.page[data-name="password_change"]', function(e) {

  $(document).off("click", "#password_change").on("click", "#password_change_button", function(e) {

  e.preventDefault();

  console.log('app password_change ready')

  let user=get_localstorage('member');

  let dt=user.data;

    var password = $("#password22").val();

    var newpassword = $("#newpassword22").val();

    var confirmPwd = $("#confirmpassword22").val();

    let uid=dt.id;

    let req = {

      uid,

      password,

      newpassword

    }

    if (!password) {

      app.dialog.alert("Password are required", "Errors");

      return

    }    

    if (!newpassword) {

      app.dialog.alert("New Password are required", "Errors");

      return

    }    

    if (!confirmPwd) {

      app.dialog.alert("Confirm New Password are required", "Errors");

      return

    }    

    if(newpassword!=confirmPwd) {

      app.dialog.alert("New Password & Confirm New Password not match", "Errors");

      return      

    }

    password_change(req);

  });

})