Commit 0182b0ff authored by Yue Li's avatar Yue Li Committed by Commit Bot

Add optional legal text in email optin UI

Bug: b/109879970
Test: Manual Test
Change-Id: Ic13b02e3ad514bc8f5e1feb0e255bcd54f02ab4d
Reviewed-on: https://chromium-review.googlesource.com/1173391
Commit-Queue: Yue Li <updowndota@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583103}
parent 13ce5f6c
......@@ -5,3 +5,7 @@
.title {
padding: 32px 0 24px 0;
}
p {
margin-block-end: 0;
}
......@@ -107,6 +107,11 @@ Polymer({
var description = document.createElement('div');
description.className = 'zippy-description';
description.textContent = data['description'];
if (data['legalText']) {
var legalText = document.createElement('p');
legalText.textContent = data['legalText'];
description.appendChild(legalText);
}
zippy.appendChild(description);
Polymer.dom(this.$['insertion-point']).appendChild(zippy);
......
......@@ -142,6 +142,7 @@ base::Value CreateGetMoreData(bool email_optin_needed,
data.SetKey("defaultEnabled",
base::Value(email_optin_ui.default_enabled()));
data.SetKey("iconUri", base::Value(email_optin_ui.icon_uri()));
data.SetKey("legalText", base::Value(email_optin_ui.legal_text()));
get_more_data.GetList().push_back(std::move(data));
}
......
......@@ -18,6 +18,10 @@ message EmailOptInUi {
// A paragraph telling the user what they get from email updates.
optional string description = 3;
// Supplementary text that is only required in some locales which tells
// users how to opt out.
optional string legal_text = 4;
// Whether the switch should default to enabled. This affects the opt-in
// state if the user does not override it.
optional bool default_enabled = 5;
......
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