Skip to content

Commit 9c3732c

Browse files
author
Alexander Smishlajev
committed
better rendering when not editable - based on patches by Tobias Herp
1 parent f5fecd8 commit 9c3732c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

templates/classic/html/user.item.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
<th class="required" i18n:translate="">Login Name</th>
4444
<td tal:content="structure context/username/field">username</td>
4545
</tr>
46-
<tr>
46+
<tr tal:condition="context/is_edit_ok">
4747
<th i18n:translate="">Login Password</th>
4848
<td tal:content="structure context/password/field">password</td>
4949
</tr>
50-
<tr>
50+
<tr tal:condition="context/is_edit_ok">
5151
<th i18n:translate="">Confirm Password</th>
5252
<td tal:content="structure context/password/confirm">password</td>
5353
</tr>
@@ -81,14 +81,18 @@
8181
</tr>
8282
<tr>
8383
<th class="required" i18n:translate="">E-mail address</th>
84-
<td tal:content="structure context/address/field">address</td>
84+
<td tal:define="mailto context/address/field">
85+
<a tal:condition="not:context/is_edit_ok"
86+
tal:attributes="href string:mailto:${mailto}" tal:content="mailto"
87+
/><span tal:condition="context/is_edit_ok" tal:replace="structure mailto" />
88+
</td>
8589
</tr>
8690
<tr>
8791
<th i18n:translate="">Alternate E-mail addresses<br>One address per line</th>
8892
<td tal:content="structure context/alternate_addresses/multiline">alternate_addresses</td>
8993
</tr>
9094

91-
<tr>
95+
<tr tal:condition="context/is_edit_ok">
9296
<td>
9397
&nbsp;
9498
<input type="hidden" name="@template" value="item">

0 commit comments

Comments
 (0)