Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Reverted a previous change which breaks setting condtionals in readon…
Browse files Browse the repository at this point in the history
…ly mode.

Rember that I worked on it but wondering what I wanted to do. This change
breaks the readonly functionallity.
  • Loading branch information
toirl committed Nov 22, 2016
1 parent b942c33 commit e0ff142
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions formbar/templates/form.mako
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@
if is_active:
css_class = "active"
else:
css_class = "inactive {}".format(child.attrib.get('type'))
css_class = "inactive"
%>
<div id="${id(child)}" class="formbar-conditional ${css_class}" reset-value="${child.attrib.get('reset-value', 'false')}" expr="${child.attrib.get('expr')}">
% if not is_readonly:
<div id="${id(child)}" class="formbar-conditional ${child.attrib.get('type')} ${css_class}" reset-value="${child.attrib.get('reset-value', 'false')}" expr="${child.attrib.get('expr')}" style="${ '' if is_active else 'display:none' }">
% else:
<div id="${id(child)}" class="formbar-conditional ${child.attrib.get('type')} ${css_class}" reset-value="${child.attrib.get('reset-value', 'false')}" expr="${child.attrib.get('expr')}">
% endif
% elif child.tag == "html":
${ElementTree.tostring(child) | n}
% endif
Expand Down

0 comments on commit e0ff142

Please sign in to comment.