Commit 9e858fe6 authored by Jana Grill's avatar Jana Grill Committed by Chromium LUCI CQ

Adjust terms of service OOBE screen for FlexOrgs

Replace references to domain with manager in TermsOfServiceScreen.

Additionally adjust IDS_TERMS_OF_SERVICE_SCREEN_HEADING and
IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING to support FlexOrgs by adjusting
the domain placeholder names and descriptions as well as adding
screenshots to make it easier for the translators to understand the
usage of the texts.

Finally replace a call to
BrowserPolicyConnectorChromeOS::GetEnterpriseDisplayDomain with a call
to BrowserPolicyConnectorChromeOS::GetEnterpriseDomainManager.

Bug: b:172684210
Test: Manual
Change-Id: I5acd16c1fa1638fbd6715f355a77ceca21f02bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593120Reviewed-by: default avatarBrian Malcolm <bmalcolm@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Jana Grill <janagrill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837521}
parent 87a65b8a
......@@ -2422,11 +2422,8 @@
Determining device configuration...
</message>
<message name="IDS_TERMS_OF_SERVICE_SCREEN_HEADING" desc="Heading at the top of the Terms of Service screen.">
<ph name="DOMAIN">$1<ex>example.com</ex></ph> Terms of Service
</message>
<message name="IDS_TERMS_OF_SERVICE_SCREEN_CONTENT_HEADING" desc="Heading at the start of the the Terms of Service text.">
<ph name="DOMAIN">$1<ex>example.com</ex></ph> Terms
<message name="IDS_TERMS_OF_SERVICE_SCREEN_HEADING" desc="Heading at the top of the Terms of Service screen. MANAGER can be a domain or an email address.">
<ph name="MANAGER">$1<ex>example.com</ex></ph> Terms of Service
</message>
<message name="IDS_TERMS_OF_SERVICE_SCREEN_LOADING" desc="Message shown while the Terms of Service are being downloaded.">
Loading...
......
96c5f21c393ab02cf1149d339ce723d3d9da2316
\ No newline at end of file
96c5f21c393ab02cf1149d339ce723d3d9da2316
\ No newline at end of file
96c5f21c393ab02cf1149d339ce723d3d9da2316
\ No newline at end of file
......@@ -804,8 +804,8 @@ Chromium is unable to recover your settings.
<!-- Chrome OS OOBE Terms of Service screen-->
<if expr="chromeos">
<message name="IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING" desc="Subheading at the top of the Terms of Service screen.">
<ph name="DOMAIN">$1<ex>example.com</ex></ph> requires that you read and accept the following Terms of Service before using this device. These terms do not expand, modify or limit the Chromium OS Terms.
<message name="IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING" desc="Subheading at the top of the Terms of Service screen. MANAGER can be a domain or an email address.">
<ph name="MANAGER">$1<ex>example.com</ex></ph> requires that you read and accept the following Terms of Service before using this device. These terms do not expand, modify or limit the Chromium OS Terms.
</message>
</if>
......
96c5f21c393ab02cf1149d339ce723d3d9da2316
\ No newline at end of file
......@@ -811,8 +811,8 @@ Google Chrome is unable to recover your settings.
<!-- Chrome OS OOBE Terms of Service screen-->
<if expr="chromeos">
<message name="IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING" desc="Subheading at the top of the Terms of Service screen.">
<ph name="DOMAIN">$1<ex>example.com</ex></ph> requires that you read and accept the following Terms of Service before using this device. These terms do not expand, modify or limit the Google Chrome OS Terms.
<message name="IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING" desc="Subheading at the top of the Terms of Service screen. MANAGER can be a domain or an email address.">
<ph name="MANAGER">$1<ex>example.com</ex></ph> requires that you read and accept the following Terms of Service before using this device. These terms do not expand, modify or limit the Google Chrome OS Terms.
</message>
</if>
......
96c5f21c393ab02cf1149d339ce723d3d9da2316
\ No newline at end of file
......@@ -120,7 +120,7 @@ void TermsOfServiceScreen::ShowImpl() {
// Set the domain name whose Terms of Service are being shown.
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
view_->SetDomain(connector->GetEnterpriseDisplayDomain());
view_->SetManager(connector->GetEnterpriseDomainManager());
// Show the screen.
view_->Show();
......
......@@ -54,12 +54,12 @@
<h1 id="title" slot="title">
<div id="tosHeading">[[i18nDynamic(locale,
'termsOfServiceScreenHeading',
tosDomain_)]]</div>
tosManager_)]]</div>
</h1>
<div slot="subtitle">
<div id="tosSubheading">[[i18nDynamic(locale,
'termsOfServiceScreenSubheading',
tosDomain_)]]</div>
tosManager_)]]</div>
</div>
<div slot="footer" class="flex layout center-justified vertical">
<div hidden="[[!isLoading_()]]">
......
......@@ -38,11 +38,10 @@ Polymer({
// Whether the accept button is disabled.
acceptButtonDisabled_: {type: Boolean, value: true},
// The domain that the terms of service belongs to.
tosDomain_: {type: String, value: ''},
// The manager that the terms of service belongs to.
tosManager_: {type: String, value: ''},
},
defaultUIStep() {
return UIState.LOADING;
},
......@@ -65,7 +64,7 @@ Polymer({
},
EXTERNAL_API: [
'setDomain',
'setManager',
'setTermsOfServiceLoadError',
'setTermsOfService',
],
......@@ -140,11 +139,11 @@ Polymer({
/**
* Updates headings on the screen to indicate that the Terms of Service
* being shown belong to |domain|.
* @param {string} domain The domain whose Terms of Service are being shown.
* being shown belong to |manager|.
* @param {string} manager The manager whose Terms of Service are being shown.
*/
setDomain(domain) {
this.tosDomain_ = domain;
setManager(manager) {
this.tosManager_ = manager;
},
/**
......
......@@ -49,8 +49,6 @@ void TermsOfServiceScreenHandler::DeclareLocalizedValues(
IDS_TERMS_OF_SERVICE_SCREEN_HEADING);
builder->Add("termsOfServiceScreenSubheading",
IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING);
builder->Add("termsOfServiceContentHeading",
IDS_TERMS_OF_SERVICE_SCREEN_CONTENT_HEADING);
builder->Add("termsOfServiceLoading", IDS_TERMS_OF_SERVICE_SCREEN_LOADING);
builder->Add("termsOfServiceError", IDS_TERMS_OF_SERVICE_SCREEN_ERROR);
builder->Add("termsOfServiceTryAgain", IDS_TERMS_OF_SERVICE_SCREEN_TRY_AGAIN);
......@@ -78,9 +76,9 @@ void TermsOfServiceScreenHandler::Show() {
void TermsOfServiceScreenHandler::Hide() {
}
void TermsOfServiceScreenHandler::SetDomain(const std::string& domain) {
domain_ = domain;
UpdateDomainInUI();
void TermsOfServiceScreenHandler::SetManager(const std::string& manager) {
manager_ = manager;
UpdateManagerInUI();
}
void TermsOfServiceScreenHandler::OnLoadError() {
......@@ -127,8 +125,8 @@ void TermsOfServiceScreenHandler::DoShow() {
input_methods.front(), false /* show_message */);
}
// Updates the domain name shown in the UI.
UpdateDomainInUI();
// Updates the manager name shown in the UI.
UpdateManagerInUI();
// Update the UI to show an error message or the Terms of Service.
UpdateTermsOfServiceInUI();
......@@ -136,9 +134,9 @@ void TermsOfServiceScreenHandler::DoShow() {
ShowScreen(kScreenId);
}
void TermsOfServiceScreenHandler::UpdateDomainInUI() {
void TermsOfServiceScreenHandler::UpdateManagerInUI() {
if (page_is_ready())
CallJS("login.TermsOfServiceScreen.setDomain", domain_);
CallJS("login.TermsOfServiceScreen.setManager", manager_);
}
void TermsOfServiceScreenHandler::UpdateTermsOfServiceInUI() {
......
......@@ -33,8 +33,8 @@ class TermsOfServiceScreenView {
// Hides the contents of the screen.
virtual void Hide() = 0;
// Sets the domain name whose Terms of Service are being shown.
virtual void SetDomain(const std::string& domain) = 0;
// Sets the manager whose Terms of Service are being shown.
virtual void SetManager(const std::string& manager) = 0;
// Called when the download of the Terms of Service fails. Show an error
// message to the user.
......@@ -65,7 +65,7 @@ class TermsOfServiceScreenHandler : public BaseScreenHandler,
void SetScreen(TermsOfServiceScreen* screen) override;
void Show() override;
void Hide() override;
void SetDomain(const std::string& domain) override;
void SetManager(const std::string& manager) override;
void OnLoadError() override;
void OnLoadSuccess(const std::string& terms_of_service) override;
bool AreTermsLoaded() override;
......@@ -79,8 +79,8 @@ class TermsOfServiceScreenHandler : public BaseScreenHandler,
// matches the UI locale chosen by the user.
void DoShow();
// Update the domain name shown in the UI.
void UpdateDomainInUI();
// Update the manager shown in the UI.
void UpdateManagerInUI();
// Update the UI to show an error message or the Terms of Service, depending
// on whether the download of the Terms of Service was successful. Does
......@@ -92,8 +92,8 @@ class TermsOfServiceScreenHandler : public BaseScreenHandler,
// Whether the screen should be shown right after initialization.
bool show_on_init_ = false;
// The domain name whose Terms of Service are being shown.
std::string domain_;
// The manager whose Terms of Service are being shown.
std::string manager_;
// Set to `true` when the download of the Terms of Service fails.
bool load_error_ = false;
......
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