From 96c614550f57b2c9eaf4d029761a294ee457fb31 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Tue, 7 Nov 2023 18:09:24 +0100 Subject: [PATCH] WebClient: remove inline style from HTML elements Signed-off-by: Nicola Murino --- templates/common/base.html | 4 ++++ templates/webclient/mfa.html | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/common/base.html b/templates/common/base.html index b9d7a6c8..bd8528eb 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -141,6 +141,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). .wrap-word { overflow-wrap: break-word; } + + .line-through { + text-decoration: line-through; + } {{- end}} diff --git a/templates/webclient/mfa.html b/templates/webclient/mfa.html index 7c6e7441..cfafe909 100644 --- a/templates/webclient/mfa.html +++ b/templates/webclient/mfa.html @@ -366,11 +366,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). recList.empty(); $.each(response.data, function(key, item) { itemCode = escapeHTML(item.code); - let style = ""; + let txtStyleClass = ""; if (item.used) { - style = `style="text-decoration: line-through;"`; + txtStyleClass = "line-through"; } - recList.append(`
  • ${itemCode}
  • `); + recList.append(`
  • ${itemCode}
  • `); }); recCodesModal.show(); }).catch(function (error){