From a336d5232d6b66de378bd707d0d2dee49d18af38 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 10 Jun 2020 12:24:27 +0200 Subject: [PATCH] Follow up - 2ffca390a967a962d03794c6ffac2e5e2946f2ff - Fixes #1961 - S/MIME integration: Encryption and Sign buttons can be clicked even if disabled. --- .../javascripts/app/lib/mixins/security_options.coffee | 4 ++-- .../javascripts/app/views/agent_ticket_create.jst.eco | 10 +++++++--- .../app/views/ticket_zoom/article_new.jst.eco | 8 ++++++-- app/assets/stylesheets/zammad.scss | 2 ++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/app/lib/mixins/security_options.coffee b/app/assets/javascripts/app/lib/mixins/security_options.coffee index 47348cd9a..7848c4dd3 100644 --- a/app/assets/javascripts/app/lib/mixins/security_options.coffee +++ b/app/assets/javascripts/app/lib/mixins/security_options.coffee @@ -48,7 +48,7 @@ App.SecurityOptions = if smimeConfig.group_id[type][ticket.group_id.toString()] == false selected[selector] = false - @$('.js-securityEncrypt').attr('title', data.encryption.comment) + @$('.js-securityEncryptComment').attr('title', data.encryption.comment) # if encryption is possible if data.encryption.success is true @@ -65,7 +65,7 @@ App.SecurityOptions = @$('.js-securityEncrypt').attr('disabled', true) @$('.js-securityEncrypt').removeClass('btn--active') - @$('.js-securitySign').attr('title', data.sign.comment) + @$('.js-securitySignComment').attr('title', data.sign.comment) # if sign is possible if data.sign.success is true diff --git a/app/assets/javascripts/app/views/agent_ticket_create.jst.eco b/app/assets/javascripts/app/views/agent_ticket_create.jst.eco index fef02088e..9294ff190 100644 --- a/app/assets/javascripts/app/views/agent_ticket_create.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_create.jst.eco @@ -33,8 +33,12 @@
-
<%- @Icon('lock-open', 'btn-inactive-icon') %><%- @Icon('lock', 'btn-active-icon') %><%- @T('Encrypt') %>
-
<%- @Icon('not-signed', 'btn-inactive-icon') %><%- @Icon('signed', 'btn-active-icon') %><%- @T('Sign') %>
+ +
<%- @Icon('lock-open', 'btn-inactive-icon') %><%- @Icon('lock', 'btn-active-icon') %><%- @T('Encrypt') %>
+
+ +
<%- @Icon('not-signed', 'btn-inactive-icon') %><%- @Icon('signed', 'btn-active-icon') %><%- @T('Sign') %>
+
@@ -175,4 +179,4 @@
---> \ No newline at end of file +--> diff --git a/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco index d5ddcd324..4a3265ca5 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/article_new.jst.eco @@ -61,8 +61,12 @@
-
<%- @Icon('lock-open', 'btn-inactive-icon') %><%- @Icon('lock', 'btn-active-icon') %><%- @T('Encrypt') %>
-
<%- @Icon('not-signed', 'btn-inactive-icon') %><%- @Icon('signed', 'btn-active-icon') %><%- @T('Sign') %>
+ +
<%- @Icon('lock-open', 'btn-inactive-icon') %><%- @Icon('lock', 'btn-active-icon') %><%- @T('Encrypt') %>
+
+ +
<%- @Icon('not-signed', 'btn-inactive-icon') %><%- @Icon('signed', 'btn-active-icon') %><%- @T('Sign') %>
+
diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 6ec75f7a7..a3416982c 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -155,6 +155,7 @@ a { &.is-disabled, &[disabled] { + pointer-events: none; cursor: not-allowed !important; opacity: .33; } @@ -442,6 +443,7 @@ pre code.hljs { &.is-disabled, &[disabled], &:disabled { + pointer-events: none; cursor: not-allowed; opacity: .33; }