Commit 28dc5cd6 authored by Danan S's avatar Danan S Committed by Commit Bot

Add Parental Controls section back to main settings page

It's now part of the People section.

Bug: 927957
Change-Id: I3ee88d4fce66896613806d74ad4787670e658eb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702167Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Danan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678482}
parent efd2e2ff
...@@ -224,6 +224,10 @@ ...@@ -224,6 +224,10 @@
</settings-subpage> </settings-subpage>
</template> </template>
</template> </template>
<template is="dom-if" if="[[showParentalControls_]]">
<settings-parental-controls-page>
</settings-parental-controls-page>
</template>
<template is="dom-if" route-path="/accounts"> <template is="dom-if" route-path="/accounts">
<settings-subpage <settings-subpage
associated-control="[[$$('#manage-other-people-subpage-trigger')]]" associated-control="[[$$('#manage-other-people-subpage-trigger')]]"
......
...@@ -115,6 +115,15 @@ Polymer({ ...@@ -115,6 +115,15 @@ Polymer({
readOnly: true, readOnly: true,
}, },
/** @private */
showParentalControls_: {
type: Boolean,
value: function() {
return loadTimeData.valueExists('showParentalControls') &&
loadTimeData.getBoolean('showParentalControls');
},
},
/** @private {!Map<string, string>} */ /** @private {!Map<string, string>} */
focusConfig_: { focusConfig_: {
type: Object, type: Object,
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<link rel="import" href="lock_screen.html"> <link rel="import" href="lock_screen.html">
<link rel="import" href="lock_state_behavior.html"> <link rel="import" href="lock_state_behavior.html">
<link rel="import" href="users_page.html"> <link rel="import" href="users_page.html">
<link rel="import" href="../parental_controls_page/parental_controls_page.html">
</if> </if>
<if expr="not chromeos"> <if expr="not chromeos">
<link rel="import" href="chrome://resources/cr_elements/cr_toast/cr_toast.html"> <link rel="import" href="chrome://resources/cr_elements/cr_toast/cr_toast.html">
...@@ -272,7 +273,10 @@ ...@@ -272,7 +273,10 @@
on-click="onAccountManagerTap_" on-click="onAccountManagerTap_"
label="$i18n{accountManagerSubMenuLabel}"></cr-link-row> label="$i18n{accountManagerSubMenuLabel}"></cr-link-row>
</template> </template>
<template is="dom-if" if="[[showParentalControls_]]">
<settings-parental-controls-page>
</settings-parental-controls-page>
</template>
<cr-link-row id="manage-other-people-subpage-trigger" <cr-link-row id="manage-other-people-subpage-trigger"
label="$i18n{manageOtherPeople}" on-click="onManageOtherPeople_" label="$i18n{manageOtherPeople}" on-click="onManageOtherPeople_"
hidden="[[!pageVisibility.people.manageUsers]]"> hidden="[[!pageVisibility.people.manageUsers]]">
......
...@@ -151,6 +151,15 @@ Polymer({ ...@@ -151,6 +151,15 @@ Polymer({
}, },
readOnly: true, readOnly: true,
}, },
/** @private */
showParentalControls_: {
type: Boolean,
value: function() {
return loadTimeData.valueExists('showParentalControls') &&
loadTimeData.getBoolean('showParentalControls');
},
},
// </if> // </if>
/** @private {!Map<string, string>} */ /** @private {!Map<string, string>} */
......
...@@ -10,10 +10,6 @@ ...@@ -10,10 +10,6 @@
<link rel="import" href="user_list.html"> <link rel="import" href="user_list.html">
<link rel="import" href="users_add_user_dialog.html"> <link rel="import" href="users_add_user_dialog.html">
<if expr="chromeos">
<link rel="import" href="../parental_controls_page/parental_controls_page.html">
</if>
<dom-module id="settings-users-page"> <dom-module id="settings-users-page">
<template> <template>
<style include="settings-shared action-link"> <style include="settings-shared action-link">
...@@ -72,13 +68,6 @@ ...@@ -72,13 +68,6 @@
</a> </a>
</div> </div>
</div> </div>
<if expr="chromeos">
<template is="dom-if" if="[[showParentalControls_]]">
<h2 id="header" class="title">$i18n{parentalControlsPageTitle}</h2>
<settings-parental-controls-page>
</settings-parental-controls-page>
</template>
</if>
<settings-users-add-user-dialog id="addUserDialog" <settings-users-add-user-dialog id="addUserDialog"
on-close="onAddUserDialogClose_"> on-close="onAddUserDialogClose_">
</settings-users-add-user-dialog> </settings-users-add-user-dialog>
......
...@@ -30,19 +30,6 @@ Polymer({ ...@@ -30,19 +30,6 @@ Polymer({
type: Boolean, type: Boolean,
value: false, value: false,
}, },
/** @private */
showParentalControls_: {
type: Boolean,
value: false,
},
},
/** @override */
ready: function() {
this.showParentalControls_ =
loadTimeData.valueExists('showParentalControls') &&
loadTimeData.getBoolean('showParentalControls');
}, },
/** @override */ /** @override */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment