brestok commited on
Commit
b3041c3
·
1 Parent(s): ea81bc0

Refactor account registration and anonymous call handling

Browse files

- Improved logic for managing account statuses during registration.
- Enhanced validation for anonymous call purchases.
- Streamlined email notification process for new account creations.

cbh/templates/emails/anonymousBookingConfirmation.html ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}Booking Confirmed - Complete Your Registration{% endblock %}
4
+
5
+ {% block main %}
6
+ <tr>
7
+ <td style="padding: 40px 40px 32px 40px">
8
+ <table cellspacing="0" cellpadding="0" style="width: 100%">
9
+ <tr>
10
+ <td style="text-align: center">
11
+ <div style="
12
+ display: inline-block;
13
+ background-color: #d4edda;
14
+ border-radius: 50%;
15
+ padding: 16px;
16
+ margin: 0 0 24px 0;
17
+ ">
18
+ <div style="
19
+ width: 48px;
20
+ height: 48px;
21
+ background-color: #28a745;
22
+ border-radius: 50%;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ ">
27
+ <span style="color: #ffffff; font-size: 32px; line-height: 1;">✓</span>
28
+ </div>
29
+ </div>
30
+
31
+ <h1 style="
32
+ font-size: 28px;
33
+ font-weight: 600;
34
+ color: #212529;
35
+ margin: 0 0 12px 0;
36
+ line-height: 1.3;
37
+ ">
38
+ Booking Confirmed!
39
+ </h1>
40
+
41
+ <p style="
42
+ font-size: 16px;
43
+ color: #6c757d;
44
+ margin: 0 0 32px 0;
45
+ line-height: 1.6;
46
+ ">
47
+ Your payment was successful and your coaching session has been booked.<br/>
48
+ One more step to get started!
49
+ </p>
50
+ </td>
51
+ </tr>
52
+ </table>
53
+
54
+ <table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom: 32px">
55
+ <tr>
56
+ <td>
57
+ <div style="
58
+ background: linear-gradient(135deg, #54949D 0%, #4a8289 100%);
59
+ border-radius: 12px;
60
+ padding: 24px;
61
+ color: #ffffff;
62
+ ">
63
+ <table cellspacing="0" cellpadding="0" style="width: 100%">
64
+ <tr>
65
+ <td style="padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.2)">
66
+ <p style="
67
+ font-size: 13px;
68
+ font-weight: 500;
69
+ color: rgba(255, 255, 255, 0.8);
70
+ margin: 0 0 8px 0;
71
+ text-transform: uppercase;
72
+ letter-spacing: 0.5px;
73
+ ">
74
+ Your Coach
75
+ </p>
76
+ <p style="
77
+ font-size: 20px;
78
+ font-weight: 600;
79
+ color: #ffffff;
80
+ margin: 0;
81
+ ">
82
+ {{coach_name}}
83
+ </p>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td style="padding-top: 20px">
88
+ <table cellspacing="0" cellpadding="0" style="width: 100%">
89
+ <tr>
90
+ <td style="width: 50%; vertical-align: top; padding-right: 12px">
91
+ <p style="
92
+ font-size: 13px;
93
+ font-weight: 500;
94
+ color: rgba(255, 255, 255, 0.8);
95
+ margin: 0 0 8px 0;
96
+ text-transform: uppercase;
97
+ letter-spacing: 0.5px;
98
+ ">
99
+ Date & Time
100
+ </p>
101
+ <p style="
102
+ font-size: 16px;
103
+ font-weight: 600;
104
+ color: #ffffff;
105
+ margin: 0;
106
+ ">
107
+ {{start_date}}
108
+ </p>
109
+ </td>
110
+ <td style="width: 50%; vertical-align: top; padding-left: 12px">
111
+ <p style="
112
+ font-size: 13px;
113
+ font-weight: 500;
114
+ color: rgba(255, 255, 255, 0.8);
115
+ margin: 0 0 8px 0;
116
+ text-transform: uppercase;
117
+ letter-spacing: 0.5px;
118
+ ">
119
+ Duration
120
+ </p>
121
+ <p style="
122
+ font-size: 16px;
123
+ font-weight: 600;
124
+ color: #ffffff;
125
+ margin: 0;
126
+ ">
127
+ {{duration}} minutes
128
+ </p>
129
+ </td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+ </table>
135
+ </div>
136
+ </td>
137
+ </tr>
138
+ </table>
139
+
140
+ <table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom: 32px">
141
+ <tr>
142
+ <td>
143
+ <div style="
144
+ background: linear-gradient(135deg, #ffc107 0%, #f7bd11 100%);
145
+ border-radius: 12px;
146
+ padding: 24px;
147
+ text-align: center;
148
+ ">
149
+ <h3 style="
150
+ font-size: 20px;
151
+ font-weight: 600;
152
+ color: #212529;
153
+ margin: 0 0 12px 0;
154
+ ">
155
+ 📝 Complete Your Registration
156
+ </h3>
157
+ <p style="
158
+ font-size: 15px;
159
+ color: #495057;
160
+ margin: 0 0 20px 0;
161
+ line-height: 1.6;
162
+ ">
163
+ To join your session and access your Spark account,<br/>
164
+ please complete your registration now.
165
+ </p>
166
+ <table cellspacing="0" cellpadding="0" style="margin: 0 auto">
167
+ <tr>
168
+ <td style="
169
+ background-color: #212529;
170
+ border-radius: 10px;
171
+ text-align: center;
172
+ ">
173
+ <a href="{{registration_link}}" style="
174
+ display: inline-block;
175
+ padding: 14px 40px;
176
+ color: #ffffff;
177
+ text-decoration: none;
178
+ font-size: 16px;
179
+ font-weight: 600;
180
+ " class="btn-mobile">
181
+ Complete Registration
182
+ </a>
183
+ </td>
184
+ </tr>
185
+ </table>
186
+ </div>
187
+ </td>
188
+ </tr>
189
+ </table>
190
+
191
+ <table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom: 32px">
192
+ <tr>
193
+ <td>
194
+ <h3 style="
195
+ font-size: 18px;
196
+ font-weight: 600;
197
+ color: #212529;
198
+ margin: 0 0 16px 0;
199
+ ">
200
+ What Happens Next?
201
+ </h3>
202
+ <div style="
203
+ background-color: #f8f9fa;
204
+ border-radius: 12px;
205
+ padding: 20px;
206
+ ">
207
+ <table cellspacing="0" cellpadding="0" style="width: 100%">
208
+ <tr>
209
+ <td style="vertical-align: top; width: 40px; padding-right: 16px">
210
+ <div style="
211
+ width: 32px;
212
+ height: 32px;
213
+ background-color: #f7bd11;
214
+ border-radius: 50%;
215
+ display: flex;
216
+ align-items: center;
217
+ justify-content: center;
218
+ font-weight: 600;
219
+ font-size: 16px;
220
+ color: #212529;
221
+ ">
222
+ 1
223
+ </div>
224
+ </td>
225
+ <td style="vertical-align: top; padding-bottom: 16px">
226
+ <p style="
227
+ font-size: 15px;
228
+ font-weight: 600;
229
+ color: #212529;
230
+ margin: 0 0 4px 0;
231
+ ">
232
+ Complete Registration
233
+ </p>
234
+ <p style="
235
+ font-size: 14px;
236
+ color: #6c757d;
237
+ margin: 0;
238
+ line-height: 1.5;
239
+ ">
240
+ Click the button above to finish setting up your account
241
+ </p>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <td style="vertical-align: top; width: 40px; padding-right: 16px">
246
+ <div style="
247
+ width: 32px;
248
+ height: 32px;
249
+ background-color: #54949D;
250
+ border-radius: 50%;
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ font-weight: 600;
255
+ font-size: 16px;
256
+ color: #ffffff;
257
+ ">
258
+ 2
259
+ </div>
260
+ </td>
261
+ <td style="vertical-align: top; padding-bottom: 16px">
262
+ <p style="
263
+ font-size: 15px;
264
+ font-weight: 600;
265
+ color: #212529;
266
+ margin: 0 0 4px 0;
267
+ ">
268
+ Access Your Dashboard
269
+ </p>
270
+ <p style="
271
+ font-size: 14px;
272
+ color: #6c757d;
273
+ margin: 0;
274
+ line-height: 1.5;
275
+ ">
276
+ View your upcoming session and manage your bookings
277
+ </p>
278
+ </td>
279
+ </tr>
280
+ <tr>
281
+ <td style="vertical-align: top; width: 40px; padding-right: 16px">
282
+ <div style="
283
+ width: 32px;
284
+ height: 32px;
285
+ background-color: #28a745;
286
+ border-radius: 50%;
287
+ display: flex;
288
+ align-items: center;
289
+ justify-content: center;
290
+ font-weight: 600;
291
+ font-size: 16px;
292
+ color: #ffffff;
293
+ ">
294
+ 3
295
+ </div>
296
+ </td>
297
+ <td style="vertical-align: top">
298
+ <p style="
299
+ font-size: 15px;
300
+ font-weight: 600;
301
+ color: #212529;
302
+ margin: 0 0 4px 0;
303
+ ">
304
+ Join Your Session
305
+ </p>
306
+ <p style="
307
+ font-size: 14px;
308
+ color: #6c757d;
309
+ margin: 0;
310
+ line-height: 1.5;
311
+ ">
312
+ You'll receive a reminder email 1 hour before your session starts
313
+ </p>
314
+ </td>
315
+ </tr>
316
+ </table>
317
+ </div>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+
322
+ <table cellspacing="0" cellpadding="0" style="width: 100%">
323
+ <tr>
324
+ <td>
325
+ <div style="
326
+ background-color: #fff3cd;
327
+ border-left: 4px solid #ffc107;
328
+ border-radius: 8px;
329
+ padding: 20px;
330
+ ">
331
+ <h4 style="
332
+ font-size: 16px;
333
+ font-weight: 600;
334
+ color: #856404;
335
+ margin: 0 0 12px 0;
336
+ ">
337
+ Important: Registration Required
338
+ </h4>
339
+ <p style="
340
+ margin: 0;
341
+ color: #856404;
342
+ font-size: 14px;
343
+ line-height: 1.7;
344
+ ">
345
+ Without completing your registration, you won't be able to join your coaching session. Please complete this step as soon as possible to ensure access to your upcoming call.
346
+ </p>
347
+ </div>
348
+ </td>
349
+ </tr>
350
+ </table>
351
+ </td>
352
+ </tr>
353
+ {% endblock %}
354
+
355
+ {% block after_content %}
356
+ <tr>
357
+ <td style="padding: 24px 40px 32px 40px; text-align: center">
358
+ <p style="
359
+ font-size: 14px;
360
+ font-weight: 400;
361
+ color: #6c757d;
362
+ line-height: 1.6;
363
+ margin: 0 0 8px 0;
364
+ ">
365
+ Having trouble completing your registration?
366
+ </p>
367
+ <p style="
368
+ font-size: 13px;
369
+ font-weight: 400;
370
+ color: #adb5bd;
371
+ line-height: 1.6;
372
+ margin: 0;
373
+ ">
374
+ Contact us at <a href="mailto:support@spark.com" style="color: #54949D; text-decoration: none; font-weight: 500;">support@spark.com</a>
375
+ </p>
376
+ </td>
377
+ </tr>
378
+ {% endblock %}