From e1ae5f5e58334a622b4950fb557a0d79e0be793d Mon Sep 17 00:00:00 2001
From: John BOTELLA <68917336+thersane-john@users.noreply.github.com>
Date: Thu, 7 May 2026 23:35:21 +0200
Subject: [PATCH] Fix quick memo share BTN (#38121)
---
htdocs/quickmemo/class/memo.class.php | 4 ++++
htdocs/quickmemo/js/QuickMemo.js | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/htdocs/quickmemo/class/memo.class.php b/htdocs/quickmemo/class/memo.class.php
index 5a318c874ac..1ab97a9c1fa 100644
--- a/htdocs/quickmemo/class/memo.class.php
+++ b/htdocs/quickmemo/class/memo.class.php
@@ -1660,6 +1660,10 @@ class Memo extends CommonObject
];
$jsConfVars = array_merge($defaultJsConfVars, $jsConfVars);
+ if (!empty($jsConfVars['elementType'])) {
+ $jsConfVars['shareBtnStatus'] = 1;
+ }
+
// LOAD Memo class
print ''."\n";
print ''."\n";
diff --git a/htdocs/quickmemo/js/QuickMemo.js b/htdocs/quickmemo/js/QuickMemo.js
index 8a55fcfc902..ccd44385ec1 100644
--- a/htdocs/quickmemo/js/QuickMemo.js
+++ b/htdocs/quickmemo/js/QuickMemo.js
@@ -24,6 +24,7 @@ class QuickMemo {
elementType: '',
context: '',
token: '',
+ shareBtnStatus: 0,
colors: ['#fff8a6', '#ffd6d6', '#d6ffd9', '#d6e6ff', '#f3d6ff', '#ffffff', '#f5f5f5'],
publicFontAIcon: 'far fa-eye',
privateFontAIcon: 'far fa-eye-slash',
@@ -522,7 +523,9 @@ class QuickMemo {
// Append buttons based on permissions
if (this.param.userWriteRight) {
actions.appendChild(btnPrivate);
- actions.appendChild(btnShare);
+ if(this.param.shareBtnStatus > 0) {
+ actions.appendChild(btnShare);
+ }
actions.appendChild(colorInput);
actions.appendChild(btnCreateModel);
}