NIHVIVO-194 First draft of educational background form. Degree select doesn't get populated, so committing now so BrianC can take a look.
This commit is contained in:
parent
d3621d8b5b
commit
8f67bb1fb3
1 changed files with 14 additions and 1 deletions
|
@ -2,4 +2,17 @@
|
||||||
|
|
||||||
String.prototype.capitalize = function() {
|
String.prototype.capitalize = function() {
|
||||||
return this.substring(0,1).toUpperCase() + this.substring(1);
|
return this.substring(0,1).toUpperCase() + this.substring(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
String.prototype.capitalizeWords = function() {
|
||||||
|
var words = this.split(/\s+/),
|
||||||
|
wordCount = words.length,
|
||||||
|
i,
|
||||||
|
newWords = [];
|
||||||
|
|
||||||
|
for (i = 0; i < wordCount; i++) {
|
||||||
|
newWords.push(words[i].capitalize());
|
||||||
|
}
|
||||||
|
|
||||||
|
return newWords.join(' ');
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue