-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Share personal cleanup + note #29935
Conversation
Code looks good so far. We talked about injecting the default template in there. I'll try exposing this somehow from the backend. |
|
pushed: server now uses the specified message. If empty, it falls back to the default template. Note that when specified it's a plain text email and it strips away the tags with Next up: find a way to pass original template back for use in the dialog, in a way that clients could also reuse... |
It looks like this would need a new API endpoint. Considering that we want clients to be able to use this email feature too, we'd likely need to add a new public endpoint, maybe an extension of the existing OCS Share API. And if we need to do this, we might as well move the current emailing code (the sending part) to said endpoint as well. So the endpoint would have two functions:
|
I suggest merging this PR as is, maybe tweak the current message and work on the email endpoint separately, as I have the feeling this will take longer due to API design decisions needing to be made. @pmaier1 thoughts ? |
Raised #29937 for exposing template. |
@felixheidecke can you add ? I can adjust the backend then |
Yes, when the stuff in here #29694 is covered and this is tested we should merge. I would be also very happy if you could provide a patch for this PR then. |
Codecov Report
@@ Coverage Diff @@
## master #29935 +/- ##
============================================
- Coverage 60.87% 60.85% -0.02%
- Complexity 18568 18577 +9
============================================
Files 1093 1093
Lines 61325 61361 +36
============================================
+ Hits 37333 37343 +10
- Misses 23992 24018 +26
Continue to review full report at Codecov.
|
Fixes #29696
|
c4815b1
to
8371b1a
Compare
|
bcc to self or cc ? @pmaier1 bcc might be a better idea here |
rebase needed because of conflicts ..... |
core/ajax/share.php
Outdated
$emailBody = trim((string)$_POST['emailBody']); | ||
} | ||
|
||
$l10n = \OC::$server->getL10N('lib'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why lib? this file lives in core - did this ever work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PVince81 yours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this never worked... I just moved up the getL10N call from below.
Considering that emails are usually be taken from the mail template, I don't think the template is translated.
Needs separate testing.
@@ -24,7 +33,7 @@ | |||
clear: both; | |||
} | |||
|
|||
.hidden { | |||
.hidden.hidden { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate hidden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This a lesser version of the !important
statement;
core/js/sharedialogmailview.js
Outdated
action : 'email', | ||
toAddress : mail.to, | ||
emailBody : mail.body, | ||
bccSelf : mail.bccSelf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
@PVince81 pls help with conflicts in |
Rebase error? |
d32ecfd
to
c44a0e2
Compare
Never 😇 … 👅 |
Reduce length of date field for external link Change button text 'Save' to 'Share' Change mail error text Add send confirmation after sending notification defer link creation upon failing email notification Modify UI tests for Public Link dialog Share button Show button text "share" if creating a new share Add message field to share modal Send custom link share mail notification when specified Add email to OC.getCurrentUser() Add bccToSelf checkbox for linkshare Add bcc to self for public link share Add method description Spaces to tabs Rework confusing shorthand code Correctly check bcc post Move email attribute to oc_user attribute Disable autocomplete on email input Bring back OC.currentUser for legacy code... Fix faulty autocomplete Make dialog css more readable Propperly test $options in MailNotification Fix currentUser related tests Fix the fix Add new tests for bcc functionality, remove legacy autocomplete test
c44a0e2
to
1916d25
Compare
@felixheidecke did it work our with the JS test ? |
Sure did. The test had to fail since it tested a feature that was scaped. I should have guessed that :-P |
@felixheidecke please backport to stable10 |
regression: #30557 |
stable10: #30486 |
#29935 (comment) is fixed in 10.0.8RC2. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Related Issue
Replaces (because contains): #29721
Fixes: #29694
How Has This Been Tested?
Visual tests in latest Chrome & Firefox
Screenshots (if appropriate):
Types of changes
Checklist: