LP1164674 - OPAC - Too easy to delete a list
authorKyle Tomita <ktomita@catalystitservices.com>
Fri, 24 May 2013 18:52:49 +0000 (11:52 -0700)
committerDan Wells <dbw2@calvin.edu>
Mon, 16 Sep 2013 20:44:47 +0000 (16:44 -0400)
Added an onClick action to prompt for confirmation before
deleting a list.

Signed-off-by: Kyle Tomita <ktomita@catalystitservices.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/opac/myopac/lists.tt2

index 392a528..8672c6e 100644 (file)
                     <input type="hidden" name="list" value="[% bbag.id %]" />
                     <input type="hidden" name="action" value="delete" />
                     [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
-                    <input type="submit" value="[% l('Delete List') %]" />
+                    <input type="submit" value="[% l('Delete List') %]"
+                        onClick="if(confirm('[% l('Do you really want to delete this list?') %]')) return true; return false"
+                    />
                 </div>
             </form>
             <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">