10 lines
271 B
JavaScript
10 lines
271 B
JavaScript
/**
|
|
* Helper for setting checkboxes as checked or unchecked inside templates,
|
|
* based on another variable's value
|
|
*/
|
|
UI.registerHelper("inlineIf", function (value, match, attributeName) {
|
|
if(value === match) {
|
|
return attributeName;
|
|
}
|
|
return '';
|
|
}); |