-
Notifications
You must be signed in to change notification settings - Fork 224
Intent to ship email fixes #747 #1147
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
Merged
jaredlockhart
merged 13 commits into
mozilla:master
from
glasserc:747-intent-to-ship-email
Apr 15, 2019
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5af90c7
Intent to Ship Email
peterbe e557485
Intent to Ship Email
peterbe b751a06
Clean up email and code
glasserc 02b48c4
Help text should not be inside the label
glasserc 8b0b8f5
Add API to send intent-to-ship email
glasserc fad8c74
Add front-end interface to send email
glasserc 1c3a4b4
experiment_url should already include the protocol
glasserc a9f2c0d
Move prefetch of locales and countries to models
glasserc 5410536
Show button only if email has not been sent
glasserc 24df88f
Just refresh the page rather than doing anything fancy
glasserc 8ab8bdf
Fix test coverage
glasserc 4e7a760
Send email to release drivers and experiment owner
glasserc 81e4536
Add setting to test configuration
glasserc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // Hook up intent-to-ship email | ||
| jQuery(function($) { | ||
| let sendUrl; | ||
| $("button.send-intent-to-ship").on("click", function(e) { | ||
| sendUrl = this.dataset.url; | ||
| // Let Bootstrap handle showing the modal itself | ||
| }); | ||
|
|
||
| const modal = $("#send-intent-to-ship-modal"); | ||
|
|
||
| modal.find("button.send").on("click", async function(e) { | ||
| this.innerHTML = "Sending..."; | ||
| this.disabled = true; | ||
| const resp = await fetch(sendUrl, { | ||
|
jaredlockhart marked this conversation as resolved.
|
||
| method: "PUT", | ||
| }); | ||
| if (resp.status == 200) { | ||
| // Rather than trying to update the DOM to match the new state, | ||
| // just refresh the page. | ||
| location.reload(); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| } else { | ||
| modal.find(".sending-failed").toggleClass("d-none"); | ||
| } | ||
| }); | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.