FormBuilder split out

This commit is contained in:
Mark McDowall 2013-05-21 20:33:35 -07:00
commit 34e35bd00b
5 changed files with 40 additions and 24 deletions

View file

@ -7,22 +7,6 @@ Handlebars.registerHelper('partial', function (templateName) {
return new Handlebars.SafeString(templateFunction(this));
});
Handlebars.registerHelper('formField', function () {
if (!this.type) {
return Handlebars.helpers.partial.apply(this, ['Form/TextboxTemplate']);
}
if (this.type === 'password') {
return Handlebars.helpers.partial.apply(this, ['Form/PasswordTemplate']);
}
if (this.type === 'checkbox') {
return Handlebars.helpers.partial.apply(this, ['Form/CheckboxTemplate']);
}
return Handlebars.helpers.partial.apply(this, ['Form/TextboxTemplate']);
});
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");