2016-01-13 11:50:07 +01:00
|
|
|
/**
|
|
|
|
|
* 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 '';
|
2016-01-13 16:17:32 +01:00
|
|
|
});
|