Fixed javascript error occuring on "match-type" selection change.

see #139
This commit is contained in:
Antoine Nguyen
2011-07-04 09:11:23 +02:00
parent db24deb216
commit 2ff4e01f6d
2 changed files with 7 additions and 7 deletions
@@ -77,11 +77,11 @@ $(document).addEvent("domready", function() {
<div class="spacer"></div>
</div>
<div class="spacer"></div>
{% if hideconds %}<div id="hide" style="display:none">{% endif %}
{% for ec in conds_nb %}
{% display_condition form ec %}
{% endfor %}
{% if hideconds %}</div>{% endif %}
<div id="hide" style="display:{{ hidestyle }}">
{% for ec in conds_nb %}
{% display_condition form ec %}
{% endfor %}
</div>
</div>
<h2>{% trans "Actions" %}</h2>
<div id="actionlist">
+2 -2
View File
@@ -130,8 +130,8 @@ def editfilter(request, setname, fname, tplname="sievefilters/filter.html"):
form = build_filter_form_from_filter(request, fname, f)
ctx = build_filter_ctx(ctx, form)
ctx["oldname"] = fname
if form.fields["match_type"].initial == "all":
ctx["hideconds"] = True
ctx["hidestyle"] = "none" \
if form.fields["match_type"].initial == "all" else "block"
return _render(request, tplname, ctx)
@login_required