|
20 | 20 |
|
21 | 21 | echo '<script type="text/javascript" src="'.$this->coreWebroot.'/public/js/apikey/apikey.usertab.js"></script>'; |
22 | 22 | ?> |
| 23 | +<h3>REST Web API</h3> |
| 24 | +<p><b>Base URL:</b> <a href="<?php echo $this->serverURL.$this->webroot; ?>/rest"><?php echo $this->serverURL.$this->webroot; ?>/rest</a></p> |
23 | 25 |
|
24 | | -<h3><?php echo $this->t('Generated API keys') ?></h3> |
| 26 | +<h3><?php echo $this->t('Generated API Keys') ?></h3> |
25 | 27 | <?php if (count($this->userapiDaos) == 0) { |
26 | 28 | echo "You do not have any API keys.<br/>"; |
27 | 29 | } else { |
28 | 30 | ?> |
29 | 31 | <table width="100%" border="0"> |
30 | 32 | <tr bgcolor="#999999"> |
31 | | - <td> |
32 | | - <center><b><?php echo $this->t('Application Name') ?></b> |
33 | | - </center> |
34 | | - </td> |
35 | | - <td> |
36 | | - <center><b>API Key</b></center> |
37 | | - </td> |
38 | | - <td> |
39 | | - <center><b><?php echo $this->t('Default Expiration') ?></b> |
40 | | - </center> |
41 | | - </td> |
42 | | - <td> |
43 | | - <center><b>Creation</b></center> |
44 | | - </td> |
45 | | - <td> |
46 | | - <center><b>Action</b></center> |
47 | | - </td> |
| 33 | + <th><?php echo $this->t('Application Name') ?></th> |
| 34 | + <th>API Key</th> |
| 35 | + <th><?php echo $this->t('Default Expiration') ?></th> |
| 36 | + <th>Creation</th> |
| 37 | + <th>Action</th> |
48 | 38 | </tr> |
49 | 39 | <?php |
50 | 40 | foreach ($this->userapiDaos as $userapiDao) { |
51 | 41 | ?> |
52 | 42 | <tr> |
53 | 43 | <td><?php echo $this->escape($userapiDao->getApplicationName()); ?></td> |
54 | 44 | <td><?php echo $this->escape($userapiDao->getApikey()); ?></td> |
55 | | - <td><?php echo $this->escape($userapiDao->getTokenExpirationTime()); ?> minutes |
56 | | - </td> |
| 45 | + <td><?php echo $this->escape($userapiDao->getTokenExpirationTime()); ?> minutes</td> |
57 | 46 | <td><?php echo $this->dateago($userapiDao->getCreationDate()); ?></td> |
58 | 47 | <td> |
59 | 48 | <a style='text-decoration: underline;' class='deleteApiKeyLink' |
60 | 49 | element='<?php echo $this->escape($userapiDao->getKey()); ?>'><?php echo $this->t('delete') ?></a> |
61 | 50 | </td> |
62 | 51 | </tr> |
63 | 52 | <?php |
64 | | - } // end foreach keys |
| 53 | + } |
65 | 54 | ?> |
66 | 55 | </table> |
67 | 56 | <?php |
68 | | -} // end count |
| 57 | +} |
69 | 58 | ?> |
70 | 59 |
|
71 | | -<a href="<?php echo $this->webroot ?>/rest">Web API Information</a> |
| 60 | +<br /> |
72 | 61 |
|
73 | | -<div class="separator"></div> |
74 | 62 | <h3><?php echo $this->t('Generate New API Key') ?></h3> |
75 | 63 |
|
76 | | -<form class="genericForm" id="generateKeyForm" method="<?php echo $this->form['method'] ?>" |
77 | | - action="<?php echo $this->form['action'] ?>"> |
| 64 | +<form class="genericForm" id="generateKeyForm" method="<?php echo $this->form['method']; ?>" |
| 65 | + action="<?php echo $this->form['action']; ?>"> |
78 | 66 | <input type="hidden" id="apiUserId" name="userId" value="<?php echo $this->escape($this->user->getKey()); ?>"/> |
79 | 67 |
|
80 | 68 | <div> |
81 | | - <label for="appplication_name"><?php echo $this->t('Application Name') ?>:</label> |
82 | | - <?php echo $this->form['appplication_name'] ?> |
| 69 | + <label for="appplication_name"><?php echo $this->t('Application Name'); ?>:</label> |
| 70 | + <?php echo $this->form['appplication_name']; ?> |
83 | 71 | </div> |
84 | 72 | <div> |
85 | | - <label for="expiration"><?php echo $this->t('Default Expiration') ?> (minutes):</label> |
86 | | - <?php echo $this->form['expiration'] ?> |
| 73 | + <label for="expiration"><?php echo $this->t('Default Expiration'); ?> (minutes):</label> |
| 74 | + <?php echo $this->form['expiration']; ?> |
87 | 75 | </div> |
88 | 76 | <div> |
89 | | - <?php echo $this->form['createAPIKey'] ?> |
| 77 | + <?php echo $this->form['createAPIKey']; ?> |
90 | 78 | </div> |
91 | 79 | </form> |
0 commit comments