mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
handlebars and templates are loaded with require.js
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
'use strict';
|
||||
define(['app'], function () {
|
||||
Handlebars.registerHelper('formBuilder', function (){
|
||||
define(['app', 'handlebars'], function (App,Handlebars) {
|
||||
Handlebars.registerHelper('formBuilder', function () {
|
||||
var ret = "";
|
||||
_.each(this.fields, function(field){
|
||||
_.each(this.fields, function (field) {
|
||||
ret += NzbDrone.Form.FieldBuilder(field);
|
||||
});
|
||||
|
||||
return new Handlebars.SafeString(ret);
|
||||
});
|
||||
|
||||
NzbDrone.Form.FieldBuilder = function(field) {
|
||||
NzbDrone.Form.FieldBuilder = function (field) {
|
||||
if (!field.type) {
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/TextboxTemplate']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user