Initial commit. Modified the Meteor todos app to create the Petit Teton data tracking app. Has working data for sales. Requires a Mongo database.
This commit is contained in:
68
imports/startup/both/accounts.js
Normal file
68
imports/startup/both/accounts.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import { AccountsTemplates } from 'meteor/useraccounts:core';
|
||||
|
||||
AccountsTemplates.configure({
|
||||
forbidClientAccountCreation: true,
|
||||
showForgotPasswordLink: true,
|
||||
defaultTemplate: 'atForm',
|
||||
defaultLayout: 'Full',
|
||||
defaultContentRegion: 'content',
|
||||
defaultLayoutRegions: {}
|
||||
// defaultTemplate: 'Auth_page',
|
||||
// defaultLayout: 'Body',
|
||||
// defaultContentRegion: 'content',
|
||||
// defaultLayoutRegions: {}
|
||||
});
|
||||
|
||||
// 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',
|
||||
},
|
||||
pwd
|
||||
]);
|
||||
|
||||
|
||||
AccountsTemplates.configureRoute('signIn', {
|
||||
name: 'signin',
|
||||
path: '/signin'
|
||||
});
|
||||
|
||||
// AccountsTemplates.configureRoute('signUp', {
|
||||
// name: 'join',
|
||||
// path: '/join'
|
||||
// });
|
||||
|
||||
AccountsTemplates.configureRoute('forgotPwd');
|
||||
|
||||
AccountsTemplates.configureRoute('resetPwd', {
|
||||
name: 'resetPwd',
|
||||
path: '/reset-password',
|
||||
});
|
||||
1
imports/startup/both/index.js
Normal file
1
imports/startup/both/index.js
Normal file
@@ -0,0 +1 @@
|
||||
import './accounts.js';
|
||||
Reference in New Issue
Block a user