summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/browser/chromeos/dom_ui/accounts_options_handler.cc4
-rw-r--r--chrome/browser/resources/options/chromeos_accounts_options.html5
-rw-r--r--chrome/browser/resources/options/chromeos_accounts_options.js4
-rw-r--r--chrome/browser/resources/options/chromeos_accounts_options_page.css16
-rw-r--r--chrome/browser/resources/options/warning.pngbin0 -> 1045 bytes
6 files changed, 32 insertions, 0 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 32c45c2..af7346e 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -9485,6 +9485,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_OPTIONS_ACCOUNTS_ADD_USERS" desc="In the Accounts settings tab, the label text above the user name edit box.">
Add users
</message>
+ <message name="IDS_OPTIONS_ACCOUNTS_OWNER_ONLY" desc="In the Accounts settings tab, the warning text noticing that only the owner can modify these settings.">
+ These settings may only be modified by the owner:
+ </message>
<message name="IDS_OPTIONS_PERSONAL_ACCOUNT_GROUP_NAME" desc="In the Personal Stuff settings tab, the title text for Account section.">
Account
</message>
diff --git a/chrome/browser/chromeos/dom_ui/accounts_options_handler.cc b/chrome/browser/chromeos/dom_ui/accounts_options_handler.cc
index 628906a..9d9be53 100644
--- a/chrome/browser/chromeos/dom_ui/accounts_options_handler.cc
+++ b/chrome/browser/chromeos/dom_ui/accounts_options_handler.cc
@@ -53,6 +53,10 @@ void AccountsOptionsHandler::GetLocalizedValues(
IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT));
localized_strings->SetString("add_users",l10n_util::GetStringUTF16(
IDS_OPTIONS_ACCOUNTS_ADD_USERS));
+ localized_strings->SetString("owner_only", l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ACCOUNTS_OWNER_ONLY));
+ localized_strings->SetString("owner_user_id", UTF8ToUTF16(
+ UserCrosSettingsProvider::cached_owner()));
localized_strings->SetString("current_user_is_owner",
UserManager::Get()->current_user_is_owner() ?
diff --git a/chrome/browser/resources/options/chromeos_accounts_options.html b/chrome/browser/resources/options/chromeos_accounts_options.html
index 1ea4bdb..42b5f2e 100644
--- a/chrome/browser/resources/options/chromeos_accounts_options.html
+++ b/chrome/browser/resources/options/chromeos_accounts_options.html
@@ -2,6 +2,11 @@
<h1 i18n-content="accountsPage"></h1>
<section>
<div class="option">
+ <div id="ownerOnlyWarning" class="hidden">
+ <span id="warningIcon"></span>
+ <span i18n-content="owner_only"></span>
+ <span i18n-content="owner_user_id"></span>
+ </div>
<table class="option-control-table">
<tr>
<td class="option-name">
diff --git a/chrome/browser/resources/options/chromeos_accounts_options.js b/chrome/browser/resources/options/chromeos_accounts_options.js
index 349f15b..1a978c6 100644
--- a/chrome/browser/resources/options/chromeos_accounts_options.js
+++ b/chrome/browser/resources/options/chromeos_accounts_options.js
@@ -41,6 +41,10 @@ cr.define('options', function() {
userList.disabled =
userNameEdit.disabled = !AccountsOptions.currentUserIsOwner();
+ // If the current user is not the owner, show some warning.
+ if (!AccountsOptions.currentUserIsOwner()) {
+ $('ownerOnlyWarning').classList.remove('hidden');
+ }
this.addEventListener('visibleChange', this.handleVisibleChange_);
diff --git a/chrome/browser/resources/options/chromeos_accounts_options_page.css b/chrome/browser/resources/options/chromeos_accounts_options_page.css
index f92132f..10aa695 100644
--- a/chrome/browser/resources/options/chromeos_accounts_options_page.css
+++ b/chrome/browser/resources/options/chromeos_accounts_options_page.css
@@ -78,6 +78,22 @@ html[dir=rtl] .remove-user-button {
width: 366px;
}
+#ownerOnlyWarning {
+ margin-bottom: 10px;
+}
+
+#ownerOnlyWarning > * {
+ vertical-align: middle;
+}
+
+#warningIcon {
+ width: 17px;
+ height: 17px;
+ display: inline-block;
+ background-repeat: no-repeat;
+ background-image: url('warning.png');
+}
+
input#userNameEdit:invalid {
background-color: #ff6666;
}
diff --git a/chrome/browser/resources/options/warning.png b/chrome/browser/resources/options/warning.png
new file mode 100644
index 0000000..46d78c5
--- /dev/null
+++ b/chrome/browser/resources/options/warning.png
Binary files differ