| OLD | NEW |
| 1 /* Copyright 2015 The Chromium Authors. All rights reserved. | 1 /* Copyright 2015 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 | 5 |
| 6 Polymer('gaia-input-form', (function() { | 6 Polymer('gaia-input-form', (function() { |
| 7 var INPUT_EMAIL_PATTERN = "^[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+(@[^\\s@]+)?$"; | 7 var INPUT_EMAIL_PATTERN = "^[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+(@[^\\s@]+)?$"; |
| 8 | 8 |
| 9 return { | 9 return { |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 checkValidity: function() { | 50 checkValidity: function() { |
| 51 var input = this.$.inputForm; | 51 var input = this.$.inputForm; |
| 52 var isValid = input.validity.valid; | 52 var isValid = input.validity.valid; |
| 53 this.setValid(isValid); | 53 this.setValid(isValid); |
| 54 return isValid; | 54 return isValid; |
| 55 }, | 55 }, |
| 56 | 56 |
| 57 setValid: function(isValid) { | 57 setValid: function(isValid) { |
| 58 this.$.paperInputDecorator.isInvalid = !isValid; | 58 this.$.paperInputDecorator.isInvalid = !isValid; |
| 59 } | 59 }, |
| 60 |
| 61 set disabled(value) { |
| 62 this.$.inputForm.disabled = value; |
| 63 var controls = this.querySelectorAll(':host /deep/ [role="button"]'); |
| 64 for (var i = 0, control; control = controls[i]; ++i) { |
| 65 control.disabled = value; |
| 66 } |
| 67 }, |
| 60 }; | 68 }; |
| 61 })()); | 69 })()); |
| OLD | NEW |