From bec2191d8ad9607db748a051eb96ed0a79e7e99f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Mon, 1 Sep 2014 20:43:31 +0200 Subject: [PATCH 1/1] =?utf8?q?=C3=89l=C3=A9ments=20d=C3=A9plac=C3=A9s=20ve?= =?utf8?q?rs=20le=20produit=20photoprint.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_theme/customer_join_form.py | 61 -------- skins/photo_theme/customer_join_template.pt | 159 -------------------- skins/photo_theme/validatePrivateAccess.py | 16 -- 3 files changed, 236 deletions(-) delete mode 100755 skins/photo_theme/customer_join_form.py delete mode 100644 skins/photo_theme/customer_join_template.pt delete mode 100755 skins/photo_theme/validatePrivateAccess.py diff --git a/skins/photo_theme/customer_join_form.py b/skins/photo_theme/customer_join_form.py deleted file mode 100755 index 13422ea..0000000 --- a/skins/photo_theme/customer_join_form.py +++ /dev/null @@ -1,61 +0,0 @@ -##parameters=add='' -from Products.CMFCore.utils import getToolByName -from Products.Plinn.utils import translate -from ZTUtils import make_query as mq -_ = lambda msg : translate(msg, context) -ptool = getToolByName(script, 'portal_properties') -atool = getToolByName(script, 'portal_actions') -validate_email = ptool.getProperty('validate_email') -options = {} -options['validate_email'] = validate_email - -req = context.REQUEST -resp = req.RESPONSE -form = req.form -fg = lambda name : form.get(name,'').strip() - - -if add and \ - context.validatePassword(**form) and \ - context.customer_add_control(**form) and \ - context.validatePrivateAccess(**form) : - came_from = fg('came_from') - if came_from : - return context.setRedirect( atool, 'user/logged_in' - , came_from = came_from - , __ac_name=fg('member_id') - , __ac_password=fg('password')) - #return resp.redirect('%s?%s' % ( came_from, mq(__ac_name=fg('member_id'), __ac_password=fg('password'), noajax='1')) ) - else: - options['member_id'] = fg('member_id') - options['password'] = fg('password') - options['form_action'] = target = atool.getActionInfo('user/logged_in')['url'] - return context.confirm_join_template(**options) - -continuationFields = [ - 'given_name' - , 'name' - , 'member_email' - , 'member_id' - , 'password' - , 'confirm' - , 'send_password' - , 'wedding_id' - , 'wedding_password' - , 'wedding_password_confirm' - , 'billing_address' - , 'billing_city' - , 'billing_zipcode' - , 'country' - , 'phone' - , 'accept_gcs'] - - -for name in continuationFields : - options[name] = fg(name) - -# TODO try to be more clever... -if not options['country']: - options['country'] = 'FR' -options['came_from'] = fg('came_from') -return context.customer_join_template(**options) diff --git a/skins/photo_theme/customer_join_template.pt b/skins/photo_theme/customer_join_template.pt deleted file mode 100644 index acbf54c..0000000 --- a/skins/photo_theme/customer_join_template.pt +++ /dev/null @@ -1,159 +0,0 @@ - - - - - -
-
-
-

New customer account

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Customer informations

-
First name - -
Last name - -
Email Address - -
Member ID - -
Password - -
Password (confirm) - -
Mail Password? - - -

-

Accès à des images privées

- veuillez entrer le code d'accès pour accéder / acheter les images
- d'un événement privé couvert par les photographes de notre agence. -
Identifiant collection privée - -
Mot de passe associé - -
Confirmation du mot de passe - -

-

Billing informations

-
Address - -
City - -
Zip code - -
Country - -
Phone - -

- - I accept general conditions of sales -
  - - - - -
-
- - diff --git a/skins/photo_theme/validatePrivateAccess.py b/skins/photo_theme/validatePrivateAccess.py deleted file mode 100755 index 19e3a7d..0000000 --- a/skins/photo_theme/validatePrivateAccess.py +++ /dev/null @@ -1,16 +0,0 @@ -##parameters=**kw -kg = lambda name : kw.get(name,'').strip() - -weddingId = kg('wedding_id') -if not weddingId : - return True - -else : - password = kg('wedding_password') - confirm = kg('wedding_password_confirm') - memberId = kg('member_id') - msg = context.grantAccess(context, weddingId, password, confirm, memberId) - if msg : - return context.setStatus(False, msg) - else : - return True -- 2.20.1