Chromium Code Reviews| Index: remoting/webapp/crd/js/host_setup_dialog.js |
| diff --git a/remoting/webapp/crd/js/host_setup_dialog.js b/remoting/webapp/crd/js/host_setup_dialog.js |
| index 24097a19e6d528315043051623228f0c889ad201..969e33143dbb7fa436a7ef4edd353e64c16bf2d9 100644 |
| --- a/remoting/webapp/crd/js/host_setup_dialog.js |
| +++ b/remoting/webapp/crd/js/host_setup_dialog.js |
| @@ -190,9 +190,19 @@ remoting.HostSetupDialog.prototype.showForStartWithToken_ = |
| * by policy. |
| */ |
| function onGetConsent(supported, allowed, set_by_policy) { |
| - that.usageStats_.hidden = !supported; |
| + // Hide the usage stats check box if it is not supported or the policy |
| + // doesn't allow usage stats collection. |
| + that.usageStats_.hidden = !supported || (set_by_policy && !allowed); |
| that.usageStatsCheckbox_.checked = allowed; |
| - that.usageStatsCheckbox_.disabled = set_by_policy; |
| + |
| + if (set_by_policy) { |
| + that.usageStatsCheckbox_.disabled = true; |
| + that.usageStatsCheckbox_.title = l10n.getTranslationOrError( |
|
Jamie
2015/02/06 02:22:02
Do the disables and title attributes apply to both
kelvinp
2015/02/06 19:50:21
Done.
|
| + /*i18n-content*/ 'SETTING_MANAGED_BY_POLICY'); |
| + } else { |
| + that.usageStatsCheckbox_.disabled = false; |
| + that.usageStatsCheckbox_.title = ''; |
| + } |
| } |
| /** @param {remoting.Error} error */ |