mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Notifications wired up server sided
This commit is contained in:
parent
3f44339381
commit
e9bf78a97d
57 changed files with 977 additions and 951 deletions
19
UI/Form/CheckboxTemplate.html
Normal file
19
UI/Form/CheckboxTemplate.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label">{{label}}</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="fields.{{order}}.value"/>
|
||||
<p>
|
||||
<span>On</span>
|
||||
<span>Off</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"></div>
|
||||
</label>
|
||||
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="{{helpText}}"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
10
UI/Form/TextboxTemplate.html
Normal file
10
UI/Form/TextboxTemplate.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label">{{label}}</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" name="fields.{{order}}.value"/>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="{{helpText}}"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -7,6 +7,14 @@ 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']);
|
||||
}
|
||||
|
||||
return Handlebars.helpers.partial.apply(this, ['Form/TextboxTemplate']);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("debug", function(optionalValue) {
|
||||
console.log("Current Context");
|
||||
console.log("====================");
|
||||
|
|
|
@ -22,15 +22,6 @@
|
|||
</div>
|
||||
|
||||
{{#each fields}}
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{label}}</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" name="fields.{{@index}}.value"/>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="{{helpText}}"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{formField}}
|
||||
{{/each}}
|
||||
</fieldset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue