File:  [Repository] / OSA_system2 / zpt / addMetadataForm_fragment.zpt
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Tue Nov 29 13:21:33 2005 UTC (18 years, 5 months ago) by casties
Branches: MAIN
CVS tags: HEAD
Fixes for better select boxes in metadata entry.


    <tal:block tal:define="foundType python:here.getType(here.REQUEST.SESSION['MDF_type']);prefix python:here.REQUEST.SESSION['MDF_prefix'] ">
      <table>
	<tr>
	<td align="right" class="small" valign="top" width="25%" nowrap>	
	  Type:
	</td>
	<td align="left" valign="top" width="75%">	
	  <b tal:content="python:foundType[1].title or foundType[1].id"/>
	 </td>
      </tr>
      </table>
	<input type="hidden" tal:attributes="value here/REQUEST/SESSION/MDF_path" name="MDF_path">
	<input type="hidden" tal:attributes="value here/REQUEST/SESSION/MDF_type" name="MDF_type">
		
        <input type="hidden" value="elem1/elem2" name="MDF_xpathStart">
	<table border="0" cellpadding="3" width="95%">
	  <span tal:omit-tag="" tal:repeat="item python:here.fieldList">
	    <tr tal:condition="not:python:foundType[1].isEmptyValue(item)==0">
    <td align="right" class="small" valign="top" width="25%" nowrap>
    		      <b tal:condition="python:foundType[1].getValue(item)[3]=='required'" tal:content="python:foundType[1].getValue(item)[1]"/>    
		      <i tal:condition="not:python:foundType[1].getValue(item)[3]=='required'" tal:content="python:foundType[1].getValue(item)[1]"/> 

		   </td>
    <td align="left" valign="top" width="75%" tal:define="list python:here.getList(foundType[1].getValue(item)[4])">
      <tal:block tal:condition="not:list">
	<b><input type="text" size="40" tal:attributes="name python:prefix+'MD_'+foundType[1].getValue(item)[0].rstrip(); value python:here.REQUEST.SESSION['MDF_presets'].get(foundType[1].getValue(item)[0].rstrip(),'')"/></b>
      </tal:block>
      <select tal:condition="list" tal:attributes="name python:prefix+'MD_'+foundType[1].getValue(item)[0].rstrip()" tal:define="value python:here.REQUEST.SESSION['MDF_presets'].get(foundType[1].getValue(item)[0].rstrip(),'')">
	<tal:block tal:repeat="element list">
	<option tal:condition="python:element==value" selected="true" tal:attributes="value element" tal:content="element"/>
	<option tal:condition="not:python:element==value" tal:attributes="value element" tal:content="element"/>
	</tal:block>
      </select>
   </td>
    <td>
      <a tal:attributes="href python:here.showHelpTag(here.REQUEST['URL1'],foundType[0],item)">help</a>
    </td>
  </tr>
</span>
</table>

    </tal:block>


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>