|
|
@ -58,7 +58,6 @@ define([
|
|
|
|
// checkboxes
|
|
|
|
// checkboxes
|
|
|
|
var $checkImport = $('#import-recent');
|
|
|
|
var $checkImport = $('#import-recent');
|
|
|
|
var $checkAcceptTerms = $('#accept-terms');
|
|
|
|
var $checkAcceptTerms = $('#accept-terms');
|
|
|
|
var $checkPromise = $('#promise');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $register = $('button#register');
|
|
|
|
var $register = $('button#register');
|
|
|
|
|
|
|
|
|
|
|
@ -69,7 +68,6 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var shouldImport = $checkImport[0].checked;
|
|
|
|
var shouldImport = $checkImport[0].checked;
|
|
|
|
var doesAccept = $checkAcceptTerms[0].checked;
|
|
|
|
var doesAccept = $checkAcceptTerms[0].checked;
|
|
|
|
var doesPromise = $checkPromise[0].checked;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* basic validation */
|
|
|
|
/* basic validation */
|
|
|
|
if (passwd !== confirmPassword) { // do their passwords match?
|
|
|
|
if (passwd !== confirmPassword) { // do their passwords match?
|
|
|
@ -80,9 +78,9 @@ define([
|
|
|
|
return void Cryptpad.alert(Messages.register_mustAcceptTerms);
|
|
|
|
return void Cryptpad.alert(Messages.register_mustAcceptTerms);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!doesPromise) { // do they promise to remember their password?
|
|
|
|
Cryptpad.confirm("<h2 class='bright'>" + Messages.register_warning + "</h2>",
|
|
|
|
return void Cryptpad.alert(Messages.register_mustRememberPass);
|
|
|
|
function (yes) {
|
|
|
|
}
|
|
|
|
if (!yes) { return; }
|
|
|
|
|
|
|
|
|
|
|
|
Cryptpad.addLoadingScreen(Messages.login_hashing);
|
|
|
|
Cryptpad.addLoadingScreen(Messages.login_hashing);
|
|
|
|
Login.loginOrRegister(uname, passwd, true, function (err, result) {
|
|
|
|
Login.loginOrRegister(uname, passwd, true, function (err, result) {
|
|
|
@ -136,6 +134,15 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
ok: Messages.register_writtenPassword, //'I have written down my password, proceed',
|
|
|
|
|
|
|
|
cancel: Messages.register_cancel, // 'Go back',
|
|
|
|
|
|
|
|
cancelClass: 'safe',
|
|
|
|
|
|
|
|
okClass: 'danger',
|
|
|
|
|
|
|
|
reverseOrder: true,
|
|
|
|
|
|
|
|
}, true, function ($dialog) {
|
|
|
|
|
|
|
|
$dialog.find('> div').addClass('half');
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|