[FIX][IMP] website_event, website_event_sale: register process

- email is now required when buying tickets, to avois having subscription
that we cannot email with event information
- 'not yet started' message should be linked to the event state, not to the
fact that the event has tickets or not. A confirmed event without configured
tickets is just displayed on the website, but not set as unconfigured.
This commit is contained in:
Thibault Delavallée
2015-04-02 11:29:43 +02:00
parent 16f23dd43a
commit 49f7cc231c
2 changed files with 13 additions and 13 deletions
+11 -4
View File
@@ -386,7 +386,7 @@
</tr>
</thead>
<tbody>
<tr>
<tr t-if="event.state == 'confirm'">
<td>Event Subscription</td>
<td>
<t t-if="event.date_begin">
@@ -409,7 +409,14 @@
</tr>
</tbody>
</table>
<button type="submit" t-if="event.seats_availability == 'unlimited' or event.seats_available" class="btn btn-primary btn-lg pull-right a-submit" t-attf-id="#{event.id}">Register Now</button>
<button type="submit" t-if="event.state == 'confirm' and (event.seats_availability == 'unlimited' or event.seats_available)"
class="btn btn-primary btn-lg pull-right a-submit" t-attf-id="#{event.id}">Register Now</button>
<div t-if="not event.state == 'confirm'" class="alert alert-info">
Event registration not yet started.
<t t-if="uid">
<i class="fa fa-plus-circle"><a t-attf-href="/web#id=#{event.id}&amp;view_type=form&amp;model=event.event"> <em>Configure and Launch Event Registration</em></a></i>
</t>
</div>
</form>
</template>
@@ -439,15 +446,15 @@
</h4>
<div class="row">
<div class="col-md-4"><strong>Name</strong></div>
<div class="col-md-5"><strong>Email</strong></div>
<div class="col-md-3"><strong>Phone</strong> <span class="text-muted">(Optional)</span></div>
<div class="col-md-5"><strong>Email</strong> <span class="text-muted">(Optional)</span></div>
</div>
<t t-foreach="range(1, ticket['quantity'] + 1)" t-as="att_counter" name="attendee_loop">
<t t-set="counter" t-value="counter + 1"/>
<div class="row mb4">
<div class="col-md-4"><input class='form-control' type='text' t-attf-name="#{counter}-name" required="This field is required" t-att-placeholder="'Attendee #%s' %counter"/></div>
<div class="col-md-5"><input class='form-control' type='email' t-attf-name="#{counter}-email" required="This field is required"/></div>
<div class="col-md-3"><input class='form-control' type='tel' t-attf-name="#{counter}-phone"/></div>
<div class="col-md-5"><input class='form-control' type='email' t-attf-name="#{counter}-email"/></div>
<input class='hidden' type='text' t-attf-name="#{counter}-ticket_id" t-attf-value="#{ticket['id']}"/>
</div>
</t>
@@ -74,15 +74,8 @@
</tbody>
</xpath>
<xpath expr="//button[@type='submit']" position="replace">
<button type="submit" t-if="event.seats_available or event.seats_availability == 'unlimited'" class="btn btn-primary btn-lg pull-right a-submit" t-attf-id="#{event.id}">Order Now</button>
<form t-if="not event.event_ticket_ids">
<div class="alert alert-info">
Event registration not yet started.
<t t-if="uid">
<i class="fa fa-plus-circle"><a t-attf-href="/web#id=#{event.id}&amp;view_type=form&amp;model=event.event"> <em>Configure Event Registration</em></a></i>
</t>
</div>
</form>
<button type="submit" t-if="event.state == 'confirm' and (event.seats_available or event.seats_availability == 'unlimited')"
class="btn btn-primary btn-lg pull-right a-submit" t-attf-id="#{event.id}">Order Now</button>
</xpath>
</template>