diff --git a/public/js/index.js b/public/js/index.js index 1e795a5044..8b3d7c3d7d 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1663,8 +1663,11 @@ function selectRange($list, $select, $from) { } $(function () { - if ($('.user.signin').length > 0) return; - $('form').areYouSure(); + // Warn users that try to leave a page after entering data into a form. + // Except on sign-in pages, and for forms marked as 'ignore-dirty'. + if ($('.user.signin').length === 0) { + $('form:not(.ignore-dirty)').areYouSure(); + } // Parse SSH Key $("#ssh-key-content").on('change paste keyup',function(){ diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 749e42af2d..7d23e51c89 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -17,7 +17,7 @@ -