Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting an election should have a confirmation prompt #45

Open
albanbruder opened this issue Aug 20, 2021 · 0 comments
Open

Deleting an election should have a confirmation prompt #45

albanbruder opened this issue Aug 20, 2021 · 0 comments

Comments

@albanbruder
Copy link
Contributor

Sorry for spamming you guys lately (:

I found that election admins in our organization (and me too) had the problem of accidentally clicking the "Destroy election" button when wanting to create the election. This is rather unfortunate when working with trustees. Because then the admin would have to ask all parties to again participate in setting up the election. Even worse: The same thing can happen if the election is already running and one clicks on the "Destroy election" button.

You might say the admin should be responsible and read the captions of what she/he is clicking at. But in reality most people don't or click faster then they read ;)

The solution could be as simple as:

<script>
function confirmDestroyElection(event) {
  var prompt = window.confirm("Do you really want to destroy this election?");
  if (!prompt) {
    event.preventDefault();
  }
}
</script>

<input value="Destroy election" type="submit" onclick="confirmDestroyElection">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants