@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | |
12 | 12 | <h1><?php echo htmlspecialchars($this->t('{webauthn:webauthn:heading1}')); ?></h1> |
13 | 13 | <h2><?php echo htmlspecialchars($this->t('{webauthn:webauthn:accountEnabled}')); ?></h2> |
14 | - <?php if(((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable)?count($this->data['FIDO2Tokens']):strlen($this->data['FIDO2Tokens'])) > 0): ?> |
|
14 | + <?php if (((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable) ?count($this->data['FIDO2Tokens']) : strlen($this->data['FIDO2Tokens'])) > 0) : ?> |
|
15 | 15 | <div id="currentTokens"><span id='tokencaption'><?php echo htmlspecialchars($this->t('{webauthn:webauthn:tokenList}')); ?></span> |
16 | 16 | <ul> |
17 | - <?php foreach($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?> |
|
18 | - <?php if($this->data['FIDO2AuthSuccessful'] == false or $this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?> |
|
17 | + <?php foreach ($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?> |
|
18 | + <?php if ($this->data['FIDO2AuthSuccessful'] == false or $this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?> |
|
19 | 19 | <li class='othertoken'><?php echo htmlspecialchars($this->data['token'][3]); ?></li> |
20 | 20 | <?php else: ?> |
21 | 21 | <li class='currenttoken'><?php echo htmlspecialchars($this->data['token'][3]); ?> <?php echo htmlspecialchars($this->t('{webauthn:webauthn:currentToken}')); ?></li> |
22 | 22 | <?php endif; ?> |
23 | - <?php endforeach;?> |
|
23 | + <?php endforeach; ?> |
|
24 | 24 | </ul> |
25 | 25 | </div> |
26 | 26 | <?php endif; ?> |
27 | - <?php if(((is_array($this->data['regForm']) || $this->data['regForm'] instanceof Countable)?count($this->data['regForm']):strlen($this->data['regForm'])) > 0): ?> |
|
27 | + <?php if (((is_array($this->data['regForm']) || $this->data['regForm'] instanceof Countable) ?count($this->data['regForm']) : strlen($this->data['regForm'])) > 0) : ?> |
|
28 | 28 | <form id='regform' method='POST' action='<?php echo $this->data['regURL']; ?>'> |
29 | 29 | <input type='hidden' id='resp' name='response_id' value='0'/> |
30 | 30 | <input type='hidden' id='data' name='attestation_client_data_json' value='nix'/> |
@@ -41,22 +41,22 @@ discard block |
||
41 | 41 | return false;"/> |
42 | 42 | </form> |
43 | 43 | <div class='space'></div> |
44 | - <?php if(((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable)?count($this->data['FIDO2Tokens']):strlen($this->data['FIDO2Tokens'])) > 0): ?> |
|
45 | - <?php foreach($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?> |
|
46 | - <?php if($this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?> |
|
44 | + <?php if (((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable) ?count($this->data['FIDO2Tokens']) : strlen($this->data['FIDO2Tokens'])) > 0) : ?> |
|
45 | + <?php foreach ($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?> |
|
46 | + <?php if ($this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?> |
|
47 | 47 | <form class='deleteform' id='delete-<?php echo htmlspecialchars($index); ?>' method='POST' action='<?php echo $this->data['delURL']; ?>'> |
48 | 48 | <input type='hidden' id='credId-<?php echo htmlspecialchars($index); ?>' name='credId' value='<?php echo htmlspecialchars($this->data['token'][0]); ?>'/> |
49 | 49 | <button type='submit' id='submit-<?php echo htmlspecialchars($index); ?>' name='submit' value='DELETE'><?php echo htmlspecialchars($this->t('{webauthn:webauthn:removePrefix}')); ?> "<?php echo htmlspecialchars($this->data['token'][3]); ?>"</button> |
50 | 50 | </form> |
51 | 51 | <?php endif; ?> |
52 | - <?php endforeach;?> |
|
52 | + <?php endforeach; ?> |
|
53 | 53 | <div class='space'></div> |
54 | 54 | <form id='nevermind' method='POST' action='<?php echo $this->data['delURL']; ?>'> |
55 | 55 | <button type='submit' id='submit-nevermind' name='submit' value='NEVERMIND'><?php echo htmlspecialchars($this->t('{webauthn:webauthn:noChange}')); ?></button> |
56 | 56 | </form> |
57 | 57 | <?php endif; ?> |
58 | 58 | <?php endif; ?> |
59 | - <?php if(((is_array($this->data['authForm']) || $this->data['authForm'] instanceof Countable)?count($this->data['authForm']):strlen($this->data['authForm'])) > 0): ?> |
|
59 | + <?php if (((is_array($this->data['authForm']) || $this->data['authForm'] instanceof Countable) ?count($this->data['authForm']) : strlen($this->data['authForm'])) > 0) : ?> |
|
60 | 60 | <form id='authform' method='POST' action='<?php echo $this->data['authURL']; ?>'> |
61 | 61 | <input type='hidden' id='resp' name='response_id' value='0'/> |
62 | 62 | <input type='hidden' id='data_raw_b64' name='client_data_raw' value='garnix'/> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <!-- ignoring <input type='hidden' id='userhandle' name='userhandle' value='someuser'/> --> |
67 | 67 | <input type='hidden' id='type' name='type' value='something'/> |
68 | 68 | <input type='hidden' id='operation' name='operation' value='AUTH'/> |
69 | - <input type='checkbox' id='credentialChange' name='credentialChange'><?php if(((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable)?count($this->data['FIDO2Tokens']):strlen($this->data['FIDO2Tokens'])) < 2): ?> |
|
69 | + <input type='checkbox' id='credentialChange' name='credentialChange'><?php if (((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable) ?count($this->data['FIDO2Tokens']) : strlen($this->data['FIDO2Tokens'])) < 2) : ?> |
|
70 | 70 | <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsAdd}')); ?> |
71 | 71 | <?php else: ?> |
72 | 72 | <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsModification}')); ?> |
@@ -17,8 +17,11 @@ discard block |
||
17 | 17 | <?php foreach($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?> |
18 | 18 | <?php if($this->data['FIDO2AuthSuccessful'] == false or $this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?> |
19 | 19 | <li class='othertoken'><?php echo htmlspecialchars($this->data['token'][3]); ?></li> |
20 | - <?php else: ?> |
|
21 | - <li class='currenttoken'><?php echo htmlspecialchars($this->data['token'][3]); ?> <?php echo htmlspecialchars($this->t('{webauthn:webauthn:currentToken}')); ?></li> |
|
20 | + <?php else { |
|
21 | + : ?> |
|
22 | + <li class='currenttoken'><?php echo htmlspecialchars($this->data['token'][3]); |
|
23 | +} |
|
24 | +?> <?php echo htmlspecialchars($this->t('{webauthn:webauthn:currentToken}')); ?></li> |
|
22 | 25 | <?php endif; ?> |
23 | 26 | <?php endforeach;?> |
24 | 27 | </ul> |
@@ -68,8 +71,11 @@ discard block |
||
68 | 71 | <input type='hidden' id='operation' name='operation' value='AUTH'/> |
69 | 72 | <input type='checkbox' id='credentialChange' name='credentialChange'><?php if(((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable)?count($this->data['FIDO2Tokens']):strlen($this->data['FIDO2Tokens'])) < 2): ?> |
70 | 73 | <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsAdd}')); ?> |
71 | - <?php else: ?> |
|
72 | - <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsModification}')); ?> |
|
74 | + <?php else { |
|
75 | + : ?> |
|
76 | + <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsModification}')); |
|
77 | +} |
|
78 | +?> |
|
73 | 79 | <?php endif; ?></input><br/> |
74 | 80 | <button type='button' onClick="<?php echo $this->data['authForm']; ?>" onsubmit='false' ><?php echo htmlspecialchars($this->t('{webauthn:webauthn:authTokenButton}')); ?></button> |
75 | 81 | </form> |