From 4e9cf27394da2481a8ac81a2965873a3a16b136f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 11 Mar 2013 23:08:40 +0100 Subject: [ticket/9657] Remove softdelete reason field when permanent delete is selected PHPBB3-9657 --- phpBB/assets/javascript/core.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'phpBB/assets/javascript') diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 40da09377e..7a4aceee0b 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -317,6 +317,18 @@ phpbb.ajaxify = function(options) { }); } }, false); + + // Add the click function to the code we just laoded. + // Should be removed and replace with a call to .on() + // when jQuery is updated to 1.7.x or higher + // $(document).on('click', '#delete_permanent', function () {}); + $('#delete_permanent').click(function () { + if ($(this).attr('checked')) { + $('#delete_reason').hide(); + } else { + $('#delete_reason').show(); + } + }); } } -- cgit v1.2.1