85 lines
2.2 KiB
JavaScript
85 lines
2.2 KiB
JavaScript
import { AccountsTemplates } from 'meteor/useraccounts:core';
|
|
|
|
AccountsTemplates.configure({
|
|
forbidClientAccountCreation: true, //Turn off client side account creation. The app is expected to have a feature that will do this.
|
|
showForgotPasswordLink: true,
|
|
defaultTemplate: 'OverrideAtForm',
|
|
//defaultTemplate: 'AuthorizationPage', //The template for all the forms related to logging in or out.
|
|
defaultLayout: 'Login', //What Admin template to place the defaultTemplate in.
|
|
defaultContentRegion: 'content', //The content region of the Admin template to place the defaultTemplate in.
|
|
defaultLayoutRegions: {},
|
|
// defaultLayout: 'Body',
|
|
// defaultContentRegion: 'content',
|
|
// defaultLayoutRegions: {}
|
|
homeRoutePath: '/Admin/InternshipJobs', //The path where the user is taken after logging in successfully.
|
|
texts: {
|
|
title: {
|
|
signIn: ""
|
|
},
|
|
button: {
|
|
signIn: "Enter"
|
|
}
|
|
}
|
|
});
|
|
|
|
// This removes the password field but returns it,
|
|
// so that you can re-add it later, preserving the
|
|
// desired order of the fields
|
|
// let pwd = AccountsTemplates.removeField('password');
|
|
// AccountsTemplates.removeField('email');
|
|
// AccountsTemplates.addFields([
|
|
// {
|
|
// _id: "username",
|
|
// type: "text",
|
|
// displayName: "username",
|
|
// required: true,
|
|
// minLength: 5,
|
|
// },
|
|
// pwd
|
|
// ]);
|
|
let pwd = AccountsTemplates.removeField('password');
|
|
|
|
AccountsTemplates.removeField('email');
|
|
AccountsTemplates.addFields([
|
|
{
|
|
_id: "username",
|
|
type: "text",
|
|
displayName: "username",
|
|
required: true,
|
|
minLength: 5,
|
|
},
|
|
{
|
|
_id: 'email',
|
|
type: 'email',
|
|
required: true,
|
|
displayName: "email",
|
|
re: /.+@(.+){2,}\.(.+){2,}/,
|
|
errStr: 'Invalid email',
|
|
},
|
|
{
|
|
_id: 'username_and_email',
|
|
type: 'text',
|
|
required: true,
|
|
displayName: "Login",
|
|
placeholder: "Login / Email"
|
|
},
|
|
pwd
|
|
]);
|
|
|
|
//AccountsTemplates.configureRoute('signIn', {
|
|
// name: 'signin',
|
|
// path: '/Admin/SignIn'
|
|
//});
|
|
//// AccountsTemplates.configureRoute('signUp', {
|
|
//// name: 'join',
|
|
//// path: '/join'
|
|
//// });
|
|
//AccountsTemplates.configureRoute('forgotPwd', {
|
|
// name: 'forgotPwd',
|
|
// path: '/Admin/ForgotPwd'
|
|
//});
|
|
//AccountsTemplates.configureRoute('resetPwd', {
|
|
// name: 'resetPwd',
|
|
// path: '/Admin/ResetPwd'
|
|
//});
|