Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2586)

Unified Diff: chrome/browser/resources/feedback/js/feedback.js

Issue 2728773003: Make email field in Feedback app uneditable (Closed)
Patch Set: Nits Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/feedback/html/default.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/feedback/js/feedback.js
diff --git a/chrome/browser/resources/feedback/js/feedback.js b/chrome/browser/resources/feedback/js/feedback.js
index 6d06cc7b812bf8418dbb35989fc5dd0e1e8bafd4..e30e61deed10a367c21c35dec06f117932cf5480 100644
--- a/chrome/browser/resources/feedback/js/feedback.js
+++ b/chrome/browser/resources/feedback/js/feedback.js
@@ -166,7 +166,9 @@ function sendReport() {
feedbackInfo.description = $('description-text').value;
feedbackInfo.pageUrl = $('page-url-text').value;
- feedbackInfo.email = $('user-email-text').value;
+ feedbackInfo.email =
+ $('user-email-drop-down').options[
xiyuan 2017/03/02 19:23:33 feedbackInfo.email = $('user-email-drop-down').val
afakhry 2017/03/02 19:56:05 Oh, I didn't know we could do that! Done.
+ $('user-email-drop-down').selectedIndex].value;
var useSystemInfo = false;
var useHistograms = false;
@@ -344,7 +346,13 @@ function initialize() {
});
chrome.feedbackPrivate.getUserEmail(function(email) {
- $('user-email-text').value = email;
+ var optionElement = document.createElement('option');
+ optionElement.value = email;
+ optionElement.text = email;
+ optionElement.selected = true;
+ // Make sure the "Report anonymously" option comes last.
+ $('user-email-drop-down').insertBefore(
+ optionElement, $('user-email-drop-down').firstChild);
xiyuan 2017/03/02 19:23:33 oops, did not realized that $('user-email-drop-dow
afakhry 2017/03/02 19:56:05 Using the $('anonymous-user-option') instead.
});
// Initiate getting the system info.
« no previous file with comments | « chrome/browser/resources/feedback/html/default.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698