OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 Polymer({ | 5 Polymer({ |
6 is: 'saml-interstitial', | 6 is: 'saml-interstitial', |
7 | 7 |
8 properties: { | 8 properties: { |
9 changeAccountLink: { | 9 changeAccountLink: { |
10 type: HTMLElement, | 10 type: HTMLElement, |
11 }, | 11 }, |
12 | 12 |
13 domain: { | 13 domain: {type: String, observer: 'onDomainChanged_'}, |
14 type: String, | |
15 observer: 'onDomainChanged_' | |
16 }, | |
17 | 14 |
18 showDomainMessages_: { | 15 showDomainMessages_: {type: Boolean, value: false} |
19 type: Boolean, | |
20 value: false | |
21 } | |
22 }, | 16 }, |
23 ready: function() { | 17 ready: function() { |
24 this.changeAccountLink = this.$.changeAccountLink; | 18 this.changeAccountLink = this.$.changeAccountLink; |
25 }, | 19 }, |
26 submit: function() { | 20 submit: function() { |
27 this.$.samlInterstitialForm.submit(); | 21 this.$.samlInterstitialForm.submit(); |
28 }, | 22 }, |
29 onDomainChanged_: function() { | 23 onDomainChanged_: function() { |
30 this.$.managedBy.textContent = | 24 this.$.managedBy.textContent = |
31 loadTimeData.getStringF('enterpriseInfoMessage', this.domain); | 25 loadTimeData.getStringF('enterpriseInfoMessage', this.domain); |
32 this.$.message.content = | 26 this.$.message.content = |
33 loadTimeData.getStringF('samlInterstitialMessage', this.domain); | 27 loadTimeData.getStringF('samlInterstitialMessage', this.domain); |
34 this.showDomainMessages_ = !!this.domain.length; | 28 this.showDomainMessages_ = !!this.domain.length; |
35 }, | 29 }, |
36 onSamlPageNextClicked_: function() { | 30 onSamlPageNextClicked_: function() { |
37 this.fire('samlPageNextClicked'); | 31 this.fire('samlPageNextClicked'); |
38 }, | 32 }, |
39 onSamlPageChangeAccountClicked_: function() { | 33 onSamlPageChangeAccountClicked_: function() { |
40 this.fire('samlPageChangeAccountClicked'); | 34 this.fire('samlPageChangeAccountClicked'); |
41 } | 35 } |
42 }); | 36 }); |
OLD | NEW |