| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 // The GUID of the loaded credit card. | 8 // The GUID of the loaded credit card. |
| 9 var guid; | 9 var guid; |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 * @private | 61 * @private |
| 62 */ | 62 */ |
| 63 saveCreditCard_: function() { | 63 saveCreditCard_: function() { |
| 64 var creditCard = new Array(5); | 64 var creditCard = new Array(5); |
| 65 creditCard[0] = this.guid; | 65 creditCard[0] = this.guid; |
| 66 creditCard[1] = $('nameOnCard').value; | 66 creditCard[1] = $('nameOnCard').value; |
| 67 creditCard[2] = $('creditCardNumber').value; | 67 creditCard[2] = $('creditCardNumber').value; |
| 68 creditCard[3] = $('expirationMonth').value; | 68 creditCard[3] = $('expirationMonth').value; |
| 69 creditCard[4] = $('expirationYear').value; | 69 creditCard[4] = $('expirationYear').value; |
| 70 | 70 |
| 71 chrome.send('updateCreditCard', creditCard); | 71 chrome.send('setCreditCard', creditCard); |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Connects each input field to the inputFieldChanged_() method that enables | 75 * Connects each input field to the inputFieldChanged_() method that enables |
| 76 * or disables the 'Ok' button based on whether all the fields are empty or | 76 * or disables the 'Ok' button based on whether all the fields are empty or |
| 77 * not. | 77 * not. |
| 78 * @private | 78 * @private |
| 79 */ | 79 */ |
| 80 connectInputEvents_: function() { | 80 connectInputEvents_: function() { |
| 81 var self = this; | 81 var self = this; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 AutoFillEditCreditCardOverlay.setTitle = function(title) { | 195 AutoFillEditCreditCardOverlay.setTitle = function(title) { |
| 196 $('autoFillCreditCardTitle').textContent = title; | 196 $('autoFillCreditCardTitle').textContent = title; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 // Export | 199 // Export |
| 200 return { | 200 return { |
| 201 AutoFillEditCreditCardOverlay: AutoFillEditCreditCardOverlay | 201 AutoFillEditCreditCardOverlay: AutoFillEditCreditCardOverlay |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 }); | 204 }); |
| OLD | NEW |