[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Widgets/Browser - BrowserWidget.py:1.1.4.2 CheckBoxWidget.py:1.1.4.3 FileWidget.py:1.1.4.3 TextAreaWidget.py:1.1.4.3 TextWidget.py:1.1.4.3 browser.zcml:1.1.4.4
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:30 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Widgets/Browser
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/Formulator/Widgets/Browser
Modified Files:
Tag: Zope-3x-branch
BrowserWidget.py CheckBoxWidget.py FileWidget.py
TextAreaWidget.py TextWidget.py browser.zcml
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals):
- RenameAllowToRequire
- GroupClassRelatedDirectivesInClassDirective
- ViewInterfaceAndSimplification
- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes
- TwoArgumentViewConstructors
- ImplementsInZCML
- SimpleViewCreationInZCML
- RemoveGetView
- ReplaceProtectWithAllow
- ViewMethodsAsViews
- MergeProtectionAndComponentDefinitions
There were also various security fixes resulting of better integration
of security with components.
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/BrowserWidget.py 1.1.4.1 => 1.1.4.2 ===
extra = ''
- def __init__(self, field):
- ''' '''
- self._field = field
-
-
def getValueFromRequest(self, REQUEST):
""" """
- return REQUEST.get('field_'+self.getContext().id, None)
+ return REQUEST.get('field_'+self.context.id, None)
def _getValueToInsert(self, REQUEST):
""" """
- field = self.getContext()
+ field = self.context
if REQUEST and REQUEST.has_key('field_'+field.id):
return REQUEST['field_'+field.id]
else:
@@ -62,7 +57,7 @@
"""
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
value = self._getValueToInsert(REQUEST),
cssClass = self.getValue('cssClass'),
extra = self.getValue('extra'))
@@ -73,7 +68,7 @@
"""
return renderElement(self.getValue('tag'),
type = 'hidden',
- name = self.getContext().id,
+ name = self.context.id,
value = self._getValueToInsert(REQUEST),
cssClass = self.getValue('cssClass'),
extra = self.getValue('extra'))
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/CheckBoxWidget.py 1.1.4.2 => 1.1.4.3 ===
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
checked = None,
cssClass = self.getValue('cssClass'),
extra = self.getValue('extra'))
else:
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
cssClass = self.getValue('cssClass'),
size = self.getValue('displayWidth'),
extra = self.getValue('extra'))
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/FileWidget.py 1.1.4.2 => 1.1.4.3 ===
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
cssClass = self.getValue('cssClass'),
size = self.getValue('displayWidth'),
maxlength = displayMaxWidth,
@@ -42,7 +42,7 @@
else:
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
cssClass = self.getValue('cssClass'),
size = self.getValue('displayWidth'),
extra = self.getValue('extra'))
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/TextAreaWidget.py 1.1.4.2 => 1.1.4.3 ===
def render(self, REQUEST=None):
return renderElement("textarea",
- name=self.getContext().id,
+ name=self.context.id,
css_class=self.getValue('cssClass'),
cols=self.getValue('width'),
rows=self.getValue('height'),
contents=self._getValueToInsert(REQUEST),
extra=self.getValue('extra'))
-
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/TextWidget.py 1.1.4.2 => 1.1.4.3 ===
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
value = self._getValueToInsert(REQUEST),
cssClass = self.getValue('cssClass'),
size = self.getValue('displayWidth'),
@@ -51,7 +51,7 @@
else:
return renderElement(self.getValue('tag'),
type = self.getValue('type'),
- name = self.getContext().id,
+ name = self.context.id,
value = self._getValueToInsert(REQUEST),
cssClass = self.getValue('cssClass'),
size = self.getValue('displayWidth'),
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/browser.zcml 1.1.4.3 => 1.1.4.4 ===
>
- <security:protectClass class=".FileWidget."
- permission_id="Zope.ManageContent"
- names="render, getContext" />
-
- <security:protectClass class=".TextAreaWidget."
- permission_id="Zope.ManageContent"
- names="render, getContext" />
-
- <security:protectClass class=".TextWidget."
- permission_id="Zope.ManageContent"
- names="render, getContext" />
+ <content class=".FileWidget.">
+ <security:require
+ permission="Zope.ManageContent"
+ attributes="render getContext" />
+ </content>
+ <content class=".TextAreaWidget.">
+ <security:require
+ permission="Zope.ManageContent"
+ attributes="render getContext" />
+ </content>
+ <content class=".TextWidget.">
+ <security:require
+ permission="Zope.ManageContent"
+ attributes="render getContext" />
+ </content>
</zopeConfigure>