prevent non-full name teachers, removed sikka

This commit is contained in:
Kenneth Jao 2017-04-25 03:17:41 -04:00
parent 16aad247f8
commit 4616d1d206
4 changed files with 18 additions and 4 deletions

View File

@ -47,4 +47,3 @@ rajit:bootstrap3-datepicker
hammer:hammer@=2.0.4_1
velocityjs:velocityjs
mystor:device-detection
meteorhacks:sikka

View File

@ -27,7 +27,6 @@ caching-compiler@1.1.8
caching-html-compiler@1.0.7
callback-hook@1.0.10
check@1.2.4
chuangbo:cookie@1.1.0
coffeescript@1.11.1_2
cosmos:browserify@0.10.0
dandv:caret-position@2.1.1
@ -74,8 +73,6 @@ mdg:validation-error@0.5.1
meteor@1.6.0
meteor-base@1.0.4
meteorhacks:meteorx@1.4.1
meteorhacks:picker@1.0.3
meteorhacks:sikka@1.0.1
meteorhacks:unblock@1.1.0
mfactory:admin-lte@0.0.2
minifier-css@1.2.15

View File

@ -555,6 +555,15 @@ Template.createClass.events({
values.code = "";
serverData = values;
if(values.teacher !== "" && values.teacher.split(" ").length < 2) {
sAlert.error("Please enter the full name of the teacher! Ex: Darrin Woods", {
effect: 'stackslide',
position: 'bottom-right',
timeout: 3000
});
return;
}
if (!teachers.findOne({
name: values.teacher
}) && values.teacher !== "") {

View File

@ -193,6 +193,15 @@ Template.profile.events({
values.category = values.category.toLowerCase();
values.code = "";
if(values.teacher !== "" && values.teacher.split(" ").length < 2) {
sAlert.error("Please enter the full name of the teacher! Ex: Darrin Woods", {
effect: 'stackslide',
position: 'bottom-right',
timeout: 3000
});
return;
}
var newClasses = Session.get("newClasses");
var duplicate = false;
for(var i = 0; i < newClasses.length; i++) {