account.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. let account = {
  2. display: function(){
  3. document.getElementById("accountStrandTitle").innerText = merchant.name;
  4. document.getElementById("accountEmail").placeholder = merchant.email;
  5. document.getElementById("accountUpdate").onclick = ()=>{this.updateData()};
  6. let passButton = document.getElementById("accountShowPassword");
  7. let passBox = document.getElementById("changePasswordBox");
  8. passButton.onclick = ()=>{
  9. passButton.style.display = "none";
  10. passBox.style.display = "flex";
  11. };
  12. document.getElementById("cancelPasswordChange").onclick = ()=>{
  13. passButton.style.display = "block";
  14. passBox.style.display = "none";
  15. document.getElementById("accountCurrentPassword").value = "";
  16. document.getElementById("accountNewPassword").value = "";
  17. document.getElementById("accountConfirmPassword").value = "";
  18. };
  19. document.getElementById("changePasswordButton").onclick = ()=>{this.updatePassword()};
  20. },
  21. updateData: function(){
  22. console.log("updating data");
  23. },
  24. updatePassword: function(){
  25. console.log("updating password");
  26. }
  27. }
  28. module.exports = account;