Browse Source

inscription

dev-rcn
root 3 years ago
parent
commit
31048d21f0
2 changed files with 53 additions and 9 deletions
  1. +12
    -2
      controllers/kalachakra.py
  2. +41
    -7
      views/website_event_registration.xml

+ 12
- 2
controllers/kalachakra.py View File

@ -75,11 +75,21 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing,AuthSignupHome):
if data['status']=='standard':data['price']=event.booking_price
if data['status']=='member':data['price']=event.booking_member_price
if data['status']=='super member':data['price']=event.booking_super_member_price
request.session['status']=data['status']
if event.online_event:
return http.request.render('kalachakra.registration_distancial',data)
return http.request.render('kalachakra.registration_step1',data)
@http.route(['/event/registration/step2'], type='http', auth='user', website=True, sitemap=False,csrf=False)
def event_registration_step2(self,**post):
data={}
event=request.env['event.event'].sudo().search([('id','=',request.session['event_id'])])
data['event']=event
data['online']=post.get('online')
data['status']=request.session['status']
return http.request.render('kalachakra.registration_step2',data)
@http.route(['/kalachakra/makedonation'], type='http', auth='public', website=True, sitemap=False,csrf=False)


+ 41
- 7
views/website_event_registration.xml View File

@ -1,9 +1,13 @@
<odoo>
<template id="kalachakra.registration_distancial" name="Distancial Event Form">
<template id="kalachakra.registration_step1" name="Distancial Event Form">
<t t-call="website.layout">
<div class="container-fluid">
<h4 style="display: inline">Registering to : </h4><h4 style="display: inline" t-esc="event.name"></h4>
<h6>From <span t-field="event.date_begin" t-options='{"format": "dd/mm/yyyy hh:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> </h6>
<h6> Your status : <span id="your_status" t-esc='status'></span></h6>
<form action="step2" method="post" class="form js_website_submit_form">
<div class="form-group s_website_form_field col-12 s_website_form_custom " data-type="selection" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class=" col-sm-auto s_website_form_label " style="width: 200px" for="2bp1hybvcoe">
@ -13,24 +17,24 @@
<div class="row s_col_no_resize s_col_no_bgcolor s_website_form_multiple" data-display="vertical">
<div class="radio col-12">
<div class="form-check">
<input type="radio" class="s_website_form_input form-check-input" id="2bp1hybvcoe0" name="Custom Bouton radio" value="Option 1"/>
<label class="form-check-label s_website_form_check_label" for="2bp1hybvcoe0">
<input type="radio" checked="checked" class="s_website_form_input form-check-input" id="check1" name="online" value="no"/>
<label class="form-check-label s_website_form_check_label" for="check1">
Je participerai au centre Kalachakra
</label>
</div>
</div>
<div class="radio col-12">
<div class="form-check">
<input type="radio" class="s_website_form_input form-check-input" id="2bp1hybvcoe1" name="Custom Bouton radio" value="Option 2"/>
<label class="form-check-label s_website_form_check_label" for="2bp1hybvcoe1">
<input type="radio" class="s_website_form_input form-check-input" id="check2" name="online" value="yes"/>
<label class="form-check-label s_website_form_check_label" for="check2">
Je participerai sur Zoom
</label>
</div>
</div>
<div class="radio col-12">
<div class="form-check">
<input type="radio" class="s_website_form_input form-check-input" id="2bp1hybvcoe2" name="Custom Bouton radio" value="Option 3"/>
<label class="form-check-label s_website_form_check_label" for="2bp1hybvcoe2">
<input type="radio" class="s_website_form_input form-check-input" id="check3" name="online" value=""/>
<label class="form-check-label s_website_form_check_label" for="check3">
Je choisirai plus tard
</label>
</div>
@ -39,7 +43,37 @@
</div>
</div>
</div>
<button id="back_button1" type="button" class="btn btn-warning" >back</button>
<button type="submit" class="btn btn-primary" >Continue</button>
</form>
</div>
</t>
</template>
<template id="kalachakra.registration_step2" name="step2">
<t t-call="website.layout">
<div class="container-fluid">
<h4 style="display: inline">Registering to : </h4><h4 style="display: inline" t-esc="event.name"></h4>
<h6>From <span t-field="event.date_begin" t-options='{"format": "dd/mm/yyyy hh:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> </h6>
<h6> Your status : <span id="your_status" t-esc='status'></span></h6>
<h6>your registration is taken into account</h6>
<t t-if="event.online_event">
<h6>Here is the information to attend on Zoom :</h6>
<ul class="list-group">
<li class="list-group-item">link : <span t-esc="event.online_link"></span></li>
<li class="list-group-item">id : <span t-esc="event.online_id"></span></li>
<li class="list-group-item">password : <span t-esc="event.online_password"></span></li>
</ul>
</t>
<h6>Afin de recevoir les information</h6>
</div>
</t>
</template>
</odoo>

Loading…
Cancel
Save