[CMF-checkins] CVS: CMF/CMFDefault/skins/zpt_generic -
registered_notify_control.py:1.1 registered_notify_template.pt:1.1
Yvo Schubbe
cvs-admin at zope.org
Wed Oct 29 10:58:32 EST 2003
Update of /cvs-repository/CMF/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv10709/CMFDefault/skins/zpt_generic
Added Files:
registered_notify_control.py registered_notify_template.pt
Log Message:
Added zpt version of registered_notify_template.
=== Added File CMF/CMFDefault/skins/zpt_generic/registered_notify_control.py ===
## Script (Python) "registered_notify_control"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=member=None, password='baz', email='foo at example.org', **kw
##title=
##
from ZTUtils import make_query
from Products.CMFCore.utils import getToolByName
ptool = getToolByName(script, 'portal_properties')
utool = getToolByName(script, 'portal_url')
member_id = member and member.getId() or 'foo'
control = {}
control['member_email'] = '<%s>' % email
control['email_from_name'] = ptool.getProperty('email_from_name')
control['email_from_address'] = '<%s>' % ptool.getProperty(
'email_from_address')
control['portal_title'] = ptool.title()
control['portal_description'] = ptool.getProperty('description')
control['portal_url'] = '<%s>' % utool()
control['member_id'] = member_id
control['password'] = password
target = '%s/logged_in' % context.absolute_url()
query = make_query(__ac_name=member_id, __ac_password=password)
control['login_url'] = '<%s?%s>' % (target, query)
return control
=== Added File CMF/CMFDefault/skins/zpt_generic/registered_notify_template.pt ===
<tal:page xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
tal:define="control python: here.registered_notify_control(**options)"
i18n:domain="cmf_default"
>Subject: <tal:span i18n:translate=""><tal:span i18n:name="portal_title"
tal:content="control/portal_title"
/>: Your Membership Information</tal:span>
From: <tal:span tal:content="control/email_from_name"
/> <tal:span tal:replace="structure control/email_from_address" />
To: <tal:span tal:replace="structure control/member_email" />
Content-Type: text/plain
<tal:span i18n:translate=""
>You have been registered as a member of "<tal:span i18n:name="portal_title"
tal:content="control/portal_title" />", which
allows you to personalize your view of the website and participate in the
community.
This describes the purpose of the website:
<tal:span i18n:name="portal_description"
tal:content="control/portal_description" />
Visit us at <span i18n:name="portal_url"
><tal:span tal:replace="structure control/portal_url" /></span>
Your member id and password are:
Member ID: <tal:span i18n:name="member_id" tal:content="control/member_id" />
Password: <tal:span i18n:name="password" tal:content="control/password" />
You can use this URL to log on:
<span i18n:name="login_url"
><tal:span tal:replace="structure control/login_url" /></span>
Be aware that this URL might wrap over two lines. If your browser shows an
error message when you try to access the URL please make sure that you put
in the complete string.
<tal:span i18n:name="email_from_name"
tal:content="control/email_from_name" />
</tal:span></tal:page>
More information about the CMF-checkins
mailing list