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

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, 4 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..edab66ba4b57ca15cc49e96737f9e72180a87ac1 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,61 @@
<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" restamp
+ if="[[!prefs.cros.flags.per_user_timezone_enabled.value]]">
+ <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" restamp
+ if="[[prefs.cros.flags.per_user_timezone_enabled.value]]">
+ <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" restamp
+ if="[[!prefs.cros.flags.per_user_timezone_enabled.value]]">
+ <settings-dropdown-menu pref="{{prefs.cros.system.timezone}}"
+ label="$i18n{timeZone}"
+ menu-options="[[timeZoneList_]]"
+ disabled="[[timeZoneAutoDetect_]]">
+ </settings-dropdown-menu>
+ </template>
+ <template is="dom-if" restamp
+ if="[[prefs.cros.flags.per_user_timezone_enabled.value]]">
+ <template is="dom-if" if="[[!isUserTimeZoneSelectorHidden_(
+ prefs.settings.timezone,
+ prefs.settings.resolve_timezone_by_geolocation.value)]]" restamp>
+ <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>
+ <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