@@ -69,6 +69,17 @@ switch ($this->getContext()->biography_error[1]) {
69
69
. $ this ->getContext ()->biography_error [1 ];
70
70
}
71
71
72
+ switch ($ this ->getContext ()->discord_username_error [1 ]) {
73
+ case null : case '' : $ discord_username_error = '' ; break ;
74
+ case 'TOO_LONG ' :
75
+ $ discord_username_error = 'Your Discord username is too long. ' ; break ;
76
+ case 'CHANGE_SUCCESS ' :
77
+ $ discord_username_error = 'Your Discord username was updated. ' ; break ;
78
+ default :
79
+ $ discord_username_error = 'Internal error: '
80
+ . $ this ->getContext ()->discord_username_error [1 ];
81
+ }
82
+
72
83
switch ($ this ->getContext ()->facebook_username_error [1 ]) {
73
84
case null : case '' : $ facebook_username_error = '' ; break ;
74
85
case 'TOO_LONG ' :
@@ -267,14 +278,33 @@ require('./header.inc.phtml');
267
278
echo '<p> ' . $ biography_error . '</p> ' ;
268
279
} ?>
269
280
</section>
281
+ <section<?php
282
+ if ($ discord_username_error ) {
283
+ echo ' class=" ' .
284
+ $ this ->getContext ()->discord_username_error [0 ] . '" ' ;
285
+ } ?> >
286
+ <hr/>
287
+ <label for="discord_username">Discord Username:</label>
288
+ <input tabindex="6"
289
+ maxlength="<?php echo
290
+ $ this ->getContext ()->discord_username_max_len ; ?> "
291
+ type="text" name="discord_username" id="discord_username"
292
+ value="<?php
293
+ echo filter_var ($ this ->getContext ()->discord_username ,
294
+ FILTER_SANITIZE_FULL_SPECIAL_CHARS );
295
+ ?> "/>
296
+ <?php if ($ discord_username_error ) {
297
+ echo '<p> ' . $ discord_username_error . '</p> ' ;
298
+ } ?>
299
+ </section>
270
300
<section<?php
271
301
if ($ facebook_username_error ) {
272
302
echo ' class=" ' .
273
303
$ this ->getContext ()->facebook_username_error [0 ] . '" ' ;
274
304
} ?> >
275
305
<hr/>
276
306
<label for="facebook_username">Facebook Username:</label>
277
- <input tabindex="6 "
307
+ <input tabindex="7 "
278
308
maxlength="<?php echo
279
309
$ this ->getContext ()->facebook_username_max_len ; ?> "
280
310
type="text" name="facebook_username" id="facebook_username"
@@ -293,7 +323,7 @@ require('./header.inc.phtml');
293
323
} ?> >
294
324
<hr/>
295
325
<label for="github_username">Github Username:</label>
296
- <input tabindex="7 "
326
+ <input tabindex="8 "
297
327
maxlength="<?php echo
298
328
$ this ->getContext ()->github_username_max_len ; ?> "
299
329
type="text" name="github_username" id="github_username"
@@ -312,7 +342,7 @@ require('./header.inc.phtml');
312
342
} ?> >
313
343
<hr/>
314
344
<label for="instagram_username">Instagram Username:</label>
315
- <input tabindex="8 "
345
+ <input tabindex="9 "
316
346
maxlength="<?php echo
317
347
$ this ->getContext ()->instagram_username_max_len ; ?> "
318
348
type="text" name="instagram_username" id="instagram_username"
@@ -330,7 +360,7 @@ require('./header.inc.phtml');
330
360
} ?> >
331
361
<hr/>
332
362
<label for="phone">Phone Number:</label>
333
- <input tabindex="9 " maxlength="<?php echo
363
+ <input tabindex="10 " maxlength="<?php echo
334
364
$ this ->getContext ()->phone_max_len ; ?> "
335
365
type="text" name="phone" id="phone"
336
366
value="<?php
@@ -346,7 +376,7 @@ require('./header.inc.phtml');
346
376
} ?> >
347
377
<hr/>
348
378
<label for="reddit_username">Reddit Username:</label>
349
- <input tabindex="10 "
379
+ <input tabindex="11 "
350
380
maxlength="<?php echo
351
381
$ this ->getContext ()->reddit_username_max_len ; ?> "
352
382
type="text" name="reddit_username" id="reddit_username"
@@ -365,7 +395,7 @@ require('./header.inc.phtml');
365
395
} ?> >
366
396
<hr/>
367
397
<label for="skype_username">Skype Username:</label>
368
- <input tabindex="11 "
398
+ <input tabindex="12 "
369
399
maxlength="<?php echo
370
400
$ this ->getContext ()->skype_username_max_len ; ?> "
371
401
type="text" name="skype_username" id="skype_username"
@@ -384,7 +414,7 @@ require('./header.inc.phtml');
384
414
} ?> >
385
415
<hr/>
386
416
<label for="steam_id">Steam Id:</label>
387
- <input tabindex="12 "
417
+ <input tabindex="13 "
388
418
maxlength="<?php echo
389
419
$ this ->getContext ()->steam_id_max_len ; ?> "
390
420
type="text" name="steam_id" id="steam_id"
@@ -403,7 +433,7 @@ require('./header.inc.phtml');
403
433
} ?> >
404
434
<hr/>
405
435
<label for="twitter_username">Twitter Username:</label>
406
- <input tabindex="13 "
436
+ <input tabindex="14 "
407
437
maxlength="<?php echo
408
438
$ this ->getContext ()->twitter_username_max_len ; ?> "
409
439
type="text" name="twitter_username" id="twitter_username"
@@ -422,7 +452,7 @@ require('./header.inc.phtml');
422
452
} ?> >
423
453
<hr/>
424
454
<label for="website">Website:</label>
425
- <input tabindex="14 "
455
+ <input tabindex="15 "
426
456
maxlength="<?php echo
427
457
$ this ->getContext ()->website_max_len ; ?> "
428
458
type="text" name="website" id="website"
@@ -436,7 +466,7 @@ require('./header.inc.phtml');
436
466
</section>
437
467
<section>
438
468
<hr/>
439
- <input tabindex="15 " type="submit" class="bg-green" value="Update"/>
469
+ <input tabindex="16 " type="submit" class="bg-green" value="Update"/>
440
470
</section>
441
471
</form>
442
472
<?php } ?>
0 commit comments