[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_generic -
reconfig_form.py:1.1.2.1 reconfig_template.pt:1.1.2.1
reconfig_form.pt:NONE
Yvo Schubbe
y.2004_ at wcm-solutions.de
Sun Oct 17 16:03:17 EDT 2004
Update of /cvs-repository/Products/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv4290/CMFDefault/skins/zpt_generic
Added Files:
Tag: CMF-1_5-branch
reconfig_form.py reconfig_template.pt
Removed Files:
Tag: CMF-1_5-branch
reconfig_form.pt
Log Message:
- refactored reconfig_form
- added 'default_charset' property (http://collector.zope.org/CMF/261, part 2)
=== Added File Products/CMFDefault/skins/zpt_generic/reconfig_form.py ===
##parameters=change=''
##
from Products.CMFCore.utils import getToolByName
ptool = getToolByName(script, 'portal_properties')
form = context.REQUEST.form
if change and \
context.portal_config_control(**form) and \
context.setRedirect(ptool, 'global/configPortal'):
return
options = {}
target = ptool.getActionInfo('global/configPortal')['url']
buttons = []
buttons.append( {'name': 'change', 'value': 'Change'} )
options['form'] = { 'action': target,
'email_from_name': ptool.getProperty('email_from_name'),
'email_from_address':
ptool.getProperty('email_from_address'),
'smtp_server': ptool.smtp_server(),
'title': ptool.title(),
'description': ptool.getProperty('description'),
'validate_email': ptool.getProperty('validate_email'),
'default_charset':
ptool.getProperty('default_charset', ''),
'listButtonInfos': tuple(buttons) }
return context.reconfig_template(**options)
=== Added File Products/CMFDefault/skins/zpt_generic/reconfig_template.pt ===
<html metal:use-macro="context/main_template/macros/master">
<body>
<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
<h1 i18n:translate="">Configure the Portal</h1>
</metal:slot>
<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
tal:define="form options/form">
<div class="Desktop">
<p i18n:translate="">This form is used to set the portal configuration
options.</p>
<form action="reconfig_form" method="post"
tal:attributes="action form/action">
<table class="FormLayout">
<tr>
<th i18n:translate="">Portal 'From' name</th>
<td>
<input name="email_from_name" value=""
tal:attributes="value form/email_from_name" />
<dl class="FieldHelp">
<dd i18n:translate="">When the portal generates mail, it uses this name as
its (apparent) sender.</dd>
</dl>
</td>
</tr>
<tr>
<th i18n:translate="">Portal 'From' address</th>
<td>
<input name="email_from_address" value=""
tal:attributes="value form/email_from_address" />
<dl class="FieldHelp">
<dd i18n:translate="">When the portal generates mail, it uses this address
as its (apparent) return address.</dd>
</dl>
</td>
</tr>
<tr>
<th i18n:translate="">SMTP server</th>
<td>
<input name="smtp_server" value=""
tal:attributes="value form/smtp_server" />
<dl class="FieldHelp">
<dd i18n:translate="">This is the address of your local SMTP (out-going
mail) server.</dd>
</dl>
</td>
</tr>
<tr>
<th i18n:translate="">Portal title</th>
<td>
<input name="title" value="" tal:attributes="value form/title" />
<dl class="FieldHelp">
<dd i18n:translate="">This is the title which appears at the top of every
portal page.</dd>
</dl>
</td>
</tr>
<tr>
<th i18n:translate="">Portal description</th>
<td class="TextField">
<textarea name="description" rows="6" cols="40" wrap="soft"
tal:content="form/description"></textarea>
<dl class="FieldHelp">
<dd i18n:translate="">This description is made available via syndicated
content and elsewhere. It should be fairly brief.</dd>
</dl>
</td>
</tr>
<tr>
<th i18n:translate="">Password policy</th>
<td>
<input type="radio" name="validate_email:boolean" value="True"
tal:attributes="checked form/validate_email" />
<tal:span i18n:translate="">Generate and email members' initial
password</tal:span>
<br />
<input type="radio" name="validate_email:boolean" value="False"
tal:attributes="checked not:form/validate_email" />
<tal:span i18n:translate="">Allow members to select their initial
password</tal:span>
</td>
</tr>
<tr>
<th i18n:translate="">Portal default encoding</th>
<td>
<input name="default_charset" value=""
tal:attributes="value form/default_charset" />
<dl class="FieldHelp">
<dd i18n:translate="">Charset used to decode portal content strings.
If empty, 'ascii' is used.</dd>
</dl>
</td>
</tr>
<tr>
<td> </td>
<td>
<metal:macro metal:use-macro="context/form_widgets/macros/buttons" />
</td>
</tr>
</table>
</form>
</div>
</metal:slot>
</body>
</html>
=== Removed File Products/CMFDefault/skins/zpt_generic/reconfig_form.pt ===
More information about the CMF-checkins
mailing list