grant.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. script('core', 'login/grant');
  7. style('core', 'login/authpicker');
  8. /** @var array $_ */
  9. /** @var \OCP\IURLGenerator $urlGenerator */
  10. $urlGenerator = $_['urlGenerator'];
  11. ?>
  12. <div class="picker-window small">
  13. <h2><?php p($l->t('Account access')) ?></h2>
  14. <p class="info">
  15. <?php p($l->t('Currently logged in as %1$s (%2$s).', [
  16. $_['userDisplayName'],
  17. $_['userId'],
  18. ])) ?>
  19. </p>
  20. <p class="info">
  21. <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [
  22. '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
  23. \OCP\Util::sanitizeHTML($_['instanceName'])
  24. ])) ?>
  25. </p>
  26. <br/>
  27. <p id="redirect-link">
  28. <form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.generateAppPassword')) ?>">
  29. <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
  30. <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
  31. <?php if ($_['direct']) { ?>
  32. <input type="hidden" name="direct" value="1" />
  33. <?php } ?>
  34. <div id="submit-wrapper">
  35. <input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
  36. </div>
  37. </form>
  38. </p>
  39. </div>