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

Unified Diff: chrome/browser/resources/settings/date_time_page/date_time_page.html

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Rebased. Created 3 years, 7 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
Index: chrome/browser/resources/settings/date_time_page/date_time_page.html
diff --git a/chrome/browser/resources/settings/date_time_page/date_time_page.html b/chrome/browser/resources/settings/date_time_page/date_time_page.html
index b40d20261b9f4aa10d5b2a4b0cf4f72957b32630..6ec041a7a1dd727991ce53877259edf40456f056 100644
--- a/chrome/browser/resources/settings/date_time_page/date_time_page.html
+++ b/chrome/browser/resources/settings/date_time_page/date_time_page.html
@@ -35,25 +35,57 @@
<div id="timezoneGeolocateToggleLabel" class="start">
$i18n{timeZoneGeolocation}
</div>
- <template is="dom-if" if="[[hasTimeZoneAutoDetectPolicy_]]" restamp>
- <cr-policy-indicator indicator-type="devicePolicy"
- icon-aria-label="$i18n{timeZoneGeolocation}">
- </cr-policy-indicator>
+ <template is="dom-if" if="[[!perUserTimezoneEnabled_]]" restamp>
+ <template is="dom-if" if="[[hasTimeZoneAutoDetectPolicy_]]" restamp>
+ <cr-policy-indicator indicator-type="devicePolicy"
+ icon-aria-label="$i18n{timeZoneGeolocation}">
+ </cr-policy-indicator>
+ </template>
+ <paper-toggle-button
+ id="timeZoneAutoDetect"
+ aria-labelledby="timezoneGeolocateToggleLabel"
+ checked="[[timeZoneAutoDetect_]]"
+ disabled="[[hasTimeZoneAutoDetectPolicy_]]"
+ on-change="onTimeZoneAutoDetectChange_">
+ </paper-toggle-button>
+ </template>
+ <template is="dom-if" if="[[perUserTimezoneEnabled_]]" restamp>
+ <settings-toggle-button
+ pref="{{prefs.settings.resolve_timezone_by_geolocation}}"
+ id="timeZoneAutoDetect"
+ aria-labelledby="timezoneGeolocateToggleLabel">
+ </settings-toggle-button>
</template>
- <paper-toggle-button
- id="timeZoneAutoDetect"
- aria-labelledby="timezoneGeolocateToggleLabel"
- checked="[[timeZoneAutoDetect_]]"
- disabled="[[hasTimeZoneAutoDetectPolicy_]]"
- on-change="onTimeZoneAutoDetectChange_">
- </paper-toggle-button>
</div>
<div class="settings-box continuation embedded">
- <settings-dropdown-menu pref="{{prefs.cros.system.timezone}}"
- label="$i18n{timeZone}"
- menu-options="[[timeZoneList_]]"
- disabled="[[timeZoneAutoDetect_]]">
- </settings-dropdown-menu>
+ <template is="dom-if" if="[[!perUserTimezoneEnabled_]]" restamp>
+ <settings-dropdown-menu pref="{{prefs.cros.system.timezone}}"
+ label="$i18n{timeZone}"
+ menu-options="[[timeZoneList_]]"
+ disabled="[[timeZoneAutoDetect_]]">
+ </settings-dropdown-menu>
+ </template>
+ <template is="dom-if" if="[[perUserTimezoneEnabled_]]" restamp>
+ <template is="dom-if" if="[[!isUserTimeZoneSelectorHidden_(
+ prefs.settings.timezone,
+ prefs.settings.resolve_timezone_by_geolocation.value)]]" restamp>
michaelpg 2017/05/30 22:21:23 nit: break after a continuation line before the ne
Alexander Alekseev 2017/07/06 06:30:29 Done.
+ <settings-dropdown-menu id="userTimeZoneSelector"
+ pref="{{prefs.settings.timezone}}"
+ label="$i18n{timeZone}"
+ menu-options="[[timeZoneList_]]">
+ </settings-dropdown-menu>
+ </template>
+ <template is="dom-if" if="[[isUserTimeZoneSelectorHidden_(
+ prefs.settings.timezone,
+ prefs.settings.resolve_timezone_by_geolocation.value)]]" restamp>
michaelpg 2017/05/30 22:21:23 ditto
Alexander Alekseev 2017/07/06 06:30:29 Done.
+ <settings-dropdown-menu id="systemTimezoneSelector"
+ pref="{{prefs.cros.system.timezone}}"
+ label="$i18n{timeZone}"
+ menu-options="[[timeZoneList_]]"
+ disabled>
+ </settings-dropdown-menu>
+ </template>
+ </template>
</div>
<div class="settings-box">
<settings-toggle-button class="start"

Powered by Google App Engine
This is Rietveld 408576698