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