Default value for information title, hide title for information
This commit is contained in:
parent
8abfd85fb7
commit
3e0f2b4c6e
|
@ -1,13 +1,15 @@
|
|||
from zope.interface import implements
|
||||
|
||||
from plone.autoform import directives as form
|
||||
from plone.dexterity.content import Item
|
||||
from plone.directives.form import default_value
|
||||
|
||||
from collective.task.interfaces import IBaseTask
|
||||
|
||||
|
||||
class IInformation(IBaseTask):
|
||||
"""Schema for information"""
|
||||
pass
|
||||
form.mode(title='hidden')
|
||||
|
||||
|
||||
class Information(Item):
|
||||
|
@ -17,3 +19,8 @@ class Information(Item):
|
|||
meta_type = 'information'
|
||||
# disable local roles inheritance
|
||||
__ac_local_roles_block__ = True
|
||||
|
||||
|
||||
@default_value(field=IInformation['title'])
|
||||
def titleDefaultValue(data):
|
||||
return u"Pour information"
|
||||
|
|
Reference in New Issue