Skip to content

Commit

Permalink
Fixed compatibility with changed repeat syntax.
Browse files Browse the repository at this point in the history
Fixes #94.
  • Loading branch information
mauritsvanrees committed Aug 28, 2020
1 parent 7b1f92e commit 7662c70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ CHANGES
3.7.1 (unreleased)
------------------

- Nothing changed yet.
- Fixed compatibility with changed repeat syntax.
Fixes `issue 94 <https://github.com/zopefoundation/z3c.form/issues/94>`_.


3.7.0 (2019-05-22)
Expand Down
3 changes: 2 additions & 1 deletion src/z3c/form/browser/multi_display.pt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<tal:block repeat="widget view/widgets">
<div id="" class="row"
tal:attributes="id string:${widget/id}-row"
tal:define="key_widget python:view.key_widgets[repeat['widget'].index()];"
tal:define="index repeat/widget/index;
key_widget python:view.key_widgets[index];"
tal:condition="python:widget.mode != 'hidden'">
<metal:block define-macro="widget-row">
<tal:block condition="python: key_widget is not None">
Expand Down
3 changes: 2 additions & 1 deletion src/z3c/form/browser/multi_hidden.pt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"
tal:omit-tag="">
<tal:block repeat="widget view/widgets"><tal:block
define="key_widget python:view.key_widgets[repeat['widget'].index()];">
define="index repeat/widget/index;
key_widget python:view.key_widgets[index];">
<metal:block define-macro="widget-row">
<div tal:replace="structure key_widget/render" tal:condition="python: key_widget is not None">
<input size="24" value="" type="text" />
Expand Down
3 changes: 2 additions & 1 deletion src/z3c/form/browser/multi_input.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<div id="" class="row"
tal:attributes="id string:${widget/id}-row"
tal:condition="python:widget.mode != 'hidden'"
tal:define="key_widget python:view.key_widgets[repeat['widget'].index()];">
tal:define="index repeat/widget/index;
key_widget python:view.key_widgets[index];">
<metal:block define-macro="widget-row">
<tal:condition tal:condition="key_widget/id|nothing">
<div class="label" tal:condition="view/showLabel">
Expand Down

0 comments on commit 7662c70

Please sign in to comment.