From e420d92f6c1a85af82f050a6ff845b879c91e9f2 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 17 Jun 2020 14:09:02 -0700 Subject: [PATCH] Add more docstring to button_with_confirm data-onclick parameter. --- frontends/ycdl_flask/static/js/common.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontends/ycdl_flask/static/js/common.js b/frontends/ycdl_flask/static/js/common.js index 89e0e00..0b32e21 100644 --- a/frontends/ycdl_flask/static/js/common.js +++ b/frontends/ycdl_flask/static/js/common.js @@ -168,6 +168,10 @@ function init_button_with_confirm() Required: data-onclick: String that would normally be the button's onclick. + This is done so that if the button_with_confirm fails to initialize, + the button will be non-operational as opposed to being operational + but with no confirmation. For dangerous actions I think this is a + worthwhile move though it could lead to feature downtime. Optional: data-prompt: Text that appears next to the confirm button. Default is