mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
FormBuilder split out
This commit is contained in:
parent
f1d2e0e6df
commit
34e35bd00b
5 changed files with 40 additions and 24 deletions
|
@ -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("====================");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue