summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 21:46:30 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 21:46:30 +0000
commitdfafce7d75ed2bdace26602ed5b8f3e4f4ab86b6 (patch)
tree1743e01d9505d6c693bc9acebf69ef4b9484c4f6
parentf50cfce4449c12df27b68e670a0a8c47019384e6 (diff)
downloadchromium_src-dfafce7d75ed2bdace26602ed5b8f3e4f4ab86b6.zip
chromium_src-dfafce7d75ed2bdace26602ed5b8f3e4f4ab86b6.tar.gz
chromium_src-dfafce7d75ed2bdace26602ed5b8f3e4f4ab86b6.tar.bz2
Merge 85193 - Sync: Disable the input elements of the 'Customize Sync Preferences' screen
once the user has confirmed the preferences. BUG=82376 TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/7015030 TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/7012022 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@85194 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/options/sync_setup_overlay.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/resources/options/sync_setup_overlay.js b/chrome/browser/resources/options/sync_setup_overlay.js
index 46901c3..b68ce1a 100644
--- a/chrome/browser/resources/options/sync_setup_overlay.js
+++ b/chrome/browser/resources/options/sync_setup_overlay.js
@@ -241,6 +241,10 @@ cr.define('options', function() {
if (!this.checkPassphraseMatch_())
return;
+ // Don't allow the user to tweak the settings once we send the
+ // configuration to the backend.
+ this.disableConfigureElements_();
+
var syncAll =
document.getElementById('sync-select-datatypes').selectedIndex == 0;
var customPassphrase = $('custom-passphrase');
@@ -264,6 +268,19 @@ cr.define('options', function() {
chrome.send("Configure", [result]);
},
+ /**
+ * Disables all input elements within the 'Customize Sync Preferences'
+ * screen. This is used to prohibit the user from changing the inputs after
+ * confirming the customized sync preferences.
+ * @private
+ */
+ disableConfigureElements_: function() {
+ var configureElements =
+ $('customize-sync-preferences').querySelectorAll('input');
+ for (var i = 0; i < configureElements.length; i++)
+ configureElements[i].disabled = true;
+ },
+
setChooseDataTypesCheckboxes_: function(args) {
// If this frame is on top, the focus should be on it, so pressing enter
// submits this form.