Fix HTML errors on empty fields. Move roomnumber to address section.

This commit is contained in:
Kevin McCarthy 2007-10-19 09:18:51 -07:00
parent fd8690dd63
commit c4bd800b37
3 changed files with 35 additions and 33 deletions

View File

@ -413,6 +413,18 @@ from ipagui.helpers import ipahelper
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.roomnumber.field_id}"
py:content="user.roomnumber.label" />:
</th>
<td>
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
py:content="tg.errors.get('roomnumber')" />
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.l.field_id}"
@ -510,18 +522,6 @@ from ipagui.helpers import ipahelper
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.roomnumber.field_id}"
py:content="user.roomnumber.label" />:
</th>
<td>
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
py:content="tg.errors.get('roomnumber')" />
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.secretary.field_id}"

View File

@ -401,6 +401,18 @@ from ipagui.helpers import ipahelper
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.roomnumber.field_id}"
py:content="user.roomnumber.label" />:
</th>
<td>
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
py:content="tg.errors.get('roomnumber')" />
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.l.field_id}"
@ -498,18 +510,6 @@ from ipagui.helpers import ipahelper
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.roomnumber.field_id}"
py:content="user.roomnumber.label" />:
</th>
<td>
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
py:content="tg.errors.get('roomnumber')" />
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" for="${user.secretary.field_id}"

View File

@ -125,7 +125,8 @@ else:
<th>
<label class="fieldlabel" py:content="fields.mail.label" />:
</th>
<td><a href="mailto:${user.get('mail')}">${user.get("mail")}</a></td>
<td><a py:if="user.get('mail')"
href="mailto:${user.get('mail')}">${user.get("mail")}</a></td>
</tr>
<tr>
<th>
@ -167,6 +168,12 @@ else:
</th>
<td>${user.get("street")}</td>
</tr>
<tr>
<th>
<label class="fieldlabel" py:content="fields.roomnumber.label" />:
</th>
<td>${user.get("roomnumber")}</td>
</tr>
<tr>
<th>
<label class="fieldlabel" py:content="fields.l.label" />:
@ -222,12 +229,6 @@ else:
>${user_manager.givenname} ${user_manager.sn}</a>
</td>
</tr>
<tr>
<th>
<label class="fieldlabel" py:content="fields.roomnumber.label" />:
</th>
<td>${user.get("roomnumber")}</td>
</tr>
<tr>
<th>
<label class="fieldlabel" py:content="fields.secretary.label" />:
@ -249,13 +250,14 @@ else:
<label class="fieldlabel" py:content="fields.labeleduri.label" />:
</th>
<td>
<a href="${user.get('labeleduri')}">${user.get('labeleduri')}</a>
<a py:if="user.get('labeleduri')"
href="${user.get('labeleduri')}">${user.get('labeleduri')}</a>
</td>
</tr>
</table>
<div class="formsection" py:if='len(user_reports) &gt; 0'>Direct Reports</div>
<ol>
<ol py:if="len(user_reports) &gt; 0">
<li py:for="report in user_reports">
<a href="${tg.url('/user/show', uid=report.uid)}"
>${report.givenname} ${report.sn}</a>