-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add CC/BCC fields for Sensei emails #7014
Conversation
@merkushin Did you mean to add a reviewer to this or does it still need some work? |
@donnapep oops, looks like I forgot to add reviewers🤦🏻♂️ |
includes/class-sensei-settings.php
Outdated
$fields['email_cc'] = array( | ||
'name' => __( 'CC', 'sensei-lms' ), | ||
'description' => __( 'Enter email addresses to CC on all emails. Separate multiple email addresses with commas.', 'sensei-lms' ), | ||
'type' => 'email_list', |
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.
If we make the type email
and add the multiple
attribute, it should work with multiple email addresses.
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.
Hum, I'll try it. But I think that produces multiple fields, doesn't it?
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.
I found what you meant. Trying to use it.
I think it works only for a single email in the field. That's the browser validation that comes with the email input type. It is good to have it, but we should have a counterpart on the backend. Anyway, I'll try it with #7014 (comment) |
Codecov Report
@@ Coverage Diff @@
## trunk #7014 +/- ##
============================================
+ Coverage 48.07% 49.15% +1.07%
- Complexity 10467 10470 +3
============================================
Files 573 573
Lines 44164 44218 +54
Branches 402 402
============================================
+ Hits 21234 21736 +502
+ Misses 22603 22155 -448
Partials 327 327
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@donnapep I updated the PR. |
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.
Looks good and tests well. 👍
Just curious, does it make sense to have tests for these fields? |
Thanks @m1r0. Added tests. |
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.
Thank you! 🙇
Resolves #7001
In this PR:
Proposed Changes
Testing Instructions
Deprecated Code
Sensei\Internal\Emails\Email_Settings_Tab::add_reply_to_setting
– adding of these settings moved to \Sensei_Settings.Pre-Merge Checklist