[Zope] DTML problem

Phil Beardmore philip.beardmore at sunderland.ac.uk
Fri Aug 5 06:47:01 EDT 2005


I have a problem writing a DTML page.

The page will be used to submit data to an SQL database, and the page 
itself is working great, however I get all of my users to login via an 
LDAP server using LDAPUserFolder.  Once logged in the users can complete 
a form, click submit and the data is stored (along with their userID and 
date and time).  Problem is, I also want to store the full name (or CN 
attribute in LDAP tree).

I know in ZPT I can use

<b tal:condition="cn">Logged in as: </b> <font 
color=#000000><strong><span tal:replace="cn">replace 
cn</span></strong></font></span>

and this works great but I cannot manage to work it out in DTML.  Below 
is my page code (Hope you can help!)

Thanks
Phil




<dtml-call "REQUEST.set('user',AUTHENTICATED_USER.getUserName())">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      lang="en"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="plone">

<body>
<div metal:fill-slot="main">


<body bgcolor="#FFFFFF">
<table width="100%" border="0">
    <td width="80%"><form name="Add_student_modules" method="post" 
action="add_stu_modules_method" enctype="multipart/form-data">
<input type="hidden" name="userid" value="<dtml-var user>">
<input type="hidden" name="datetime" value="<dtml-var "ZopeTime()" 
fmt=fCommon>">
<input type="hidden" name="name" value="<dtml-var name>">


        <table width="90%" border="0" cellspacing="0" cellpadding="2" 
align="center">
<tr>
            <td colspan="2" class="standard" align="center" 
bgcolor="#D6DBDF"><strong>Submit Module Choices</strong></td>
          </tr>

<tr>
            <td width="101" bgcolor="#D6DBDF">&nbsp;</td>
   <td width="419">&nbsp;</td></tr>

<tr>
            <td width="101" align="right" bgcolor="#D6DBDF" 
class="standard"><b>Choice 1</b></td>
   <td width="419">
      <select name="choice1">
               <option value="APC101">APC101 - Accounting, Planning and 
Control</option>
               <option value="BUS999">BUS999 - Marketing & Business 
Enterprise</option>
               <option value="HRM121">HRM121 - Human Resource 
Management</option>
               <option value="SIM222">SIM222 - Strategy and 
International Management</option>
               <option value="PSY666">PSY666 - Psychology</option>
               <option value="LAW421">LAW421 - Law</option>
               <option value="ADM555">ADM555 - Administration</option>
               <option value="TEC834">TEC834 - Technical</option>
     </select></td></tr>

<tr>
            <td width="101" align="right" bgcolor="#D6DBDF" 
class="standard"><b>Choice 2</b></td>
   <td width="419">
      <select name="choice2">
               <option value="APC101">APC101 - Accounting, Planning and 
Control</option>
               <option value="BUS999">BUS999 - Marketing & Business 
Enterprise</option>
               <option value="HRM121">HRM121 - Human Resource 
Management</option>
               <option value="SIM222">SIM222 - Strategy and 
International Management</option>
               <option value="PSY666">PSY666 - Psychology</option>
               <option value="LAW421">LAW421 - Law</option>
               <option value="ADM555">ADM555 - Administration</option>
               <option value="TEC834">TEC834 - Technical</option>
     </select></td></tr>


            <td width="101" bgcolor="#D6DBDF">&nbsp;</td>
   <td width="419">
      <input type="submit" name="Submit" value="Submit">
      <input type="reset" name="Submit2" value="Clear"></td></tr>

</table>
</form></td>
  </tr>
</table>
</div>
</body>
</html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: philip.beardmore.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050805/381e142f/philip.beardmore.vcf


More information about the Zope mailing list