|
8 | 8 | priority="999"
|
9 | 9 | >
|
10 | 10 | <!-- Put this evaluation at the very beginning -->
|
11 |
| - <xpath expr="//div[@t-if='toast_message']" position="before"> |
| 11 | + <xpath expr="//h4" position="before"> |
12 | 12 | <t t-set="user" t-value="request.env.user" />
|
13 | 13 | <t t-set="partner" t-value="user.partner_id" />
|
14 | 14 | <t
|
|
18 | 18 | </xpath>
|
19 | 19 | <!-- Hide the existing element and recreate it as both class and t-att-class can't coexist -->
|
20 | 20 | <xpath
|
21 |
| - expr="//form//div[@id='o_wevent_tickets_collapse']//button" |
| 21 | + expr="//button[@data-bs-target='#modal_ticket_registration']" |
22 | 22 | position="attributes"
|
23 | 23 | >
|
24 | 24 | <attribute name="class">d-none</attribute>
|
25 | 25 | </xpath>
|
26 | 26 | <xpath
|
27 |
| - expr="//form//div[@id='o_wevent_tickets_collapse']//button" |
| 27 | + expr="//button[@data-bs-target='#modal_ticket_registration']" |
28 | 28 | position="after"
|
29 | 29 | >
|
30 | 30 | <button
|
31 |
| - type="submit" |
32 |
| - t-att-class="'btn btn-primary o_wait_lazy_js a-submit ' + ('disabled' if is_disabled_for_non_members else '')" |
33 |
| - t-attf-id="#{event.id}" |
34 |
| - > |
35 |
| - Register |
36 |
| - <t |
37 |
| - t-if="event.seats_limited and event.seats_max and event.seats_available <= (event.seats_max * 0.2)" |
38 |
| - > |
39 |
| - (only <t t-out="event.seats_available" /> available) |
40 |
| - </t> |
41 |
| - </button> |
42 |
| - <t t-if="is_disabled_for_non_members"> |
43 |
| - <a class="text-center small" href="/membership-info">Members only</a> |
44 |
| - </t> |
45 |
| - </xpath> |
46 |
| - <!-- Hide the existing element and recreate it as both class and t-att-class can't coexist --> |
47 |
| - <xpath expr="//form//div[@t-else='']//button" position="attributes"> |
48 |
| - <attribute name="class">d-none</attribute> |
49 |
| - </xpath> |
50 |
| - <xpath expr="//form//div[@t-else='']//button" position="after"> |
51 |
| - <button |
52 |
| - type="submit" |
53 |
| - t-att-class="'btn btn-primary o_wait_lazy_js a-submit ' + ('disabled' if is_disabled_for_non_members else '')" |
| 31 | + t-if="event.event_registrations_open" |
| 32 | + type="button" |
| 33 | + data-bs-toggle="modal" |
| 34 | + data-bs-target="#modal_ticket_registration" |
| 35 | + t-att-class="'btn btn-primary w-100 ' + ('disabled' if is_disabled_for_non_members else '')" |
54 | 36 | t-attf-id="#{event.id}"
|
55 | 37 | >
|
56 | 38 | Register
|
|
0 commit comments