diff --git a/public/js/index.js b/public/js/index.js index 1e795a504..8b3d7c3d7 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 749e42af2..7d23e51c8 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -17,7 +17,7 @@ -