Prettied up UI for password resets. Now to move on to email component.
This commit is contained in:
parent
ed698f40c7
commit
3671b43789
5 changed files with 51 additions and 18 deletions
|
|
@ -169,6 +169,7 @@ class canopyUXUtils{
|
|||
}
|
||||
|
||||
remove(){
|
||||
this.tooltip.dispatchEvent(new Event("close"));
|
||||
this.tooltip.remove();
|
||||
}
|
||||
}
|
||||
|
|
@ -259,6 +260,8 @@ class canopyUXUtils{
|
|||
}
|
||||
|
||||
closePopup(){
|
||||
this.popupDiv.dispatchEvent(new Event("close"));
|
||||
|
||||
//Take out the popup
|
||||
this.popupDiv.remove();
|
||||
|
||||
|
|
@ -487,8 +490,13 @@ class canopyAjaxUtils{
|
|||
body: JSON.stringify({token, pass, confirmPass, verification})
|
||||
});
|
||||
|
||||
//If we received a successful response
|
||||
if(response.status == 200){
|
||||
return await response.json();
|
||||
//Create pop-up
|
||||
const popup = new canopyUXUtils.popup("Your password has been reset!");
|
||||
//Go to home-page on pop-up closure
|
||||
popup.popupDiv.addEventListener("close", ()=>{window.location = '/'});
|
||||
//Otherwise
|
||||
}else{
|
||||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue