Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added sanity check
If you input the wrong module, the system will let it pass but it will not be visible - the result is that you will have claims for the wrong module you cannot delete. And you cannot claim for the correct module because the wrong module will put too many hours in the system.
  • Loading branch information
blackening committed Jul 16, 2014
commit d7b4558738f8da07f47758a24bbb8b7ba5dce1fb
6 changes: 6 additions & 0 deletions claims/claim.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,11 @@ Claim.prototype.makeAllClaims = function() {
}
}

//sanity check
if($('h3:contains("Module")').text().substr(8) != config.module){
alert("Ensure that the module in config matches that of this page.") //else you will have invisible claims taking up your time.
throw new Error("Incorrect module in config.");
}

var c = new Claim(config);
// c.makeAllClaims();