@@ -3,14 +3,17 @@ discard block |
||
3 | 3 | ?> |
4 | 4 | <?php if ($large_text): ?> |
5 | 5 | <textarea name="<?= $name ?>" class="pure-input-1" required=""><?= isset($_POST[$name]) ? $_POST[$name] : '' ?></textarea> |
6 | - <?php else: ?> |
|
6 | + <?php else { |
|
7 | + : ?> |
|
7 | 8 | <input |
8 | 9 | name="<?= $name ?>" |
9 | 10 | value="<?= isset($_POST[$name]) ? $_POST[$name] : '' ?>" |
10 | 11 | required="" |
11 | 12 | type="text" |
12 | 13 | class="pure-input-1"> |
13 | - <?php endif; ?> |
|
14 | + <?php endif; |
|
15 | +} |
|
16 | +?> |
|
14 | 17 | |
15 | 18 | <?php if (isset($errors[$name])): ?> |
16 | 19 | <div class="error pure-input-1-1"><?= $errors[$name] ?></div> |
@@ -39,7 +42,8 @@ discard block |
||
39 | 42 | But your payment is unsuccessful. If you think this is a mistake, please email us at <a href="mailto:[email protected]" class="underlined">[email protected]</a> |
40 | 43 | </p> |
41 | 44 | <a class="btn" href="<?= locale_base_url() ?>talks-and-workshops/mun/pay_again/"> Click here to pay again.</a> |
42 | - <?php else: ?> |
|
45 | + <?php else { |
|
46 | + : ?> |
|
43 | 47 | <p class="text-center lead success"> |
44 | 48 | Payment Successful. You're registered for the event. |
45 | 49 | </p> |
@@ -47,13 +51,18 @@ discard block |
||
47 | 51 | Kindly carry your payment receipt which is mailed to you while atteding workshop.<br/> |
48 | 52 | If you think this is a mistake, please email us at <a href="mailto:[email protected]" class="underlined">[email protected]</a> |
49 | 53 | </p> |
50 | - <?php endif; ?> |
|
51 | - <?php else: ?> |
|
54 | + <?php endif; |
|
55 | +} |
|
56 | +?> |
|
57 | + <?php else { |
|
58 | + : ?> |
|
52 | 59 | <form class="pure-form pure-form-stacked row" method="post" action=""> |
53 | 60 | <fieldset class="offset3 col6"> |
54 | 61 | <?php if (isset($errors['common'])): ?> |
55 | 62 | <div class="error pure-input-1-1"><?= $errors['common'] ?></div> |
56 | - <?php endif; ?> |
|
63 | + <?php endif; |
|
64 | +} |
|
65 | +?> |
|
57 | 66 | |
58 | 67 | <label><?= __('Contact number') ?></label> |
59 | 68 | <?php $text_input('contact_number'); ?> |
@@ -56,12 +56,18 @@ |
||
56 | 56 | <?php if ($is_authenticated): ?> |
57 | 57 | <?php if (!empty($user_nick)): ?> |
58 | 58 | <div class="nick"><?= sprintf(__('Hello, %s'), $user_nick) ?> <a href="<?= locale_base_url() . "logout/" ?>"><?= __('Logout') ?></a></div> |
59 | - <?php else: ?> |
|
59 | + <?php else { |
|
60 | + : ?> |
|
60 | 61 | <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div> |
61 | - <?php endif; ?> |
|
62 | - <?php else: ?> |
|
62 | + <?php endif; |
|
63 | +} |
|
64 | +?> |
|
65 | + <?php else { |
|
66 | + : ?> |
|
63 | 67 | <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div> |
64 | - <?php endif; ?> |
|
68 | + <?php endif; |
|
69 | +} |
|
70 | +?> |
|
65 | 71 | </div> |
66 | 72 | <?php endif; ?> |
67 | 73 |
@@ -17,7 +17,9 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | public function force_authentication() { |
20 | - if ($this->is_authenticated()) return; |
|
20 | + if ($this->is_authenticated()) { |
|
21 | + return; |
|
22 | + } |
|
21 | 23 | $oidc = $this->construct_oidc(); |
22 | 24 | $oidc->authenticate(); |
23 | 25 | } |
@@ -52,7 +54,9 @@ discard block |
||
52 | 54 | |
53 | 55 | public function get_user_details() { |
54 | 56 | global $cfg; |
55 | - if ($cfg['debug']) return $this->admin_details(); |
|
57 | + if ($cfg['debug']) { |
|
58 | + return $this->admin_details(); |
|
59 | + } |
|
56 | 60 | |
57 | 61 | $oidc = $this->construct_oidc(); |
58 | 62 | if (!$oidc->getIdToken()) { |
@@ -60,7 +64,9 @@ discard block |
||
60 | 64 | } |
61 | 65 | |
62 | 66 | $details = $oidc->requestUserInfo(); |
63 | - if (isset($details->error)) $oidc->refreshTokens(); |
|
67 | + if (isset($details->error)) { |
|
68 | + $oidc->refreshTokens(); |
|
69 | + } |
|
64 | 70 | return $oidc->requestUserInfo(); |
65 | 71 | } |
66 | 72 | } |
@@ -111,12 +111,18 @@ |
||
111 | 111 | <?php if ($is_authenticated): ?> |
112 | 112 | <?php if (!empty($user_nick)): ?> |
113 | 113 | <div class="nick"><?= sprintf(__('Hello, %s'), $user_nick) ?> <a href="<?= locale_base_url() . "logout/" ?>"><?= __('Logout') ?></a></div> |
114 | - <?php else: ?> |
|
114 | + <?php else { |
|
115 | + : ?> |
|
115 | 116 | <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div> |
116 | - <?php endif; ?> |
|
117 | - <?php else: ?> |
|
117 | + <?php endif; |
|
118 | +} |
|
119 | +?> |
|
120 | + <?php else { |
|
121 | + : ?> |
|
118 | 122 | <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div> |
119 | - <?php endif; ?> |
|
123 | + <?php endif; |
|
124 | +} |
|
125 | +?> |
|
120 | 126 | </div> |
121 | 127 | <?php endif; ?> |
122 | 128 | <?php endif; |