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, 7 months ago) by casties
Branches: MAIN
CVS tags: HEAD
Fixes for better select boxes in metadata entry.

    1: 
    2:     <tal:block tal:define="foundType python:here.getType(here.REQUEST.SESSION['MDF_type']);prefix python:here.REQUEST.SESSION['MDF_prefix'] ">
    3:       <table>
    4: 	<tr>
    5: 	<td align="right" class="small" valign="top" width="25%" nowrap>	
    6: 	  Type:
    7: 	</td>
    8: 	<td align="left" valign="top" width="75%">	
    9: 	  <b tal:content="python:foundType[1].title or foundType[1].id"/>
   10: 	 </td>
   11:       </tr>
   12:       </table>
   13: 	<input type="hidden" tal:attributes="value here/REQUEST/SESSION/MDF_path" name="MDF_path">
   14: 	<input type="hidden" tal:attributes="value here/REQUEST/SESSION/MDF_type" name="MDF_type">
   15: 		
   16:         <input type="hidden" value="elem1/elem2" name="MDF_xpathStart">
   17: 	<table border="0" cellpadding="3" width="95%">
   18: 	  <span tal:omit-tag="" tal:repeat="item python:here.fieldList">
   19: 	    <tr tal:condition="not:python:foundType[1].isEmptyValue(item)==0">
   20:     <td align="right" class="small" valign="top" width="25%" nowrap>
   21:     		      <b tal:condition="python:foundType[1].getValue(item)[3]=='required'" tal:content="python:foundType[1].getValue(item)[1]"/>    
   22: 		      <i tal:condition="not:python:foundType[1].getValue(item)[3]=='required'" tal:content="python:foundType[1].getValue(item)[1]"/> 
   23: 
   24: 		   </td>
   25:     <td align="left" valign="top" width="75%" tal:define="list python:here.getList(foundType[1].getValue(item)[4])">
   26:       <tal:block tal:condition="not:list">
   27: 	<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>
   28:       </tal:block>
   29:       <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(),'')">
   30: 	<tal:block tal:repeat="element list">
   31: 	<option tal:condition="python:element==value" selected="true" tal:attributes="value element" tal:content="element"/>
   32: 	<option tal:condition="not:python:element==value" tal:attributes="value element" tal:content="element"/>
   33: 	</tal:block>
   34:       </select>
   35:    </td>
   36:     <td>
   37:       <a tal:attributes="href python:here.showHelpTag(here.REQUEST['URL1'],foundType[0],item)">help</a>
   38:     </td>
   39:   </tr>
   40: </span>
   41: </table>
   42: 
   43:     </tal:block>
   44: 

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