aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/templates
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-06-08 09:52:27 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-19 11:42:41 +0200
commitd2d1e8e3750eb1c5f8049aa5d0e7326f8b49a659 (patch)
treed47b15245bfe9b238ca02ac97bd2a5e794f8af6c /apps/oauth2/templates
parent7b8063a2424ea9f9d87493a23074b62afdd57854 (diff)
downloadnextcloud-server-d2d1e8e3750eb1c5f8049aa5d0e7326f8b49a659.tar.gz
nextcloud-server-d2d1e8e3750eb1c5f8049aa5d0e7326f8b49a659.zip
Migrate OAuth Admin settings to vue
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/oauth2/templates')
-rw-r--r--apps/oauth2/templates/admin.php53
1 files changed, 2 insertions, 51 deletions
diff --git a/apps/oauth2/templates/admin.php b/apps/oauth2/templates/admin.php
index d764e17ceec..4c814e4323d 100644
--- a/apps/oauth2/templates/admin.php
+++ b/apps/oauth2/templates/admin.php
@@ -19,58 +19,9 @@
*
*/
-$urlGenerator = \OC::$server->getURLGenerator();
-$themingDefaults = \OC::$server->getThemingDefaults();
-
-script('oauth2', 'setting-admin');
+script('oauth2', 'oauth2');
style('oauth2', 'setting-admin');
-/** @var array $_ */
-/** @var \OCA\OAuth2\Db\Client[] $clients */
-$clients = $_['clients'];
?>
-<div id="oauth2" class="section">
- <h2><?php p($l->t('OAuth 2.0 clients')); ?></h2>
- <p class="settings-hint"><?php p($l->t('OAuth 2.0 allows external services to request access to %s.', [$themingDefaults->getName()])); ?></p>
-
- <table class="grid">
- <thead>
- <tr>
- <th id="headerName" scope="col"><?php p($l->t('Name')); ?></th>
- <th id="headerRedirectUri" scope="col"><?php p($l->t('Redirection URI')); ?></th>
- <th id="headerClientIdentifier" scope="col"><?php p($l->t('Client Identifier')); ?></th>
- <th id="headerSecret" scope="col"><?php p($l->t('Secret')); ?></th>
- <th id="headerRemove">&nbsp;</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $imageUrl = $urlGenerator->imagePath('core', 'actions/toggle.svg');
- foreach ($clients as $client) {
- ?>
- <tr>
- <td><?php p($client->getName()); ?></td>
- <td><?php p($client->getRedirectUri()); ?></td>
- <td><code><?php p($client->getClientIdentifier()); ?></code></td>
- <td data-value="<?php p($client->getSecret()); ?>"><code>****</code><img class='show-oauth-credentials' src="<?php p($imageUrl); ?>"/></td>
- <td>
- <form id="form-inline" class="delete" action="<?php p($urlGenerator->linkToRoute('oauth2.Settings.deleteClient', ['id' => $client->getId()])); ?>" method="POST">
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="submit" class="button icon-delete" value="">
- </form>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
- <br/>
- <h3><?php p($l->t('Add client')); ?></h3>
- <form action="<?php p($urlGenerator->linkToRoute('oauth2.Settings.addClient')); ?>" method="POST">
- <input type="text" id="name" name="name" placeholder="<?php p($l->t('Name')); ?>">
- <input type="url" id="redirectUri" name="redirectUri" placeholder="<?php p($l->t('Redirection URI')); ?>">
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="submit" class="button" value="<?php p($l->t('Add')); ?>">
- </form>
-</div>
+<div id="oauth2"></div>