Commit 1c2d9eff authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS Network] Fix title of settings dialog used to connect to a network.

The <internet-config> element is used in two situations:
(1) When attempting a connection to an unconfigured network. In this
    case, once the user fills in the information needed to configure the
    network (e.g., Wi-Fi password) and clicks "Connect", a connection is
    attempted to that network.
(2) When attempting to configure a network without connecting. In this
    case, once a user clicks "Save", the network is configured, but no
    connection attempt occurs.

Currently, the dialog title reads "Configure <networkName>" as long as
the network has a name. However, for parity with InternetConfigDialog,
the title should read "Join <networkType>" in the first case listed
above. This CL accomplishes this goal by piggybacking on top of the
"showConnect" property of <internet-config>.

Bug: 963841
Change-Id: I542b1adef3edc1e7cbd4c9dea1ebe63c8af2b7b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628108
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662897}
parent abc6bede
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
</style> </style>
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">[[getDialogTitle_(managedProperties_)]]</div> <div slot="title">
[[getDialogTitle_(managedProperties_, showConnect)]]
</div>
<div slot="body"> <div slot="body">
<network-config id="networkConfig" class="flex" <network-config id="networkConfig" class="flex"
networking-private="[[networkingPrivate]]" networking-private="[[networkingPrivate]]"
......
...@@ -124,7 +124,7 @@ Polymer({ ...@@ -124,7 +124,7 @@ Polymer({
getDialogTitle_: function() { getDialogTitle_: function() {
const name = /** @type {string} */ ( const name = /** @type {string} */ (
CrOnc.getActiveValue(this.managedProperties_.Name)); CrOnc.getActiveValue(this.managedProperties_.Name));
if (name) { if (name && !this.showConnect) {
return this.i18n('internetConfigName', HTMLEscape(name)); return this.i18n('internetConfigName', HTMLEscape(name));
} }
const type = this.i18n('OncType' + this.managedProperties_.Type); const type = this.i18n('OncType' + this.managedProperties_.Type);
......
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