[Zope] Help needed for acl_users script
CY
CY" <cyhoong@pc.jaring.my
Wed, 19 Mar 2003 00:13:11 +0800
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C2EDAC.53992B20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello there!
I have a Zope251 installation and learning to do some development. I =
want to write a simple form for managing users (add, edit & delete). =
There is error return code.
A sample of the code is sample but it does not seem to work. I have =
search FAQ for some clues but found none.
Can anyone give me a pointer here?
Thk in advance.
DTML Doc: AddUserForm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<form action=3D"AddUserAction" method=3D"post">
<table>
<tr>
<td>Enter your name: </td>
<td><input type=3Dtext name=3Dusername value=3D"your name"></td>
</tr>
<tr>
<td>Enter your password: </td>
<td><input type=3Dpassword name=3Dpassword_1 ></td>
</tr>
<tr>
<td>Confirm your name: </td>
<td><input type=3Dpassword name=3Dpassword_2></td>
</tr>
<tr>
<td>Enter your role: </td>
<td><input type=3Dtext name=3Drole_1></td>
</tr>
<tr>
<td>Enter your domain: </td>
<td><input type=3Dtext name=3Ddomain_1></td>
</tr>
<tr><td> </td></tr>
<tr>
<td> <br></td>
<td><input type=3Dsubmit name=3Dsubmit value=3D"Add User"></td>
</tr>
<dtml-var standard_html_footer>
DTML Method
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<dtml-if expr=3D"password_1 =3D=3D password_2">
<dtml-call "REQUEST.set('name','<dtml-var username>')">
<dtml-call "REQUEST.set('password','<dtml-var password_1>')">
<dtml-call "REQUEST.set('confirm','<password_1>')">
<dtml-call "REQUEST.set('roles','<dmtl-var role_1>')">
<dtml-call "REQUEST.set('domains','<dtml-var domain_1>')">
<dtml-call "REQUEST.set('submit','Add')">
<dtml-call "acl_users.manage_users(submit=3D'Add', =
REQUEST=3DREQUEST)">
<dtml-else>
<h2> Please re-enter again - your password is not confirm </h2>
</dtml-if>
<dtml-var AddUserForm>
------=_NextPart_000_0006_01C2EDAC.53992B20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello there!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a Zope251 installation =
and learning to=20
do some development. I want to write a simple form for managing =
users=20
(add, edit & delete). There is error return code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A sample of the code is sample but it =
does not seem=20
to work. I have search FAQ for some clues but found =
none.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone give me a pointer =
here?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thk in advance.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DTML Doc: AddUserForm</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FO=
NT></DIV>
<DIV><FONT face=3DArial size=3D2>dtml-var=20
standard_html_header><BR><h2><dtml-var=20
title_or_id></h2><BR><form action=3D"AddUserAction"=20
method=3D"post"><BR><table><BR> =
<tr><BR> =20
<td>Enter your name: </td><BR> =
<td><input=20
type=3Dtext name=3Dusername value=3D"your name"></td><BR> =
</tr><BR> <tr><BR> <td>Enter =
your=20
password: </td><BR> <td><input =
type=3Dpassword=20
name=3Dpassword_1 ></td><BR> </tr><BR> =20
<tr><BR> <td>Confirm your name:=20
</td><BR> <td><input type=3Dpassword=20
name=3Dpassword_2></td><BR> </tr><BR> =20
<tr><BR> <td>Enter your role:=20
</td><BR> <td><input type=3Dtext=20
name=3Drole_1></td><BR> </tr><BR> =20
<tr><BR> <td>Enter your domain:=20
</td><BR> <td><input type=3Dtext=20
name=3Ddomain_1></td><BR> </tr><BR> =20
<tr><td>&nbsp;</td></tr><BR> =20
<tr><BR> =20
<td>&nbsp;<br></td><BR> =20
<td><input type=3Dsubmit name=3Dsubmit value=3D"Add=20
User"></td><BR> </tr></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-var =
standard_html_footer></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DTML Method</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><dtml-if expr=3D"password_1 =3D=3D=20
password_2"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> <dtml-call=20
"REQUEST.set('name','<dtml-var username>')"><BR> =
<dtml-call=20
"REQUEST.set('password','<dtml-var password_1>')"><BR> =20
<dtml-call =
"REQUEST.set('confirm','<password_1>')"><BR> =20
<dtml-call "REQUEST.set('roles','<dmtl-var =
role_1>')"><BR> =20
<dtml-call "REQUEST.set('domains','<dtml-var =
domain_1>')"><BR> =20
<dtml-call "REQUEST.set('submit','Add')"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> <dtml-call=20
"acl_users.manage_users(submit=3D'Add', =
REQUEST=3DREQUEST)"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-else></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> <h2> Please re-enter again =
- your=20
password is not confirm </h2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></dtml-if></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-var=20
AddUserForm></FONT></DIV></BODY></HTML>
------=_NextPart_000_0006_01C2EDAC.53992B20--