|
|
@ -11,18 +11,12 @@ define([
|
|
|
|
'/common/common-feedback.js',
|
|
|
|
'/common/common-feedback.js',
|
|
|
|
'/common/outer/local-store.js',
|
|
|
|
'/common/outer/local-store.js',
|
|
|
|
'/common/hyperscript.js',
|
|
|
|
'/common/hyperscript.js',
|
|
|
|
'/api/config',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
|
|
|
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
|
|
|
], function ($, Login, Cryptpad, Test, Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h, ApiConfig) {
|
|
|
|
], function ($, Login, Cryptpad, Test, Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h) {
|
|
|
|
var Messages = Cryptpad.Messages;
|
|
|
|
var Messages = Cryptpad.Messages;
|
|
|
|
Messages.register_registrationIsClosed = "REGISTRATION IS CLOSED ON THIS INSTANCE."; // XXX
|
|
|
|
Messages.register_registrationIsClosed = "REGISTRATION IS CLOSED ON THIS INSTANCE."; // XXX
|
|
|
|
$(function () {
|
|
|
|
$(function () {
|
|
|
|
if (ApiConfig.restrictRegistration) {
|
|
|
|
|
|
|
|
return void UI.alert(Messages.register_registrationIsClosed); // XXX restricted-registration better UI ?
|
|
|
|
|
|
|
|
// remove the form and display text instead of an alert that people will probably dismiss?
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LocalStore.isLoggedIn()) {
|
|
|
|
if (LocalStore.isLoggedIn()) {
|
|
|
|
// already logged in, redirect to drive
|
|
|
|
// already logged in, redirect to drive
|
|
|
|
document.location.href = '/drive/';
|
|
|
|
document.location.href = '/drive/';
|
|
|
|