From d2a03f4910827d746aa2219b0a6d8f8ec5157fc9 Mon Sep 17 00:00:00 2001 From: Jason Munro Date: Wed, 10 Oct 2018 18:39:39 -0500 Subject: [PATCH] don't show the apply button for pgp if no keys are setup --- modules/pgp/site.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/pgp/site.js b/modules/pgp/site.js index 9b4b4e2f43..1eccaa2c15 100644 --- a/modules/pgp/site.js +++ b/modules/pgp/site.js @@ -314,7 +314,9 @@ var Hm_Pgp = { $(function() { if (hm_page_name() == 'compose') { - Hm_Pgp.load_private_keys(); + if (($('#pgp_encrypt option').size() + $('#pgp_sign option').size()) == 0) { + $('.pgp_section').hide(); + } $('.pgp_apply').click(function() { Hm_Pgp.process_settings(); return false; }); } else if (hm_page_name() == 'message') {