]> CRI, Mines Paris - PSL - photoprint.git/commitdiff
Prise en charge du mode d'enregistrement anonyme avec mot de passe.
authorBenoît Pin <benoit.pin@gmail.com>
Wed, 3 Sep 2014 21:23:50 +0000 (23:23 +0200)
committerBenoît Pin <benoit.pin@gmail.com>
Wed, 3 Sep 2014 21:23:50 +0000 (23:23 +0200)
locales/en/LC_MESSAGES/photoprint.po
locales/fr/LC_MESSAGES/photoprint.mo
locales/fr/LC_MESSAGES/photoprint.po
locales/photoprint.pot
skins/customer_add_control.py

index f0d7834ca682d4b7554152588037a0e76a4afcd9..10842db19cf217f68b6fd2392b622280a0633a85 100644 (file)
@@ -20,42 +20,46 @@ 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 ""
 
-#: t/skins/customer_add_control.py:20
+#: t/skins/customer_add_control.py:22
 msgid "Please enter a name."
 msgstr ""
 
-#: t/skins/customer_add_control.py:21
+#: t/skins/customer_add_control.py:23
 msgid "Please enter an email."
 msgstr ""
 
-#: t/skins/customer_add_control.py:22
+#: t/skins/customer_add_control.py:24
 msgid "Please enter a member id."
 msgstr ""
 
-#: t/skins/customer_add_control.py:23
+#: t/skins/customer_add_control.py:25
 msgid "Please enter a billing address."
 msgstr ""
 
-#: t/skins/customer_add_control.py:24
+#: t/skins/customer_add_control.py:26
 msgid "Please enter a city."
 msgstr ""
 
-#: t/skins/customer_add_control.py:25
+#: t/skins/customer_add_control.py:27
 msgid "Please enter zip code."
 msgstr ""
 
-#: t/skins/customer_add_control.py:26
+#: t/skins/customer_add_control.py:28
 msgid "Please enter a country."
 msgstr ""
 
-#: t/skins/customer_add_control.py:27
+#: t/skins/customer_add_control.py:29
 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 ""
index b480a57512ef20573544d7d2d5b6ff385ff00de1..351787e9922f0fc3473a340d812a242f7d6addd8 100644 (file)
Binary files a/locales/fr/LC_MESSAGES/photoprint.mo and b/locales/fr/LC_MESSAGES/photoprint.mo differ
index e2a0659b0d07050a8334e63f00367e0615e75e95..bb0f5b3a8585c982431be79475671d20b7584694 100644 (file)
@@ -1,7 +1,7 @@
 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"
@@ -40,42 +40,46 @@ msgstr "Cliquez sur le bouton pour vous connecter immédiatement."
 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."
 
-#: t/skins/customer_add_control.py:20
+#: t/skins/customer_add_control.py:22
 msgid "Please enter a name."
 msgstr "Veuillez entrer un nom."
 
-#: t/skins/customer_add_control.py:21
+#: t/skins/customer_add_control.py:23
 msgid "Please enter an email."
 msgstr "Veuillez entrer un email."
 
-#: t/skins/customer_add_control.py:22
+#: t/skins/customer_add_control.py:24
 msgid "Please enter a member id."
 msgstr "Veuillez entrer un login."
 
-#: t/skins/customer_add_control.py:23
+#: t/skins/customer_add_control.py:25
 msgid "Please enter a billing address."
 msgstr "Veuillez entrer une addresse de facturation."
 
-#: t/skins/customer_add_control.py:24
+#: t/skins/customer_add_control.py:26
 msgid "Please enter a city."
 msgstr "Veuillez entrer une ville."
 
-#: t/skins/customer_add_control.py:25
+#: t/skins/customer_add_control.py:27
 msgid "Please enter zip code."
 msgstr "Veuillez entrer un code postal."
 
-#: t/skins/customer_add_control.py:26
+#: t/skins/customer_add_control.py:28
 msgid "Please enter a country."
 msgstr "Veuillez entrer un pays."
 
-#: t/skins/customer_add_control.py:27
+#: t/skins/customer_add_control.py:29
 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"
index 9965dd24c2d9272914dbf698eb2beddcc05a2aab..3ade077a001868ffd07224f0a6c7d5f687650fa5 100644 (file)
@@ -14,7 +14,7 @@
 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"
@@ -43,42 +43,46 @@ 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 ""
 
-#: t/skins/customer_add_control.py:20
+#: t/skins/customer_add_control.py:22
 msgid "Please enter a name."
 msgstr ""
 
-#: t/skins/customer_add_control.py:21
+#: t/skins/customer_add_control.py:23
 msgid "Please enter an email."
 msgstr ""
 
-#: t/skins/customer_add_control.py:22
+#: t/skins/customer_add_control.py:24
 msgid "Please enter a member id."
 msgstr ""
 
-#: t/skins/customer_add_control.py:23
+#: t/skins/customer_add_control.py:25
 msgid "Please enter a billing address."
 msgstr ""
 
-#: t/skins/customer_add_control.py:24
+#: t/skins/customer_add_control.py:26
 msgid "Please enter a city."
 msgstr ""
 
-#: t/skins/customer_add_control.py:25
+#: t/skins/customer_add_control.py:27
 msgid "Please enter zip code."
 msgstr ""
 
-#: t/skins/customer_add_control.py:26
+#: t/skins/customer_add_control.py:28
 msgid "Please enter a country."
 msgstr ""
 
-#: t/skins/customer_add_control.py:27
+#: t/skins/customer_add_control.py:29
 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 ""
index 00b4de3641806e8ac002883b2bf3c1a3958f132d..6efd42b486e7fe1b301dc6cef28ff2ba062dc4ee 100755 (executable)
@@ -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.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)
@@ -44,9 +46,15 @@ try:
                                                                ,'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 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') :