2 name: "blerg.AccountCenter",
4 {tag: 'h2', content: "Change Password"},
5 {kind: "blerg.PasswdForm"},
6 {tag: 'h2', content: "Generate recovery link"},
7 {content: "A recovery link is a URL that will allow you to reset the password on your account at a later time. Whoever has this link will be able to gain control of your account. This link should be kept in a safe place like an encrypted password manager or a physical piece of paper locked in a safe. The link will expire after one year or the next password change (either via a recovery link or by changing it manually above). To indicate that you understand this, please copy <code>blërg</code> into the textbox below.", tag: 'p', allowHtml: true},
8 {tag: 'form', onsubmit: 'generateRecoveryLink', components: [
9 {kind: 'onyx.InputDecorator', classes: "recovery", components: [
10 {kind: 'onyx.Input', name: "recoveryVerifier"}
12 {kind: 'onyx.Button', content: "Generate", classes: "recovery", onclick: "generateRecoveryLink"}
14 {tag: 'p', name: 'recoveryLinkOutput', classes: 'recovery'}
17 locationDetect: function(l) {
18 var m = l.hash.match(/^#\/account$/);
21 kind: 'blerg.AccountCenter'
27 this.inherited(arguments);
28 this.bubble('onSetTitle', {section: 'Account Center'});
30 generateRecoveryLink: function(inSender, inEvent) {
31 if (this.$.recoveryVerifier.getValue() != 'blërg') {
32 this.$.recoveryLinkOutput.setContent('Please read the text above');
36 var req = new enyo.Ajax({
37 url: '/aux/recovery/new',
41 req.response(this, function(inSender, inResponse) {
42 this.$.recoveryLinkOutput.setContent(inResponse);
45 req.error(this, function(inSender, inResponse) {
46 this.$.recoveryLinkOutput.setContent('Failed: ' + req.xhrResponse.status);