Fix quick memo share BTN (#38121)

This commit is contained in:
John BOTELLA 2026-05-07 23:35:21 +02:00 committed by GitHub
parent 5e1b3c1682
commit e1ae5f5e58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -1660,6 +1660,10 @@ class Memo extends CommonObject
];
$jsConfVars = array_merge($defaultJsConfVars, $jsConfVars);
if (!empty($jsConfVars['elementType'])) {
$jsConfVars['shareBtnStatus'] = 1;
}
// LOAD Memo class
print '<link rel="stylesheet" type="text/css" href="'.dol_buildpath('quickmemo/css/memo.css', 1) . '">'."\n";
print '<link rel="stylesheet" type="text/css" href="'.dol_buildpath('quickmemo/css/memo-dialog.css', 1) . '">'."\n";

View file

@ -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);
}