Skip to content

Instantly share code, notes, and snippets.

// Will the following two functions return the same thing?
function foo1()
{
return {
bar: "hello"
};
}
function foo2()
diff --git a/template/tenxer/shared/macros/forms.html b/template/tenxer/shared/macros/forms.html
index 5e68dfb..5450da4 100644
--- a/template/tenxer/shared/macros/forms.html
+++ b/template/tenxer/shared/macros/forms.html
@@ -201,14 +201,16 @@
{{ option(field, attrs=attr, label=group.1) }}
{% else %}
<optgroup label="{{ group.0 }}">
- {% for choice in group.1 %}
- {% if (fvalue|string == choice.0|string) or (fvalue is iterable and choice.0|string in fvalue|map('string')) %}