Changeset 1871 in products for quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins
- Timestamp:
- Mar 10, 2010 1:50:35 PM (14 years ago)
- Location:
- quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_discussion/discussion_reply.cpy
r1863 r1871 11 11 from Products.PythonScripts.standard import url_quote_plus 12 12 from Products.CMFCore.utils import getToolByName 13 from Products.CMFPlone import PloneMessageFactory as pmf13 from Products.CMFPlone import PloneMessageFactory as _ 14 14 mtool = getToolByName(context, 'portal_membership') 15 15 dtool = getToolByName(context, 'portal_discussion') … … 64 64 reply.absolute_url())) 65 65 66 context.plone_utils.addPortalMessage( pmf(u'Comment added.'))66 context.plone_utils.addPortalMessage(_(u'Comment added.')) 67 67 target = '%s#%s' % (view, anchor) 68 68 return req.RESPONSE.redirect(target) -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_discussion/discussion_reply_form.cpt
r1691 r1871 13 13 14 14 <div metal:fill-slot="main" 15 tal:define="template_id template/getId; 16 errors options/state/getErrors; 17 putils context/plone_utils; 15 tal:define="errors options/state/getErrors; 18 16 thread python:putils.getDiscussionThread(here); 19 17 discussable python:thread[0]; 20 here_url context/@@plone_context_state/object_url;21 member context/@@plone_portal_state/member;22 isAnon context/@@plone_portal_state/anonymous;23 toLocalizedTime nocall:context/@@plone/toLocalizedTime;24 18 replies python:thread[1:]"> 25 19 -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_join_form/join_form.cpt
r1691 r1871 17 17 18 18 <div metal:fill-slot="main" 19 tal:define="template_id template/getId; 20 errors options/state/getErrors; 19 tal:define="errors options/state/getErrors; 21 20 mailhost context/MailHost/smtp_host|nothing; 22 21 mailfrom context/email_from_address|nothing; -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_join_form/register.cpy
r1863 r1871 10 10 ## 11 11 12 from Products.CMFPlone import PloneMessageFactory as pmf12 from Products.CMFPlone import PloneMessageFactory as _ 13 13 from ZODB.POSException import ConflictError 14 14 … … 30 30 portal_registration.addMember(username, password, properties=REQUEST, REQUEST=context.REQUEST) 31 31 except AttributeError: 32 state.setError('username', pmf(u'The login name you selected is already in use or is not valid. Please choose another.'))33 context.plone_utils.addPortalMessage( pmf(u'Please correct the indicated errors.'), 'error')32 state.setError('username', _(u'The login name you selected is already in use or is not valid. Please choose another.')) 33 context.plone_utils.addPortalMessage(_(u'Please correct the indicated errors.'), 'error') 34 34 return state.set(status='failure') 35 35 … … 49 49 if portal.validate_email: 50 50 context.acl_users.userFolderDelUsers([username,], REQUEST=context.REQUEST) 51 msg = pmf(u'status_fatal_password_mail',51 msg = _(u'status_fatal_password_mail', 52 52 default=u'Failed to create your account: we were unable to send your password to your email address: ${address}', 53 53 mapping={u'address' : str(err)}) … … 55 55 return state.set(status='failure') 56 56 else: 57 msg = pmf(u'status_nonfatal_password_mail',57 msg = _(u'status_nonfatal_password_mail', 58 58 default=u'You account has been created, but we were unable to send your password to your email address: ${address}', 59 59 mapping={u'address' : str(err)}) … … 63 63 64 64 if came_from_prefs: 65 context.plone_utils.addPortalMessage( pmf(u'User added.'))65 context.plone_utils.addPortalMessage(_(u'User added.')) 66 66 state.set(status='prefs') 67 67 -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto.cpy
r1863 r1871 14 14 from Products.CMFPlone.PloneTool import AllowSendto 15 15 from Products.CMFCore.utils import getToolByName 16 from Products.CMFPlone import PloneMessageFactory as pmf16 from Products.CMFPlone import PloneMessageFactory as _ 17 17 from ZODB.POSException import ConflictError 18 18 … … 23 23 24 24 if not mtool.checkPermission(AllowSendto, context): 25 context.plone_utils.addPortalMessage( pmf(u'You are not allowed to send this link.'), 'error')25 context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error') 26 26 return state.set(status='failure') 27 27 … … 34 34 show = True 35 35 if not show: 36 context.plone_utils.addPortalMessage( pmf(u'You are not allowed to send this link.'), 'error')36 context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error') 37 37 return state.set(status='failure') 38 38 … … 57 57 except: # TODO To many things could possibly go wrong. So we catch all. 58 58 exception = context.plone_utils.exceptionString() 59 message = pmf(u'Unable to send mail: ${exception}',59 message = _(u'Unable to send mail: ${exception}', 60 60 mapping={u'exception' : exception}) 61 61 context.plone_utils.addPortalMessage(message, 'error') … … 65 65 transaction_note(tmsg) 66 66 67 context.plone_utils.addPortalMessage( pmf(u'Mail sent.'))67 context.plone_utils.addPortalMessage(_(u'Mail sent.')) 68 68 return state -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto_form.cpt
r1691 r1871 16 16 17 17 <div metal:fill-slot="main" 18 tal:define="template_id template/getId; 19 errors options/state/getErrors; 20 member context/@@plone_portal_state/member; 21 here_url context/@@plone_context_state/object_url;"> 18 tal:define="errors options/state/getErrors;"> 22 19 23 20 <h1 class="documentFirstHeading" -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/plone_captchas/captcha_widget.pt
r1862 r1871 4 4 <div class="field" 5 5 tal:define="hk here/getCaptcha; 6 error errors/key|nothing; 7 Iterator python:modules['Products.CMFPlone'].IndexIterator; 8 tabindex python:Iterator(mainSlot=False)" 9 6 error errors/key|nothing" 10 7 tal:attributes="class python:test(error, 'field error', 'field')"> 11 8 <input type="hidden" … … 16 13 i18n:domain="plone" i18n:attributes="title title_required;" 17 14 i18n:translate="label_required">(Required)</span> 18 <div class="formHelp" i18n:translate="label_help_captchas">Enter the word below for registration.</div>15 <div class="formHelp"></div> 19 16 <div tal:content="error">Validation error output</div> 20 17 <input type="text" -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/plone_captchas/prefs_captchas_setup.cpy
r1863 r1871 10 10 ## 11 11 from Products.CMFCore.utils import getToolByName 12 from Products.CMFPlone import PloneMessageFactory as pmf12 from Products.CMFPlone import PloneMessageFactory as _ 13 13 14 14 import string … … 52 52 captcha_props.manage_changeProperties(**kw) 53 53 54 context.plone_utils.addPortalMessage( pmf(u'Changes saved.'))54 context.plone_utils.addPortalMessage(_(u'Changes saved.')) 55 55 return state -
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/plone_captchas/prefs_captchas_setup_form.cpt
r1859 r1871 12 12 13 13 <div metal:fill-slot="prefs_configlet_main" 14 tal:define="errors python:request.get('controller_state', None).getErrors(); 15 Iterator python:modules['Products.CMFPlone'].IndexIterator; 16 tabindex python:Iterator(mainSlot=False)"> 14 tal:define="errors python:request.get('controller_state', None).getErrors();"> 17 15 18 16 <div metal:define-macro="main">
Note: See TracChangeset
for help on using the changeset viewer.