[gen] Bugfix: do not show the Calendar widget (search and edit layouts) if field.calendar is False.
This commit is contained in:
parent
049ddb20b4
commit
97ddf7a2c4
|
@ -373,7 +373,6 @@ class ToolMixin(BaseMixin):
|
||||||
params['UID'] = getattr(refObject, refField.name).data
|
params['UID'] = getattr(refObject, refField.name).data
|
||||||
# Use index "Allowed" if noSecurity is False
|
# Use index "Allowed" if noSecurity is False
|
||||||
if not noSecurity: params['Allowed'] = self.getAllowedValue()
|
if not noSecurity: params['Allowed'] = self.getAllowedValue()
|
||||||
print params
|
|
||||||
brains = self.getPath("/catalog")(**params)
|
brains = self.getPath("/catalog")(**params)
|
||||||
if brainsOnly:
|
if brainsOnly:
|
||||||
# Return brains only.
|
# Return brains only.
|
||||||
|
|
|
@ -40,9 +40,11 @@
|
||||||
tal:content="year"></option>
|
tal:content="year"></option>
|
||||||
</select>
|
</select>
|
||||||
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
||||||
<input type="hidden" tal:attributes="id name; name name"/>
|
<tal:calendar condition="widget/calendar">
|
||||||
<img tal:attributes="id string:${name}_img; src string: $appUrl/ui/calendar.gif"/>
|
<input type="hidden" tal:attributes="id name; name name"/>
|
||||||
<script type="text/javascript" tal:content="python: contextObj.getCalendarInit(name, years)"></script>
|
<img tal:attributes="id string:${name}_img; src string: $appUrl/ui/calendar.gif"/>
|
||||||
|
<script type="text/javascript" tal:content="python: contextObj.getCalendarInit(name, years)"></script>
|
||||||
|
</tal:calendar>
|
||||||
|
|
||||||
<tal:hour condition="python: widget['format'] == 0">
|
<tal:hour condition="python: widget['format'] == 0">
|
||||||
<select tal:define="hours python:range(0,24);"
|
<select tal:define="hours python:range(0,24);"
|
||||||
|
@ -107,9 +109,11 @@
|
||||||
tal:content="value" tal:attributes="value value"></option>
|
tal:content="value" tal:attributes="value value"></option>
|
||||||
</select>
|
</select>
|
||||||
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
||||||
<input type="hidden" tal:attributes="id fromName; name fromName"/>
|
<tal:calendar condition="widget/calendar">
|
||||||
<img tal:attributes="id string:${fromName}_img; src string: $appUrl/ui/calendar.gif"/>
|
<input type="hidden" tal:attributes="id fromName; name fromName"/>
|
||||||
<script type="text/javascript" tal:content="python: tool.getCalendarInit(fromName, years)"></script>
|
<img tal:attributes="id string:${fromName}_img; src string: $appUrl/ui/calendar.gif"/>
|
||||||
|
<script type="text/javascript" tal:content="python: tool.getCalendarInit(fromName, years)"></script>
|
||||||
|
</tal:calendar>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tal:comment replace="nothing">To</tal:comment>
|
<tal:comment replace="nothing">To</tal:comment>
|
||||||
|
@ -138,9 +142,11 @@
|
||||||
tal:content="value" tal:attributes="value value"></option>
|
tal:content="value" tal:attributes="value value"></option>
|
||||||
</select>
|
</select>
|
||||||
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
<tal:comment replace="nothing">The icon for displaying the calendar popup</tal:comment>
|
||||||
<input type="hidden" tal:attributes="id toName; name toName"/>
|
<tal:calendar condition="widget/calendar">
|
||||||
<img tal:attributes="id string:${toName}_img; src string: $appUrl/ui/calendar.gif"/>
|
<input type="hidden" tal:attributes="id toName; name toName"/>
|
||||||
<script type="text/javascript" tal:content="python: tool.getCalendarInit(toName, years)"></script>
|
<img tal:attributes="id string:${toName}_img; src string: $appUrl/ui/calendar.gif"/>
|
||||||
|
<script type="text/javascript" tal:content="python: tool.getCalendarInit(toName, years)"></script>
|
||||||
|
</tal:calendar>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue