Exemplo n.º 1
0
    def __call__(self, value, *args, **kwargs):

        Wrongs=[]
        for email in value:
            
            try:
                checkEmailAddress(email)
            except EmailAddressInvalid:

                Wrongs.append(email)
        if len(Wrongs)==1:
            return _(u"The next email address is invalid: %s") % (Wrongs[0])
        elif len(Wrongs)>1:
            spanWrong=", ".join(Wrongs)
            return _(u"The nexts email addresses are invalid: %s ") % (spanWrong)
        else:
            pass
Exemplo n.º 2
0
def SendEmail(object, evt):
    host = getToolByName(object, 'MailHost')
    message=_(u"""The project entitle %s to which you are subscribed has been modified
    you can see it in %s """) % (object.title, object.absolute_url())
    ToList=evt.object.suscribers
    From=host.smtp_userid
    Subject=_(u"Modified Content %s") % (object.title)
    if ToList == "" or ToList==[]:
        return
    else:

        try:

            host.secureSend(message, ToList, From,subject=Subject, subtype='plain', charset='UTF-8')
         
        except MailHostError:
            logger = logging.getLogger("cenditel.ppm.events.SedEmail")
            logger.warning ("We sorry, we cold not send the email because the mail host was not configure")
        except SMTPRecipientsRefused:
            logger = logging.getLogger("cenditel.ppm.events.SedEmail")
            logger.warning ("We sorry, we cold not send the email because one or more recipiendts has been refused")
            raise SMTPRecipientsRefused('Recipient address rejected by server')
Exemplo n.º 3
0
 def title(self):
     return _(u"Navigation PPM")
Exemplo n.º 4
0
from cenditel.ppm import CenditelPpmMF as _
from cenditel.ppm.config import PROJECTNAME
from cenditel.ppm.interfaces import IProposals
from cenditel.ppm.validator import GroupsValidator
from Products.DataGridField import DataGridField, DataGridWidget
from Products.FCKeditor.FckWidget import FckWidget

proposalsSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-    
    
    atapi.TextField(
        name='templatest',
        widget=FckWidget(
            label=_(u"Summary"),
            description=_(u"Proposal summary of a future project"),
            allow_file_upload=False,
            rows=5,
            cols=40,
        ),
        allowable_content_types = ('text/html',),
        default_content_type = 'text/html',
        default_output_type = 'text/x-html-safe',
        storage=atapi.AnnotationStorage(),
        validators=('isTidyHtmlWithCleanup',), 
        searchable=True,
        required=False
    ),
    
    DataGridField(
Exemplo n.º 5
0
from cenditel.ppm.validator import SuscriberValidator
#from cenditel.ppm.validator import UsersValidator

projectSchema = folder.ATFolderSchema.copy() +  atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.LinesField(
        name='manager',
        required=True,
        searchable=True,
        storage = atapi.AnnotationStorage(),
        vocabulary_factory="cenditel.ppm.user",
        widget=InAndOutWidget(
            size = 10,
            label=_(u"Manager"),
            description=_(u"Project Manager"),
        ),
        #schemata='Project',
        
    ),
    
    atapi.StringField( 
        name='status',
        widget=atapi.SelectionWidget( 
            format='select', 
            label=_(u"Status"),
            description=_(u"Project Status"),
        ),
        vocabulary=SCHEDULE_STATUS_PROJECT,
        schemata='Project',
Exemplo n.º 6
0
from Products.Archetypes.utils import DisplayList

from cenditel.ppm import CenditelPpmMF as _


PROJECTNAME = 'cenditel.ppm'

ADD_PERMISSIONS = {
    'PPM': 'cenditel.ppm: Add PPM',
    'Proposals': 'cenditel.ppm: Add Proposals',
    'Project': 'cenditel.ppm: Add Project',
}

TYPE_SUBFOLDER_PROJECT = DisplayList((
    ("Event", _(u"Events/Activities")),
    ("Folder", _(u"Folder")),
    ("Ploneboard", _(u"Discussions board")),
    ("PoiTracker", _(u"Demands")),
    ("Weblog", _(u"Blog")),
    ))

SCHEDULE_STATUS_PROJECT = DisplayList((
    ("est", _(u"Estimated")), # none
    ("comm", _(u"Committed")), # none
    ("plan", _(u"In Planning")), # yellow
    ("hold", _(u"On Hold")), # none
    ("ipa", _(u"In Process - Ahead of Schedule")), # green
    ("ipb", _(u"In Process - Begin Schedule")), # red
    ("ipo", _(u"In Process - On Schedule")), # green
    ("comp", _(u"Completed")), # none
Exemplo n.º 7
0
 def title(self):
     return _(u"Projects Dashboard")
Exemplo n.º 8
0
 def __call__(self, value, *args, **kwargs):
 	  Dic=value[0]
 	  value = str(value)
 	  if Dic['Title']=='':
 	      return (_(u'A user required to select, please correct.'))
Exemplo n.º 9
0
 def __call__(self, value, *args, **kwargs):
 	  Dic=value[0]
 	  value = str(value)
 	  if Dic['Title']=='':
 	      return _(u'Group required, please correct.')
Exemplo n.º 10
0
 def title(self):
     return _(u"Project Proposals Dashboard")