From db5b2045a3e841d9b2ad5b56d4d181ae100de494 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= <balkian@gmail.com>
Date: Mon, 8 Apr 2013 23:35:51 +0200
Subject: [PATCH] Fixes #31 Sane fields for Events

Probably it will be unnecessary once we use the standar Plone events, but JIC.

Note that I removed the IBasic behavior because our description richtext and I
didn't manage to override the default one.

I also needed to recreate my var folder to apply the changes. Probably there's
a fancier way to do it.
---
 src/eestec/portal/content/event.py                       | 9 +++++++++
 .../profiles/default/types/eestec.portal.event.xml       | 1 -
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/eestec/portal/content/event.py b/src/eestec/portal/content/event.py
index 3b708ea..caffcfb 100644
--- a/src/eestec/portal/content/event.py
+++ b/src/eestec/portal/content/event.py
@@ -7,17 +7,26 @@
 from five import grok
 from plone.directives import form, dexterity
 from zope import schema
+from plone.app.textfield import RichText
 from zope.interface.declarations import alsoProvides
 
 
 class IEvent(form.Schema):
     """
     """
+    title = schema.TextLine(
+        title=u'Name',
+        required=True,
+    )
     deadline = schema.Datetime(
         title=u'Deadline',
         description=u'Deadline to apply to this event',
         required=True,
     )
+    description = RichText(
+        title=u'Description',
+        required=True,
+    )
 
 alsoProvides(IEvent, form.IFormFieldProvider)
 
diff --git a/src/eestec/portal/profiles/default/types/eestec.portal.event.xml b/src/eestec/portal/profiles/default/types/eestec.portal.event.xml
index 39b1753..0134747 100644
--- a/src/eestec/portal/profiles/default/types/eestec.portal.event.xml
+++ b/src/eestec/portal/profiles/default/types/eestec.portal.event.xml
@@ -28,7 +28,6 @@
   <!-- enabled behaviors -->
   <property name="behaviors">
     <element value="plone.app.dexterity.behaviors.metadata.ICategorization" />
-    <element value="plone.app.dexterity.behaviors.metadata.IBasic" />
     <element value="plone.app.content.interfaces.INameFromTitle" />
     <element value="plone.app.versioningbehavior.behaviors.IVersionable" />
   </property>