Index: chrome/browser/resources/settings/internet_page/internet_config.html |
diff --git a/chrome/browser/resources/settings/internet_page/internet_config.html b/chrome/browser/resources/settings/internet_page/internet_config.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..edb6081bd0404d1cf66c0bbfdf78df82a5f54011 |
--- /dev/null |
+++ b/chrome/browser/resources/settings/internet_page/internet_config.html |
@@ -0,0 +1,163 @@ |
+<link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon.html"> |
+<link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.html"> |
+<link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
+<link rel="import" href="chrome://resources/html/polymer.html"> |
+<link rel="import" href="chrome://resources/html/md_select_css.html"> |
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> |
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> |
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input-container.html"> |
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/paper-toggle-button.html"> |
+<link rel="import" href="internet_shared_css.html"> |
+ |
+<dom-module id="settings-internet-config"> |
+ <template> |
+ <style include="internet-shared md-select iron-flex"> |
+ </style> |
+ |
+ <!-- Title section: Icon + name. --> |
+ <div class="settings-box first"> |
+ <div class="start layout horizontal center"> |
+ <cr-network-icon network-state="[[networkProperties_]]" is-list-item> |
+ </cr-network-icon> |
+ <div class="title">[[title_]]</div> |
+ </div> |
+ <div id="buttonDiv"> |
+ <paper-button class="secondary-button" on-tap="onCancelTap_"> |
+ $i18n{cancel} |
+ </paper-button> |
+ <template is="dom-if" if="[[guid_]]"> |
+ <paper-button class="primary-button" on-tap="onSaveTap_"> |
+ $i18n{save} |
+ </paper-button> |
+ </template> |
+ <template is="dom-if" if="[[!guid_]]"> |
+ <paper-button class="primary-button" on-tap="onSaveTap_" |
+ disabled="[[!connectIsEnabled_(configProperties_.*)]]"> |
+ $i18n{networkButtonConnect} |
+ </paper-button> |
+ </template> |
+ </div> |
+ </div> |
+ |
+ <!-- WiFi --> |
+ <template is="dom-if" |
+ if="[[isType_(NetworkType_.WI_FI, networkProperties_.Type)]]"> |
+ <div class="settings-box"> |
+ <div id="shareLabel" class="start">$i18n{networkConfigShare}</div> |
+ <paper-toggle-button id="share" checked="{{shareNetwork_}}" |
+ disabled="[[!shareIsEnabled_(guid_, configProperties_.*)]]" |
+ aria-labelledby="shareLabel"> |
+ </paper-toggle-button> |
+ </div> |
+ |
+ <div class="settings-box"> |
+ <div id="ssidLabel" class="start">$i18n{OncWiFi-SSID}</div> |
+ <paper-input-container no-label-float> |
+ <input id="ssid" is="iron-input" |
+ value="{{configProperties_.WiFi.SSID::change}}" |
michaelpg
2017/05/18 21:14:23
I just discovered bind-value: https://github.com/P
stevenjb
2017/05/19 23:35:34
Well, one might make the same mistake with value=
|
+ disabled="[[guid_]]" aria-labelledby="ssidLabel"> |
+ </paper-input-container> |
+ </div> |
+ |
+ <div class="settings-box"> |
+ <div id="securityLabel" class="start">$i18n{OncWiFi-Security}</div> |
+ <select id="security" class="md-select" disabled="[[guid_]]" |
+ value="{{configProperties_.WiFi.Security::change}}" |
+ aria-labelledby="securityLabel"> |
+ <template is="dom-repeat" items="[[securityItems_]]"> |
+ <option value="[[item]]"> |
+ [[getOncLabel_(item, 'Wifi.Security')]] |
+ </option> |
+ </template> |
+ </select> |
+ </div> |
+ |
+ <div class="settings-box" |
+ hidden="[[!showWiFiPassphrase_(configProperties_.*)]]"> |
+ <div id="passphraseLabel" class="start"> |
+ $i18n{OncWiFi-Passphrase} |
+ </div> |
+ <paper-input-container no-label-float> |
+ <input id="passphrase" is="iron-input" type="password" |
+ value="{{configProperties_.WiFi.Passphrase::change}}" |
+ aria-labelledby="passphraseLabel"> |
+ </paper-input-container> |
+ </div> |
+ </template> |
+ |
+ <!-- EAP (WiFi, WiMAX, Ethernet) --> |
+ <div hidden="[[!showEap_]]"> |
michaelpg
2017/05/18 21:14:23
could this be dom-if?
stevenjb
2017/05/19 23:35:34
Done.
|
+ <div class="settings-box"> |
+ <div id="eapOuterLabel" class="start">$i18n{OncWiFi-EAP-Outer}</div> |
+ <select id="eapOuter" class="md-select" |
+ value="{{configProperties_.WiFi.EAP.Outer::change}}" |
+ aria-labelledby="eapOuterLabel"> |
+ <template is="dom-repeat" items="[[eapOuterItems_]]"> |
+ <option value="[[item]]"> |
+ [[getOncLabel_(item, 'WiFi.EAP.Outer')]] |
+ </option> |
+ </template> |
+ </select> |
+ </div> |
+ <div class="settings-box" hidden="[[!showEap_.Inner]]"> |
+ <div id="eapInnerLabel" class="start">$i18n{OncWiFi-EAP-Inner}</div> |
+ <select id="eapInner" class="md-select" |
+ value="{{configProperties_.WiFi.EAP.Inner::change}}" |
michaelpg
2017/05/18 21:14:22
This logic is a bit complex to follow but it seems
stevenjb
2017/05/19 23:35:34
Yeah, this turns out to be a little subtly complic
|
+ aria-labelledby="eapInnerLabel"> |
+ <template is="dom-repeat" |
+ items="[[getEapInnerItems_(configProperties_.WiFi.EAP.Outer)]]"> |
+ <option value="[[item]]"> |
+ [[getOncLabel_(item, 'WiFi.EAP.Inner')]] |
+ </option> |
+ </template> |
+ </select> |
+ </div> |
+ <div class="settings-box" hidden="[[!showEap.SubjectMatch]]"> |
+ <div id="eapSubjectMatchLabel" class="start"> |
+ $i18n{OncWiFi-EAP-SubjectMatch} |
+ </div> |
+ <paper-input-container no-label-float> |
+ <input id="eapSubjectMatch" is="iron-input" |
+ value="{{configProperties_.WiFi.EAP.SubjectMatch::change}}" |
+ aria-labelledby="eapSubjectMatchLabel"> |
+ </paper-input-container> |
+ </div> |
+ <div class="settings-box" hidden="[[!showEap.Identity]]"> |
+ <div id="OncWiFi-EAP-Identity" class="start"> |
+ $i18n{OncWiFi-EAP-Identity} |
+ </div> |
+ <paper-input-container no-label-float> |
+ <input id="eapIdentity" is="iron-input" |
+ value="{{configProperties_.WiFi.EAP.Identity::change}}" |
+ aria-labelledby="eapIdentityLabel"> |
+ </paper-input-container> |
+ </div> |
+ <div class="settings-box" hidden="[[!showEap.Password]]"> |
+ <div id="eapPasswordLabel" class="start"> |
+ $i18n{OncWiFi-EAP-Password} |
+ </div> |
+ <paper-input-container no-label-float> |
+ <input id="eapPassword" is="iron-input" type="password" |
+ value="{{configProperties_.WiFi.EAP.Password::change}}" |
+ aria-labelledby="eapPasswordLabel"> |
+ </paper-input-container> |
+ </div> |
+ <div class="settings-box" hidden="[[!showEap.AnonymousIdentity]]"> |
michaelpg
2017/05/18 21:14:22
sigh... it would be nice if each of these extremel
stevenjb
2017/05/19 23:35:34
You know, I feel like I have unlearned some concep
|
+ <div id="eapAnonymousIdentityLabel" class="start"> |
+ $i18n{OncWiFi-EAP-AnonymousIdentity} |
+ </div> |
+ <paper-input-container no-label-float> |
+ <input id="eapAnonymousIdentity" is="iron-input" |
+ value="{{configProperties_.WiFi.EAP.AnonymousIdentity::change}}" |
+ aria-labelledby="eapAnonymousIdentityLabel"> |
+ </paper-input-container> |
+ </div> |
+ </div> |
+ |
+ <!-- TODO(stevenjb): Error message for config or cert failure --> |
+ |
+ </template> |
+ |
+ </template> |
michaelpg
2017/05/18 21:14:22
remove extra newline and </template>
stevenjb
2017/05/19 23:35:34
Ah, merges. Done.
|
+ <script src="internet_config.js"></script> |
+</dom-module> |