l1dge / techswap

Repo for the techswap project
2 stars 0 forks source link

Show a warning popup before emptying a wish list because it's a destructive action #51

Closed bbelderbos closed 3 years ago

bbelderbos commented 3 years ago

Example from our platform:

HTML

<button name="deleteBite" class="mui-btn mui-btn--raised mui-btn--danger deleteBite" Onclick="return WarningUndoIvBite();">Delete Bite</button>

JS

function WarningUndoIvBite(){
  if(confirm("Sure you want to delete? This will delete all associated code submissions and cannot be undone!")){
    return true;
  } else {
    return false;
  }
}
l1dge commented 3 years ago

Done