kopia lustrzana https://github.com/backface/turtlestitch
rodzic
b5ddbfbc75
commit
6c07875d04
7
cloud.js
7
cloud.js
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
|
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
|
||||||
|
|
||||||
modules.cloud = '2013-May-06';
|
modules.cloud = '2013-May-10';
|
||||||
|
|
||||||
// Global stuff
|
// Global stuff
|
||||||
|
|
||||||
|
@ -180,7 +180,6 @@ Cloud.prototype.getPublicProject = function (
|
||||||
|
|
||||||
Cloud.prototype.resetPassword = function (
|
Cloud.prototype.resetPassword = function (
|
||||||
username,
|
username,
|
||||||
email,
|
|
||||||
callBack,
|
callBack,
|
||||||
errorCall
|
errorCall
|
||||||
) {
|
) {
|
||||||
|
@ -193,9 +192,7 @@ Cloud.prototype.resetPassword = function (
|
||||||
(this.hasProtocol() ? '' : 'http://')
|
(this.hasProtocol() ? '' : 'http://')
|
||||||
+ this.url + 'ResetPW'
|
+ this.url + 'ResetPW'
|
||||||
+ '&Username='
|
+ '&Username='
|
||||||
+ encodeURIComponent(username)
|
+ encodeURIComponent(username),
|
||||||
+ '&Email='
|
|
||||||
+ email,
|
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
request.setRequestHeader(
|
request.setRequestHeader(
|
||||||
|
|
6
gui.js
6
gui.js
|
@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2013-May-06';
|
modules.gui = '2013-May-10';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -3086,12 +3086,12 @@ IDE_Morph.prototype.resetCloudPassword = function () {
|
||||||
function (user) {
|
function (user) {
|
||||||
SnapCloud.resetPassword(
|
SnapCloud.resetPassword(
|
||||||
user.username,
|
user.username,
|
||||||
user.email,
|
|
||||||
function (txt, title) {
|
function (txt, title) {
|
||||||
new DialogBoxMorph().inform(
|
new DialogBoxMorph().inform(
|
||||||
title,
|
title,
|
||||||
txt +
|
txt +
|
||||||
'.\n\nAn e-mail with your password\n' +
|
'.\n\nAn e-mail with a link to\n' +
|
||||||
|
'reset your password\n' +
|
||||||
'has been sent to the address provided',
|
'has been sent to the address provided',
|
||||||
world,
|
world,
|
||||||
myself.cloudIcon(null, new Color(0, 180, 0))
|
myself.cloudIcon(null, new Color(0, 180, 0))
|
||||||
|
|
|
@ -1696,3 +1696,7 @@ ______
|
||||||
130506
|
130506
|
||||||
------
|
------
|
||||||
* Reset Password feature (frontend only)
|
* Reset Password feature (frontend only)
|
||||||
|
|
||||||
|
130510
|
||||||
|
------
|
||||||
|
* Reset Password via e-mailed link (frontend only)
|
||||||
|
|
14
widgets.js
14
widgets.js
|
@ -73,7 +73,7 @@ newCanvas, StringMorph, Morph, TextMorph, nop, detect, StringFieldMorph,
|
||||||
HTMLCanvasElement, fontHeight, SymbolMorph, localize, SpeechBubbleMorph,
|
HTMLCanvasElement, fontHeight, SymbolMorph, localize, SpeechBubbleMorph,
|
||||||
ArrowMorph, MenuMorph, isString, isNil, SliderMorph*/
|
ArrowMorph, MenuMorph, isString, isNil, SliderMorph*/
|
||||||
|
|
||||||
modules.widgets = '2013-May-06';
|
modules.widgets = '2013-May-10';
|
||||||
|
|
||||||
var PushButtonMorph;
|
var PushButtonMorph;
|
||||||
var ToggleButtonMorph;
|
var ToggleButtonMorph;
|
||||||
|
@ -1827,9 +1827,6 @@ DialogBoxMorph.prototype.promptCredentials = function (
|
||||||
if (purpose === 'resetPassword') {
|
if (purpose === 'resetPassword') {
|
||||||
inp.add(labelText('User name:'));
|
inp.add(labelText('User name:'));
|
||||||
inp.add(usr);
|
inp.add(usr);
|
||||||
emlLabel = labelText('E-mail address:');
|
|
||||||
inp.add(emlLabel);
|
|
||||||
inp.add(eml);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg) {
|
if (msg) {
|
||||||
|
@ -1922,7 +1919,7 @@ DialogBoxMorph.prototype.promptCredentials = function (
|
||||||
} else if (purpose === 'changePassword') {
|
} else if (purpose === 'changePassword') {
|
||||||
checklist = [opw, pw1, pw2];
|
checklist = [opw, pw1, pw2];
|
||||||
} else if (purpose === 'resetPassword') {
|
} else if (purpose === 'resetPassword') {
|
||||||
checklist = [usr, eml];
|
checklist = [usr];
|
||||||
}
|
}
|
||||||
|
|
||||||
empty = detect(
|
empty = detect(
|
||||||
|
@ -1956,13 +1953,6 @@ DialogBoxMorph.prototype.promptCredentials = function (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (purpose === 'resetPassword') {
|
|
||||||
if (em.indexOf(' ') > -1 || em.indexOf('@') === -1
|
|
||||||
|| em.indexOf('.') === -1) {
|
|
||||||
indicate(eml, 'please provide a valid\nemail address');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (purpose === 'signup') {
|
if (purpose === 'signup') {
|
||||||
if (!agree) {
|
if (!agree) {
|
||||||
indicate(chk, 'please agree to\nthe TOS');
|
indicate(chk, 'please agree to\nthe TOS');
|
||||||
|
|
Ładowanie…
Reference in New Issue