projects
/
photoprint.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
46df770
)
Prise en charge du mode d'enregistrement anonyme avec mot de passe.
author
Benoît Pin
<benoit.pin@gmail.com>
Wed, 3 Sep 2014 21:23:50 +0000
(23:23 +0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Wed, 3 Sep 2014 21:23:50 +0000
(23:23 +0200)
locales/en/LC_MESSAGES/photoprint.po
patch
|
blob
|
history
locales/fr/LC_MESSAGES/photoprint.mo
patch
|
blob
|
history
locales/fr/LC_MESSAGES/photoprint.po
patch
|
blob
|
history
locales/photoprint.pot
patch
|
blob
|
history
skins/customer_add_control.py
patch
|
blob
|
history
diff --git
a/locales/en/LC_MESSAGES/photoprint.po
b/locales/en/LC_MESSAGES/photoprint.po
index
f0d7834
..
10842db
100644
(file)
--- a/
locales/en/LC_MESSAGES/photoprint.po
+++ b/
locales/en/LC_MESSAGES/photoprint.po
@@
-20,42
+20,46
@@
msgstr ""
msgid "Log in"
msgstr ""
msgid "Log in"
msgstr ""
-#: t/skins/customer_add_control.py:
19
+#: t/skins/customer_add_control.py:
21
msgid "Please enter a given name."
msgstr ""
msgid "Please enter a given name."
msgstr ""
-#: t/skins/customer_add_control.py:2
0
+#: t/skins/customer_add_control.py:2
2
msgid "Please enter a name."
msgstr ""
msgid "Please enter a name."
msgstr ""
-#: t/skins/customer_add_control.py:2
1
+#: t/skins/customer_add_control.py:2
3
msgid "Please enter an email."
msgstr ""
msgid "Please enter an email."
msgstr ""
-#: t/skins/customer_add_control.py:2
2
+#: t/skins/customer_add_control.py:2
4
msgid "Please enter a member id."
msgstr ""
msgid "Please enter a member id."
msgstr ""
-#: t/skins/customer_add_control.py:2
3
+#: t/skins/customer_add_control.py:2
5
msgid "Please enter a billing address."
msgstr ""
msgid "Please enter a billing address."
msgstr ""
-#: t/skins/customer_add_control.py:2
4
+#: t/skins/customer_add_control.py:2
6
msgid "Please enter a city."
msgstr ""
msgid "Please enter a city."
msgstr ""
-#: t/skins/customer_add_control.py:2
5
+#: t/skins/customer_add_control.py:2
7
msgid "Please enter zip code."
msgstr ""
msgid "Please enter zip code."
msgstr ""
-#: t/skins/customer_add_control.py:2
6
+#: t/skins/customer_add_control.py:2
8
msgid "Please enter a country."
msgstr ""
msgid "Please enter a country."
msgstr ""
-#: t/skins/customer_add_control.py:2
7
+#: t/skins/customer_add_control.py:2
9
msgid "Please enter a phone."
msgstr ""
msgid "Please enter a phone."
msgstr ""
+#: t/skins/customer_add_control.py:56
+msgid "Wrong private collection credentials."
+msgstr ""
+
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr ""
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr ""
diff --git
a/locales/fr/LC_MESSAGES/photoprint.mo
b/locales/fr/LC_MESSAGES/photoprint.mo
index
b480a57
..
351787e
100644
(file)
Binary files a/locales/fr/LC_MESSAGES/photoprint.mo and b/locales/fr/LC_MESSAGES/photoprint.mo differ
diff --git
a/locales/fr/LC_MESSAGES/photoprint.po
b/locales/fr/LC_MESSAGES/photoprint.po
index
e2a0659
..
bb0f5b3
100644
(file)
--- a/
locales/fr/LC_MESSAGES/photoprint.po
+++ b/
locales/fr/LC_MESSAGES/photoprint.po
@@
-1,7
+1,7
@@
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date:
Mon Sep 1 23:37:28
2014\n"
+"POT-Creation-Date:
Wed Sep 3 23:10:26
2014\n"
"PO-Revision-Date: 2014-09-01 23:39+0200\n"
"Last-Translator: Benoît PIN\n"
"Language-Team: CRI http://cri.ensmp.fr\n"
"PO-Revision-Date: 2014-09-01 23:39+0200\n"
"Last-Translator: Benoît PIN\n"
"Language-Team: CRI http://cri.ensmp.fr\n"
@@
-40,42
+40,46
@@
msgstr "Cliquez sur le bouton pour vous connecter immédiatement."
msgid "Log in"
msgstr "Connexion"
msgid "Log in"
msgstr "Connexion"
-#: t/skins/customer_add_control.py:
19
+#: t/skins/customer_add_control.py:
21
msgid "Please enter a given name."
msgstr "Veuillez entrer un prénom."
msgid "Please enter a given name."
msgstr "Veuillez entrer un prénom."
-#: t/skins/customer_add_control.py:2
0
+#: t/skins/customer_add_control.py:2
2
msgid "Please enter a name."
msgstr "Veuillez entrer un nom."
msgid "Please enter a name."
msgstr "Veuillez entrer un nom."
-#: t/skins/customer_add_control.py:2
1
+#: t/skins/customer_add_control.py:2
3
msgid "Please enter an email."
msgstr "Veuillez entrer un email."
msgid "Please enter an email."
msgstr "Veuillez entrer un email."
-#: t/skins/customer_add_control.py:2
2
+#: t/skins/customer_add_control.py:2
4
msgid "Please enter a member id."
msgstr "Veuillez entrer un login."
msgid "Please enter a member id."
msgstr "Veuillez entrer un login."
-#: t/skins/customer_add_control.py:2
3
+#: t/skins/customer_add_control.py:2
5
msgid "Please enter a billing address."
msgstr "Veuillez entrer une addresse de facturation."
msgid "Please enter a billing address."
msgstr "Veuillez entrer une addresse de facturation."
-#: t/skins/customer_add_control.py:2
4
+#: t/skins/customer_add_control.py:2
6
msgid "Please enter a city."
msgstr "Veuillez entrer une ville."
msgid "Please enter a city."
msgstr "Veuillez entrer une ville."
-#: t/skins/customer_add_control.py:2
5
+#: t/skins/customer_add_control.py:2
7
msgid "Please enter zip code."
msgstr "Veuillez entrer un code postal."
msgid "Please enter zip code."
msgstr "Veuillez entrer un code postal."
-#: t/skins/customer_add_control.py:2
6
+#: t/skins/customer_add_control.py:2
8
msgid "Please enter a country."
msgstr "Veuillez entrer un pays."
msgid "Please enter a country."
msgstr "Veuillez entrer un pays."
-#: t/skins/customer_add_control.py:2
7
+#: t/skins/customer_add_control.py:2
9
msgid "Please enter a phone."
msgstr "Veuillez entrer un numéro de téléphone."
msgid "Please enter a phone."
msgstr "Veuillez entrer un numéro de téléphone."
+#: t/skins/customer_add_control.py:56
+msgid "Wrong private collection credentials."
+msgstr "Identifiant ou mot de passe de collection privée incorrect."
+
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr "Nouveau compte client"
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr "Nouveau compte client"
diff --git
a/locales/photoprint.pot
b/locales/photoprint.pot
index
9965dd2
..
3ade077
100644
(file)
--- a/
locales/photoprint.pot
+++ b/
locales/photoprint.pot
@@
-14,7
+14,7
@@
msgid ""
msgstr ""
"Project-Id-Version: Meaningless\n"
msgid ""
msgstr ""
"Project-Id-Version: Meaningless\n"
-"POT-Creation-Date:
Mon Sep 1 23:37:28
2014\n"
+"POT-Creation-Date:
Wed Sep 3 23:10:26
2014\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
@@
-43,42
+43,46
@@
msgstr ""
msgid "Log in"
msgstr ""
msgid "Log in"
msgstr ""
-#: t/skins/customer_add_control.py:
19
+#: t/skins/customer_add_control.py:
21
msgid "Please enter a given name."
msgstr ""
msgid "Please enter a given name."
msgstr ""
-#: t/skins/customer_add_control.py:2
0
+#: t/skins/customer_add_control.py:2
2
msgid "Please enter a name."
msgstr ""
msgid "Please enter a name."
msgstr ""
-#: t/skins/customer_add_control.py:2
1
+#: t/skins/customer_add_control.py:2
3
msgid "Please enter an email."
msgstr ""
msgid "Please enter an email."
msgstr ""
-#: t/skins/customer_add_control.py:2
2
+#: t/skins/customer_add_control.py:2
4
msgid "Please enter a member id."
msgstr ""
msgid "Please enter a member id."
msgstr ""
-#: t/skins/customer_add_control.py:2
3
+#: t/skins/customer_add_control.py:2
5
msgid "Please enter a billing address."
msgstr ""
msgid "Please enter a billing address."
msgstr ""
-#: t/skins/customer_add_control.py:2
4
+#: t/skins/customer_add_control.py:2
6
msgid "Please enter a city."
msgstr ""
msgid "Please enter a city."
msgstr ""
-#: t/skins/customer_add_control.py:2
5
+#: t/skins/customer_add_control.py:2
7
msgid "Please enter zip code."
msgstr ""
msgid "Please enter zip code."
msgstr ""
-#: t/skins/customer_add_control.py:2
6
+#: t/skins/customer_add_control.py:2
8
msgid "Please enter a country."
msgstr ""
msgid "Please enter a country."
msgstr ""
-#: t/skins/customer_add_control.py:2
7
+#: t/skins/customer_add_control.py:2
9
msgid "Please enter a phone."
msgstr ""
msgid "Please enter a phone."
msgstr ""
+#: t/skins/customer_add_control.py:56
+msgid "Wrong private collection credentials."
+msgstr ""
+
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr ""
#: t/skins/customer_join_template.pt:11
msgid "New customer account"
msgstr ""
diff --git
a/skins/customer_add_control.py
b/skins/customer_add_control.py
index
00b4de3
..
6efd42b
100755
(executable)
--- a/
skins/customer_add_control.py
+++ b/
skins/customer_add_control.py
@@
-2,6
+2,8
@@
from Products.CMFCore.utils import getToolByName
from Products.photoprint.utils import translate
from Products.CMFDefault.utils import translate as cmf_translate
from Products.CMFCore.utils import getToolByName
from Products.photoprint.utils import translate
from Products.CMFDefault.utils import translate as cmf_translate
+from Products.CMFCore.exceptions import AccessControl_Unauthorized
+from Products.Plinn.RegistrationTool import MODE_PASS_ANONYMOUS
rtool = getToolByName(context, 'portal_registration')
ptool = getToolByName(context, 'portal_properties')
_ = lambda msg : translate(msg, context)
rtool = getToolByName(context, 'portal_registration')
ptool = getToolByName(context, 'portal_properties')
_ = lambda msg : translate(msg, context)
@@
-44,9
+46,15
@@
try:
,'billing_city' : kg('billing_city')
,'billing_zipcode' : kg('billing_zipcode')
,'country' : kg('country')
,'billing_city' : kg('billing_city')
,'billing_zipcode' : kg('billing_zipcode')
,'country' : kg('country')
- ,'phone' : kg('phone')} )
+ ,'phone' : kg('phone')
+ ,'collection_id' : kg('collection_id')
+ ,'collection_password': kg('collection_password')} )
except ValueError, errmsg:
return context.setStatus(False, _(errmsg))
except ValueError, errmsg:
return context.setStatus(False, _(errmsg))
+except AccessControl_Unauthorized :
+ if rtool.getMode() == MODE_PASS_ANONYMOUS :
+ return context.setStatus(False, _('Wrong private collection credentials.'))
+ raise
if kg('send_password') or ptool.getProperty('validate_email') :
if kg('send_password') or ptool.getProperty('validate_email') :