The dialog controller doesn't appreciate getting
a bare boolean as a message, so if the current item
is a boolean call toString() on it before calling
the egConfirmDialog.
An <Unset> string is also added to the reporter
strings for further use, but if there are no
strong feelings re: using it, it can be dumped and
a '' used in its place.
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
s.TEMPLATE_CONF_NOT_IN = '[% l( "Field does not match one of list (comma separated):") %]';
s.TEMPLATE_CONF_IN = '[% l( "Field matches one of list (comma separated):") %]';
s.TEMPLATE_CONF_DEFAULT = '[% l( "Value:") %]';
+s.TEMPLATE_CONF_UNSET = '<[% l( "Unset") %]>';
s.TEMPLATE_CONF_CONFIRM_SAVE = '[% l( "Save Template?") %]';
s.TEMPLATE_CONF_SUCCESS_SAVE = '[% l( "Template was successfully saved.") %]';
s.TEMPLATE_CONF_FAIL_SAVE = '[% l( "Template save failed.") %]';
var l = null;
console.log(item);
if (item.datatype == "bool") {
- egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, item.value || '',
+ egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, (typeof item.value === "undefined" ? egCore.strings.TEMPLATE_CONF_UNSET : item.value.toString()),
{ok : function() {
egReportTemplateSvc.filter_fields[item.index].value = true;
},