| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial
og.html"> | |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
| 7 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> | |
| 8 <link rel="import" href="/icons.html"> | 8 <link rel="import" href="/icons.html"> |
| 9 <link rel="import" href="internet_shared_css.html"> |
| 9 <link rel="import" href="network_property_list.html"> | 10 <link rel="import" href="network_property_list.html"> |
| 10 | 11 |
| 11 <dom-module id="network-siminfo"> | 12 <dom-module id="network-siminfo"> |
| 12 <template> | 13 <template> |
| 13 <style> | 14 <style include="internet-shared"> |
| 14 iron-icon { | 15 iron-icon { |
| 15 -webkit-margin-end: 5px; | 16 -webkit-margin-end: 10px; |
| 16 -webkit-margin-start: -3px; | |
| 17 } | 17 } |
| 18 | 18 .error { |
| 19 paper-button { | |
| 20 margin: 0; | |
| 21 } | |
| 22 | |
| 23 span { | |
| 24 -webkit-margin-end: 10px; | |
| 25 } | |
| 26 | |
| 27 #lockedDiv span { | |
| 28 color: red; | 19 color: red; |
| 29 font-weight: 500; | 20 font-weight: 500; |
| 30 } | 21 } |
| 31 | 22 .dialog-error { |
| 32 #lockedDiv paper-input { | 23 color: red; |
| 33 -webkit-margin-start: 10px; | 24 font-size: 125%; |
| 34 width: 80px; | 25 font-weight: 500; |
| 26 margin-top: 10px; |
| 35 } | 27 } |
| 36 | |
| 37 #unlockSimDialog paper-input { | |
| 38 -webkit-margin-start: 5px; | |
| 39 } | |
| 40 | |
| 41 #unlockSimDialog span { | |
| 42 -webkit-margin-start: 5px; | |
| 43 } | |
| 44 | |
| 45 .pin { | 28 .pin { |
| 46 min-width: 100px; | 29 min-width: 100px; |
| 47 } | 30 } |
| 48 | |
| 49 .puk { | 31 .puk { |
| 50 min-width: 200px; | 32 min-width: 200px; |
| 51 } | 33 } |
| 34 </style> |
| 52 | 35 |
| 53 .error { | 36 <!-- SIM missing UI --> |
| 54 color: red; | 37 <div class="settings-box" |
| 55 max-width: 400px; | 38 hidden$="[[networkProperties.Cellular.SIMPresent]]"> |
| 56 } | 39 <div class="start layout horizontal center"> |
| 57 </style> | |
| 58 <div id="outerDiv" class="layout vertical"> | |
| 59 <div class="layout horizontal center" | |
| 60 hidden$="[[networkProperties.Cellular.SIMPresent]]"> | |
| 61 <!-- SIM missing UI --> | |
| 62 <iron-icon icon="settings:sim-card-alert"></iron-icon> | 40 <iron-icon icon="settings:sim-card-alert"></iron-icon> |
| 63 <span>Missing SIM card</span> | 41 <div class="error">Missing SIM card</div> |
| 64 </div> | |
| 65 <div class="layout vertical" | |
| 66 hidden$="[[!networkProperties.Cellular.SIMPresent]]"> | |
| 67 <div id="lockedDiv" class="layout horizontal center" | |
| 68 hidden$="[[!isSimLocked_(networkProperties)]]"> | |
| 69 <!-- SIM locked --> | |
| 70 <iron-icon icon="settings:lock"></iron-icon> | |
| 71 <span>SIM card is locked.</span> | |
| 72 <paper-button on-tap="onUnlockPinTap_">Unlock</paper-button> | |
| 73 </div> | |
| 74 <div class="layout vertical" | |
| 75 hidden$="[[isSimLocked_(networkProperties)]]"> | |
| 76 <!-- SIM unlocked --> | |
| 77 <paper-checkbox | |
| 78 checked="[[networkProperties.Cellular.SIMLockStatus.LockEnabled]]" | |
| 79 on-change="onSimLockEnabledChange_"> | |
| 80 Enable SIM card locking (require PIN to use mobile data) | |
| 81 </paper-checkbox> | |
| 82 <div class="layout horizontal center" | |
| 83 hidden$="[[!networkProperties.Cellular.SIMLockStatus.LockEnabled]
]"> | |
| 84 <!-- SIM lock enabled --> | |
| 85 <paper-button on-tap="onChangePinTap_">Change PIN</paper-button> | |
| 86 </div> | |
| 87 </div> | |
| 88 </div> | 42 </div> |
| 89 </div> | 43 </div> |
| 90 | 44 |
| 45 <!-- SIM locked --> |
| 46 <div class="settings-box" hidden$="[[!showSimLocked_(networkProperties)]]"> |
| 47 <div class="start layout horizontal center"> |
| 48 <iron-icon icon="settings:lock"></iron-icon> |
| 49 <div class="error">SIM card is locked.</div> |
| 50 </div> |
| 51 <div class="secondary-action"> |
| 52 <paper-button on-tap="onUnlockPinTap_">Unlock</paper-button> |
| 53 </div> |
| 54 </div> |
| 55 |
| 56 <!-- SIM unlocked --> |
| 57 <div class="settings-box" |
| 58 hidden$="[[!showSimUnlocked_(networkProperties)]]"> |
| 59 <paper-checkbox class="start" on-change="onSimLockEnabledChange_" |
| 60 checked="[[networkProperties.Cellular.SIMLockStatus.LockEnabled]]"> |
| 61 Enable SIM card locking (require PIN to use mobile data) |
| 62 </paper-checkbox> |
| 63 <paper-button on-tap="onChangePinTap_" |
| 64 hidden$="[[!networkProperties.Cellular.SIMLockStatus.LockEnabled]]"> |
| 65 Change PIN |
| 66 </paper-button> |
| 67 </div> |
| 68 |
| 91 <!-- Enter PIN dialog --> | 69 <!-- Enter PIN dialog --> |
| 92 <paper-dialog modal id="enterPinDialog" class="layout vertical" | 70 <dialog is="cr-dialog" id="enterPinDialog" |
| 93 on-iron-overlay-opened="onEnterPinDialogOpened_"> | 71 on-iron-overlay-opened="onEnterPinDialogOpened_"> |
| 94 <div class="layout vertical"> | 72 <div class="title">Enter SIM PIN</div> |
| 95 <h2>Enter SIM PIN</h2> | 73 <div class="body"> |
| 96 <div class="layout vertical"> | 74 <paper-input id="enterPin" class="pin" no-label-float label="Enter PIN"> |
| 97 <div class="layout horizontal"> | 75 </paper-input> |
| 98 <paper-input id="enterPin" class="pin" no-label-float | 76 <div class="dialog-error"> |
| 99 label="Enter PIN"> | 77 [[getErrorMsg_(error, networkProperties)]] |
| 100 </paper-input> | |
| 101 <paper-button on-tap="sendEnterPin_">Enter</paper-button> | |
| 102 </div> | |
| 103 </div> | |
| 104 <div class="layout horizontal"> | |
| 105 <span class="error" hidden$="[[!showError_(error)]]" | |
| 106 >[[getErrorMsg_(error)]] | |
| 107 </span> | |
| 108 <span>[[getRetriesLeftMsg_(networkProperties)]]</span> | |
| 109 </div> | 78 </div> |
| 110 </div> | 79 </div> |
| 111 </paper-dialog> | 80 <div class="button-container"> |
| 81 <paper-button on-tap="sendEnterPin_">Enter</paper-button> |
| 82 </div> |
| 83 </dialog> |
| 112 | 84 |
| 113 <!-- Change PIN dialog --> | 85 <!-- Change PIN dialog --> |
| 114 <paper-dialog modal id="changePinDialog" class="layout vertical" | 86 <dialog is="cr-dialog" id="changePinDialog" |
| 115 on-iron-overlay-opened="onChangePinDialogOpened_"> | 87 on-iron-overlay-opened="onChangePinDialogOpened_"> |
| 116 <div class="layout vertical"> | 88 <div class="title">Change SIM PIN</div> |
| 117 <h2>Change SIM PIN</h2> | 89 <div class="body"> |
| 118 <div class="layout horizontal end"> | 90 <paper-input id="changePinOld" class="pin" no-label-float |
| 119 <div class="layout vertical"> | 91 label="Enter old PIN"> |
| 120 <paper-input id="changePinOld" class="pin" no-label-float | 92 </paper-input> |
| 121 label="Enter old PIN"> | 93 <paper-input id="changePinNew1" class="pin" no-label-float |
| 122 </paper-input> | 94 label="Enter new PIN"> |
| 123 <paper-input id="changePinNew1" class="pin" no-label-float | 95 </paper-input> |
| 124 label="Enter new PIN"> | 96 <paper-input id="changePinNew2" class="pin" no-label-float |
| 125 </paper-input> | 97 label="Re-enter new PIN"> |
| 126 <paper-input id="changePinNew2" class="pin" no-label-float | 98 </paper-input> |
| 127 label="Re-enter new PIN"> | 99 <div class="dialog-error"> |
| 128 </paper-input> | 100 [[getErrorMsg_(error, networkProperties)]] |
| 129 </div> | |
| 130 <paper-button on-tap="sendChangePin_">Change</paper-button> | |
| 131 </div> | |
| 132 <div class="layout horizontal"> | |
| 133 <span class="error" hidden$="[[!showError_(error)]]" | |
| 134 >[[getErrorMsg_(error)]] | |
| 135 </span> | |
| 136 <span>[[getRetriesLeftMsg_(networkProperties)]]</span> | |
| 137 </div> | 101 </div> |
| 138 </div> | 102 </div> |
| 139 </paper-dialog> | 103 <div class="button-container"> |
| 104 <paper-button on-tap="sendChangePin_">Change</paper-button> |
| 105 </div> |
| 106 </dialog> |
| 140 | 107 |
| 141 <!-- Unlock PIN dialog --> | 108 <!-- Unlock PIN dialog --> |
| 142 <paper-dialog modal id="unlockPinDialog" class="layout vertical" | 109 <dialog is="cr-dialog" id="unlockPinDialog" |
| 143 on-iron-overlay-opened="onUnlockPinDialogOpened_"> | 110 on-iron-overlay-opened="onUnlockPinDialogOpened_"> |
| 144 <div class="layout vertical"> | 111 <div class="title">SIM Card is locked</div> |
| 145 <h2>SIM Card is locked.</h2> | 112 <div class="body"> |
| 146 <div class="layout horizontal"> | 113 <paper-input id="unlockPin" class="pin" no-label-float |
| 147 <paper-input id="unlockPin" class="pin" no-label-float | 114 label="Enter PIN"> |
| 148 label="Enter PIN"> | 115 </paper-input> |
| 149 </paper-input> | 116 <div class="dialog-error"> |
| 150 <paper-button on-tap="sendUnlockPin_">Unlock</paper-button> | 117 [[getErrorMsg_(error, networkProperties)]] |
| 151 </div> | |
| 152 <div class="layout horizontal"> | |
| 153 <span class="error" hidden$="[[!showError_(error)]]" | |
| 154 >[[getErrorMsg_(error)]] | |
| 155 </span> | |
| 156 <span>[[getRetriesLeftMsg_(networkProperties)]]</span> | |
| 157 </div> | 118 </div> |
| 158 </div> | 119 </div> |
| 159 </paper-dialog> | 120 <div class="button-container"> |
| 121 <paper-button on-tap="sendUnlockPin_">Unlock</paper-button> |
| 122 </div> |
| 123 </dialog> |
| 160 | 124 |
| 161 <!-- Unlock PUK dialog --> | 125 <!-- Unlock PUK dialog --> |
| 162 <paper-dialog modal id="unlockPukDialog" class="layout vertical" | 126 <dialog is="cr-dialog" id="unlockPukDialog" |
| 163 on-iron-overlay-opened="onUnlockPukDialogOpened_"> | 127 on-iron-overlay-opened="onUnlockPukDialogOpened_"> |
| 164 <div class="layout vertical"> | 128 <div class="title">SIM Card is locked</div> |
| 165 <h2>SIM Card is locked.</h2> | 129 <div class="body"> |
| 166 <span> | 130 <div> |
| 167 Enter the 8-digit PIN Unblocking Key provided by your carrier | 131 Enter the 8-digit PIN Unblocking Key provided by your carrier |
| 168 </span> | |
| 169 <div class="layout horizontal"> | |
| 170 <div class="layout vertical"> | |
| 171 <paper-input id="unlockPuk" class="puk" no-label-float | |
| 172 label="Enter PIN Unblocking Key"> | |
| 173 </paper-input> | |
| 174 <div class="layout horizontal end"> | |
| 175 <div class="layout vertical"> | |
| 176 <paper-input id="unlockPin1" class="pin" no-label-float | |
| 177 label="Enter PIN"> | |
| 178 </paper-input> | |
| 179 <paper-input id="unlockPin2" class="pin" no-label-float | |
| 180 label="Re-enter PIN"> | |
| 181 </paper-input> | |
| 182 </div> | |
| 183 <paper-button on-tap="sendUnlockPuk_">Unlock</paper-button> | |
| 184 </div> | |
| 185 </div> | |
| 186 <div class="flex"></div>. | |
| 187 </div> | 132 </div> |
| 188 <span class="error"> | 133 <paper-input id="unlockPuk" class="puk" no-label-float |
| 134 label="Enter PIN Unblocking Key"> |
| 135 </paper-input> |
| 136 <paper-input id="unlockPin1" class="pin" no-label-float |
| 137 label="Enter PIN"> |
| 138 </paper-input> |
| 139 <paper-input id="unlockPin2" class="pin" no-label-float |
| 140 label="Re-enter PIN"> |
| 141 </paper-input> |
| 142 <div class="dialog-error"> |
| 189 Your SIM card will be permanently disabled if you cannot enter | 143 Your SIM card will be permanently disabled if you cannot enter |
| 190 the correct PIN Unblocking key. | 144 the correct PIN Unblocking key. |
| 191 </span> | 145 </div> |
| 192 <div class="layout horizontal"> | 146 <div class="dialog-error"> |
| 193 <span class="error" hidden$="[[!showError_(error)]]" | 147 [[getErrorMsg_(error, networkProperties)]] |
| 194 >[[getErrorMsg_(error)]] | |
| 195 </span> | |
| 196 <span>[[getRetriesLeftMsg_(networkProperties)]]</span> | |
| 197 </div> | 148 </div> |
| 198 </div> | 149 </div> |
| 199 </paper-dialog> | 150 <div class="button-container"> |
| 200 | 151 <paper-button on-tap="sendUnlockPuk_">Unlock</paper-button> |
| 152 </div> |
| 153 </dialog> |
| 201 </template> | 154 </template> |
| 202 <script src="network_siminfo.js"></script> | 155 <script src="network_siminfo.js"></script> |
| 203 </dom-module> | 156 </dom-module> |
| OLD | NEW |