OLD | NEW |
---|---|
(Empty) | |
1 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon. html"> | |
2 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> | |
3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | |
4 <link rel="import" href="chrome://resources/html/polymer.html"> | |
5 <link rel="import" href="chrome://resources/html/md_select_css.html"> | |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html"> | |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> | |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> | |
10 <link rel="import" href="internet_shared_css.html"> | |
11 | |
12 <dom-module id="settings-internet-config"> | |
13 <template> | |
14 <style include="internet-shared md-select iron-flex"> | |
15 </style> | |
16 | |
17 <!-- Title section: Icon + name. --> | |
18 <div class="settings-box first"> | |
19 <div class="start layout horizontal center"> | |
20 <cr-network-icon network-state="[[networkProperties_]]" is-list-item> | |
21 </cr-network-icon> | |
22 <div class="title">[[title_]]</div> | |
23 </div> | |
24 <div id="buttonDiv"> | |
25 <paper-button class="secondary-button" on-tap="onCancelTap_"> | |
26 $i18n{cancel} | |
27 </paper-button> | |
28 <template is="dom-if" if="[[guid_]]"> | |
29 <paper-button class="primary-button" on-tap="onSaveTap_"> | |
30 $i18n{save} | |
31 </paper-button> | |
32 </template> | |
33 <template is="dom-if" if="[[!guid_]]"> | |
34 <paper-button class="primary-button" on-tap="onSaveTap_" | |
35 disabled="[[!connectIsEnabled_(configProperties_.*)]]"> | |
36 $i18n{networkButtonConnect} | |
37 </paper-button> | |
38 </template> | |
39 </div> | |
40 </div> | |
41 | |
42 <!-- WiFi --> | |
43 <template is="dom-if" | |
44 if="[[isType_(NetworkType_.WI_FI, networkProperties_.Type)]]"> | |
45 <div class="settings-box"> | |
46 <div id="shareLabel" class="start">$i18n{networkConfigShare}</div> | |
47 <paper-toggle-button id="share" checked="{{shareNetwork_}}" | |
48 disabled="[[!shareIsEnabled_(guid_, configProperties_.*)]]" | |
49 aria-labelledby="shareLabel"> | |
50 </paper-toggle-button> | |
51 </div> | |
52 | |
53 <div class="settings-box"> | |
54 <div id="ssidLabel" class="start">$i18n{OncWiFi-SSID}</div> | |
55 <paper-input-container no-label-float> | |
56 <input id="ssid" is="iron-input" | |
57 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=
| |
58 disabled="[[guid_]]" aria-labelledby="ssidLabel"> | |
59 </paper-input-container> | |
60 </div> | |
61 | |
62 <div class="settings-box"> | |
63 <div id="securityLabel" class="start">$i18n{OncWiFi-Security}</div> | |
64 <select id="security" class="md-select" disabled="[[guid_]]" | |
65 value="{{configProperties_.WiFi.Security::change}}" | |
66 aria-labelledby="securityLabel"> | |
67 <template is="dom-repeat" items="[[securityItems_]]"> | |
68 <option value="[[item]]"> | |
69 [[getOncLabel_(item, 'Wifi.Security')]] | |
70 </option> | |
71 </template> | |
72 </select> | |
73 </div> | |
74 | |
75 <div class="settings-box" | |
76 hidden="[[!showWiFiPassphrase_(configProperties_.*)]]"> | |
77 <div id="passphraseLabel" class="start"> | |
78 $i18n{OncWiFi-Passphrase} | |
79 </div> | |
80 <paper-input-container no-label-float> | |
81 <input id="passphrase" is="iron-input" type="password" | |
82 value="{{configProperties_.WiFi.Passphrase::change}}" | |
83 aria-labelledby="passphraseLabel"> | |
84 </paper-input-container> | |
85 </div> | |
86 </template> | |
87 | |
88 <!-- EAP (WiFi, WiMAX, Ethernet) --> | |
89 <div hidden="[[!showEap_]]"> | |
michaelpg
2017/05/18 21:14:23
could this be dom-if?
stevenjb
2017/05/19 23:35:34
Done.
| |
90 <div class="settings-box"> | |
91 <div id="eapOuterLabel" class="start">$i18n{OncWiFi-EAP-Outer}</div> | |
92 <select id="eapOuter" class="md-select" | |
93 value="{{configProperties_.WiFi.EAP.Outer::change}}" | |
94 aria-labelledby="eapOuterLabel"> | |
95 <template is="dom-repeat" items="[[eapOuterItems_]]"> | |
96 <option value="[[item]]"> | |
97 [[getOncLabel_(item, 'WiFi.EAP.Outer')]] | |
98 </option> | |
99 </template> | |
100 </select> | |
101 </div> | |
102 <div class="settings-box" hidden="[[!showEap_.Inner]]"> | |
103 <div id="eapInnerLabel" class="start">$i18n{OncWiFi-EAP-Inner}</div> | |
104 <select id="eapInner" class="md-select" | |
105 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
| |
106 aria-labelledby="eapInnerLabel"> | |
107 <template is="dom-repeat" | |
108 items="[[getEapInnerItems_(configProperties_.WiFi.EAP.Outer)]]"> | |
109 <option value="[[item]]"> | |
110 [[getOncLabel_(item, 'WiFi.EAP.Inner')]] | |
111 </option> | |
112 </template> | |
113 </select> | |
114 </div> | |
115 <div class="settings-box" hidden="[[!showEap.SubjectMatch]]"> | |
116 <div id="eapSubjectMatchLabel" class="start"> | |
117 $i18n{OncWiFi-EAP-SubjectMatch} | |
118 </div> | |
119 <paper-input-container no-label-float> | |
120 <input id="eapSubjectMatch" is="iron-input" | |
121 value="{{configProperties_.WiFi.EAP.SubjectMatch::change}}" | |
122 aria-labelledby="eapSubjectMatchLabel"> | |
123 </paper-input-container> | |
124 </div> | |
125 <div class="settings-box" hidden="[[!showEap.Identity]]"> | |
126 <div id="OncWiFi-EAP-Identity" class="start"> | |
127 $i18n{OncWiFi-EAP-Identity} | |
128 </div> | |
129 <paper-input-container no-label-float> | |
130 <input id="eapIdentity" is="iron-input" | |
131 value="{{configProperties_.WiFi.EAP.Identity::change}}" | |
132 aria-labelledby="eapIdentityLabel"> | |
133 </paper-input-container> | |
134 </div> | |
135 <div class="settings-box" hidden="[[!showEap.Password]]"> | |
136 <div id="eapPasswordLabel" class="start"> | |
137 $i18n{OncWiFi-EAP-Password} | |
138 </div> | |
139 <paper-input-container no-label-float> | |
140 <input id="eapPassword" is="iron-input" type="password" | |
141 value="{{configProperties_.WiFi.EAP.Password::change}}" | |
142 aria-labelledby="eapPasswordLabel"> | |
143 </paper-input-container> | |
144 </div> | |
145 <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
| |
146 <div id="eapAnonymousIdentityLabel" class="start"> | |
147 $i18n{OncWiFi-EAP-AnonymousIdentity} | |
148 </div> | |
149 <paper-input-container no-label-float> | |
150 <input id="eapAnonymousIdentity" is="iron-input" | |
151 value="{{configProperties_.WiFi.EAP.AnonymousIdentity::change}}" | |
152 aria-labelledby="eapAnonymousIdentityLabel"> | |
153 </paper-input-container> | |
154 </div> | |
155 </div> | |
156 | |
157 <!-- TODO(stevenjb): Error message for config or cert failure --> | |
158 | |
159 </template> | |
160 | |
161 </template> | |
michaelpg
2017/05/18 21:14:22
remove extra newline and </template>
stevenjb
2017/05/19 23:35:34
Ah, merges. Done.
| |
162 <script src="internet_config.js"></script> | |
163 </dom-module> | |
OLD | NEW |