##parameters=**kw
from Products.CMFCore.utils import getToolByName
-from Products.realis.utils import translate
+from Products.photoprint.utils import translate
from Products.CMFDefault.utils import translate as cmf_translate
rtool = getToolByName(context, 'portal_registration')
ptool = getToolByName(context, 'portal_properties')
##parameters=add=''
from Products.CMFCore.utils import getToolByName
-from Products.realis.utils import translate
+from Products.Plinn.utils import translate
from ZTUtils import make_query as mq
_ = lambda msg : translate(msg, context)
ptool = getToolByName(script, 'portal_properties')
if add and \
context.validatePassword(**form) and \
- context.customer_add_control(**form) :
+ context.customer_add_control(**form) and \
+ context.validatePrivateAccess(**form) :
came_from = fg('came_from')
if came_from :
return context.setRedirect( atool, 'user/logged_in'
, 'password'
, 'confirm'
, 'send_password'
+ , 'wedding_id'
+ , 'wedding_password'
+ , 'wedding_password_confirm'
, 'billing_address'
, 'billing_city'
, 'billing_zipcode'
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
</head>
- <body metal:fill-slot="main_no_tabs" i18n:domain="realis"
+ <body metal:fill-slot="main_no_tabs" i18n:domain="plinn"
tal:omit-tag="">
<div tal:condition="python:options.get('came_from', '').endswith('/my_cart')"
tal:define="step_authentication python:True" tal:omit-tag="">
<tr>
<td colspan="2"><hr/></td>
</tr>
+ <tr>
+ <td colspan="2" style="text-align:center">
+ <h3>Accès à des images privées</h3>
+ veuillez entrer le code d'accès pour accéder / acheter les images<br/>
+ d'un événement privé couvert par les photographes de notre agence.
+ </td>
+ </tr>
+ <tr>
+ <th>Identifiant collection privée</th>
+ <td>
+ <input type="text" name="wedding_id" tal:attributes="value options/wedding_id"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Mot de passe associé</th>
+ <td>
+ <input type="password" name="wedding_password" tal:attributes="value options/wedding_password" />
+ </td>
+ </tr>
+ <tr>
+ <th>Confirmation du mot de passe</th>
+ <td>
+ <input type="password" name="wedding_password_confirm" tal:attributes="value options/wedding_password_confirm" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr/></td>
+ </tr>
<tr>
<td colspan="2" style="text-align:center">
<h3 i18n:translate="">Billing informations</h3>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
</head>
- <body metal:fill-slot="main_no_tabs" i18n:domain="realis" tal:omit-tag="">
+ <body metal:fill-slot="main_no_tabs" i18n:domain="photoprint" tal:omit-tag="">
<div tal:condition="python:request.get('came_from', '').endswith('/my_cart')"
tal:define="step_authentication python:True"
tal:omit-tag="">
--- /dev/null
+##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