Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/browser/resources/chromeos/login/active_directory_password_change.js

Issue 2602973002: Add Active Directory password change screen. (Closed)
Patch Set: Addressing Michael's comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Polymer element for Active Directory password change screen.
7 */
8 Polymer({
9 is: 'active-directory-password-change',
10
11 properties: {
12 /**
13 * The user principal name.
14 */
15 username: String,
16 },
17
18 /** @public */
19 reset: function() {
20 this.$.animatedPages.selected = 0;
21 this.$.oldPassword.value = '';
22 this.$.newPassword1.value = '';
23 this.$.newPassword2.value = '';
24 this.updateNavigation_();
25 },
26
27 /** @private */
28 computeWelcomeMessage_: function(username) {
29 return loadTimeData.getStringF('adPasswordChangeMessage', username);
30 },
31
32 /** @private */
33 onSubmit_: function() {
34 if (!this.$.oldPassword.checkValidity() ||
35 !this.$.newPassword1.checkValidity()) {
36 return;
37 }
38 if (this.$.newPassword1.value != this.$.newPassword2.value) {
39 this.$.newPassword2.isInvalid = true;
40 return;
41 }
42 this.$.animatedPages.selected++;
43 this.updateNavigation_();
44 var msg = {
45 'username': this.username,
46 'oldPassword': this.$.oldPassword.value,
47 'newPassword': this.$.newPassword1.value,
48 };
49 this.$.oldPassword.value = '';
50 this.$.newPassword1.value = '';
51 this.$.newPassword2.value = '';
52 this.fire('authCompleted', msg);
53 },
54
55 /** @private */
56 onClose_: function() {
57 if (!this.$.navigation.closeVisible)
58 return;
59 this.fire('cancel');
60 },
61
62 /** @private */
63 updateNavigation_: function() {
64 this.$.navigation.closeVisible = (this.$.animatedPages.selected == 0);
65 },
66 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698