Roundup Tracker - Issues


Author shane-green
Date 2008-09-13.01:28:57
Here is a macro definition that provides the hidden input needed to allow users to unselect all options in a multi-select:

<metal:macro define-macro="multiselect">
    <select metal:define-slot="select" 
            tal:define="height height | size | default;" 
            tal:replace="structure python:context[name].menu(height=height)">
    <input type="hidden" value="" tal:attributes="name name;" />

Here is a snippet from issue.item.html which uses the macro to create a multi-select for issue keywords:

<tr tal:define="height string:5;">
    <td tal:define="name string:topics;">
        <metal:macro use-macro="templates/page/macros/multiselect" />

This assumes that the macro definition is placed in page.html, and sets the height of the selection box to be 5 items high.  Hope that helps!
Date User Action Args
2009-02-03 14:22:19adminlinkissue2075156 messages
2009-02-03 14:22:19admincreate