Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image in notes during creation #11013

Closed
wants to merge 3 commits into from

Conversation

atm-greg
Copy link
Contributor

Fix Image in notes during creation

Add ability to search on server for image to add it in notes during creation of an object like in note tab (edition mode)

@eldy eldy added PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) and removed PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) labels Apr 16, 2019
@@ -1628,7 +1628,7 @@
print '<td class="tdtop">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top">';
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null));
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
Copy link
Member

@eldy eldy Apr 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public note is often rendered outside the backoffice and logged context. For example, into PDF or ODT documents.
For this reason, we should not add images where link is valid only inside a logged backoffice session.
This is why the "local explorer" is disabled for notes. The bug seems to be into the page to edit "notes" where local explorer is enabled (and should not).
I think a better fix is to disable it also in the generic page to edit notes. So there is a consistency in behaviour and no features that lead to bugs with a common use.
Note: We can introduce a hidden option to enable the local browser for notes, but it should be enabled in both create and edit and must be kept as hidden option because common end users can't understand why they can add an image that is not a public url and having it visible sometimes and not visible the other times.

@eldy eldy added the PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) label Apr 16, 2019
@eldy eldy closed this in f0bb928 Apr 24, 2019
eldy added a commit that referenced this pull request Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants