From: Benoît Pin Date: Mon, 1 Sep 2014 18:43:31 +0000 (+0200) Subject: Éléments déplacés vers le produit photoprint. X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/bec2191d8ad9607db748a051eb96ed0a79e7e99f?ds=sidebyside;hp=af9b2459c45635addd229e3265bd0018d71fde3b Éléments déplacés vers le produit photoprint. --- 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