r13603 - Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple
"Jens W. Klein" <[email protected]> Tue, 03 May 2011 15:50:46 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jensens
Date: Tue May 3 15:50:46 2011
New Revision: 13603
Modified:
Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py
Log:
unicodedecodeerror forced me to cleanup the coce, but this does not help anyway
Modified: Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py
==============================================================================
--- Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py (original)
+++ Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py Tue May 3 15:50:46 2011
@@ -30,6 +30,22 @@
from Products.ATVocabularyManager.event import find_toplevel_vocab, TermRenamedEvent
from Products.ATVocabularyManager.config import PROJECTNAME
+term_schema = BaseContent.schema + Schema()
+
+term_schema['id'] = BaseContent.schema['id'].copy()
+term_schema['id'].widget.label = "Key"
+term_schema['id'].widget.label_msgid = "label_key"
+term_schema['id'].widget.description = "Should not contain spaces, underscores or mixed case."
+term_schema['id'].widget.description_msgid = "help_key"
+term_schema['id'].widget.i18n_domain = "atvocabularymanager"
+
+term_schema['title'] = BaseContent.schema['title'].copy()
+term_schema['title'].widget.label = "Value"
+term_schema['title'].widget.label_msgid = "label_value"
+term_schema['title'].widget.i18n_domain = "atvocabularymanager"
+
+
+
class SimpleVocabularyTerm(BaseContent):
security = ClassSecurityInfo()
portal_type = meta_type = 'SimpleVocabularyTerm'
@@ -38,33 +54,7 @@
__implements__ = getattr(BaseContent,'__implements__',()) + (IVocabularyTerm,)
- schema = BaseSchema + Schema((
- StringField('id',
- required=0, ## Still actually required, but
- ## the widget will supply the missing value
- ## on non-submits
- mode="rw",
- accessor="getId",
- mutator="setId",
- default='',
- widget=StringWidget(
- label="Key",
- label_msgid="label_key",
- description="Should not contain spaces, underscores or mixed case. ",
- description_msgid="help_key",
- i18n_domain="atvocabularymanager"),
- ),
- StringField('title',
- required=1,
- searchable=0,
- default='',
- accessor='Title',
- widget=StringWidget(
- label="Value",
- label_msgid="label_value",
- i18n_domain="atvocabularymanager"),
- )),
- )
+ schema = term_schema
aliases = {
'(Default)' : 'base_view',
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd