aboutsummaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/403.php20
-rw-r--r--core/templates/404.php4
-rw-r--r--core/templates/confirmation.php2
-rw-r--r--core/templates/filetemplates/template.odpbin13090 -> 0 bytes
-rw-r--r--core/templates/filetemplates/template.odsbin7134 -> 0 bytes
-rw-r--r--core/templates/filetemplates/template.odtbin7938 -> 0 bytes
-rw-r--r--core/templates/installation.php165
-rw-r--r--core/templates/layout.guest.php6
-rw-r--r--core/templates/layout.public.php3
-rw-r--r--core/templates/layout.user.php4
-rw-r--r--core/templates/login.php2
-rw-r--r--core/templates/loginflow/authpicker.php4
-rw-r--r--core/templates/loginflow/grant.php3
-rw-r--r--core/templates/loginflowv2/authpicker.php2
-rw-r--r--core/templates/loginflowv2/grant.php2
-rw-r--r--core/templates/print_exception.php6
-rw-r--r--core/templates/print_xml_exception.php6
-rw-r--r--core/templates/recommendedapps.php2
-rw-r--r--core/templates/success.php4
-rw-r--r--core/templates/twofactorselectchallenge.php8
-rw-r--r--core/templates/twofactorsetupchallenge.php2
-rw-r--r--core/templates/twofactorsetupselection.php4
-rw-r--r--core/templates/twofactorshowchallenge.php4
23 files changed, 53 insertions, 200 deletions
diff --git a/core/templates/403.php b/core/templates/403.php
index 091db720b16..dc34c8d854f 100644
--- a/core/templates/403.php
+++ b/core/templates/403.php
@@ -8,15 +8,23 @@
if (!isset($_)) {//standalone page is not supported anymore - redirect to /
require_once '../../lib/base.php';
- $urlGenerator = \OC::$server->getURLGenerator();
+ $urlGenerator = \OCP\Server::get(\OCP\IURLGenerator::class);
header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
exit;
}
// @codeCoverageIgnoreEnd
?>
-<div class="guest-box">
+<div class="body-login-container update">
+ <div class="icon-big icon-password"></div>
<h2><?php p($l->t('Access forbidden')); ?></h2>
- <p class='hint'><?php if (isset($_['message'])) {
- p($_['message']);
- }?></p>
-</ul>
+ <p class="hint">
+ <?php if (isset($_['message'])): ?>
+ <?php p($_['message']); ?>
+ <?php else: ?>
+ <?php p($l->t('You are not allowed to access this page.')); ?>
+ <?php endif; ?>
+ </p>
+ <p><a class="button primary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkTo('', 'index.php')) ?>">
+ <?php p($l->t('Back to %s', [$theme->getName()])); ?>
+ </a></p>
+</div>
diff --git a/core/templates/404.php b/core/templates/404.php
index d2dc10f9aa8..3dcce4d26d3 100644
--- a/core/templates/404.php
+++ b/core/templates/404.php
@@ -11,7 +11,7 @@
if (!isset($_)) {//standalone page is not supported anymore - redirect to /
require_once '../../lib/base.php';
- $urlGenerator = \OC::$server->getURLGenerator();
+ $urlGenerator = \OCP\Server::get(\OCP\IURLGenerator::class);
header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
exit;
}
@@ -24,7 +24,7 @@ if (!isset($_)) {//standalone page is not supported anymore - redirect to /
<div class="icon-big icon-search"></div>
<h2><?php p($l->t('Page not found')); ?></h2>
<p class="infogroup"><?php p($l->t('The page could not be found on the server or you may not be allowed to view it.')); ?></p>
- <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>">
+ <p><a class="button primary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkTo('', 'index.php')) ?>">
<?php p($l->t('Back to %s', [$theme->getName()])); ?>
</a></p>
</div>
diff --git a/core/templates/confirmation.php b/core/templates/confirmation.php
index 7373f73fbc2..0a73699fd68 100644
--- a/core/templates/confirmation.php
+++ b/core/templates/confirmation.php
@@ -7,7 +7,7 @@
/** @var \OCP\IL10N $l */
/** @var \OCP\Defaults $theme */
?>
-<div class="update">
+<div class="guest-box">
<form method="POST">
<h2><?php p($_['title']) ?></h2>
<p><?php p($_['message']) ?></p>
diff --git a/core/templates/filetemplates/template.odp b/core/templates/filetemplates/template.odp
deleted file mode 100644
index 3800a491fa6..00000000000
--- a/core/templates/filetemplates/template.odp
+++ /dev/null
Binary files differ
diff --git a/core/templates/filetemplates/template.ods b/core/templates/filetemplates/template.ods
deleted file mode 100644
index 998ea21bd73..00000000000
--- a/core/templates/filetemplates/template.ods
+++ /dev/null
Binary files differ
diff --git a/core/templates/filetemplates/template.odt b/core/templates/filetemplates/template.odt
deleted file mode 100644
index 4717040fd89..00000000000
--- a/core/templates/filetemplates/template.odt
+++ /dev/null
Binary files differ
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 320fb9df7b7..b002ee400cc 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -4,168 +4,5 @@
* SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
-script('core', 'install');
?>
-<input type='hidden' id='hasMySQL' value='<?php p($_['hasMySQL']) ?>'>
-<input type='hidden' id='hasSQLite' value='<?php p($_['hasSQLite']) ?>'>
-<input type='hidden' id='hasPostgreSQL' value='<?php p($_['hasPostgreSQL']) ?>'>
-<input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
-<form method="post" class="guest-box install-form">
-<input type="hidden" name="install" value="true">
- <?php if (count($_['errors']) > 0): ?>
- <fieldset class="warning">
- <legend><strong><?php p($l->t('Error'));?></strong></legend>
- <?php foreach ($_['errors'] as $err): ?>
- <p>
- <?php if (is_array($err)):?>
- <?php p($err['error']); ?>
- <span class='hint'><?php p($err['hint']); ?></span>
- <?php else: ?>
- <?php p($err); ?>
- <?php endif; ?>
- </p>
- <?php endforeach; ?>
- </fieldset>
- <?php endif; ?>
- <?php if (!$_['htaccessWorking']): ?>
- <fieldset class="warning">
- <legend><strong><?php p($l->t('Security warning'));?></strong></legend>
- <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
- <?php print_unescaped($l->t(
- 'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer noopener">documentation</a>.',
- [link_to_docs('admin-install')]
- )); ?></p>
- </fieldset>
- <?php endif; ?>
- <fieldset id="adminaccount">
- <legend><?php print_unescaped($l->t('<strong>Create an admin account</strong>')); ?></legend>
- <p>
- <label for="adminlogin"><?php p($l->t('New admin account name')); ?></label>
- <input type="text" name="adminlogin" id="adminlogin"
- value="<?php p($_['adminlogin']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false" autofocus required>
- </p>
- <p class="groupbottom">
- <label for="adminpass"><?php p($l->t('New admin password')); ?></label>
- <input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
- value="<?php p($_['adminpass']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false" required>
- <button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
- <img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
- </button>
- </p>
- </fieldset>
-
- <?php if (!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
- <fieldset id="advancedHeader">
- <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('core', 'actions/caret.svg')); ?>" /></a></legend>
- </fieldset>
- <?php endif; ?>
-
- <?php if (!$_['directoryIsSet'] or count($_['errors']) > 0): ?>
- <fieldset id="datadirField">
- <div id="datadirContent">
- <label for="directory"><?php p($l->t('Data folder')); ?></label>
- <input type="text" name="directory" id="directory"
- placeholder="<?php p(OC::$SERVERROOT . '/data'); ?>"
- value="<?php p($_['directory']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false">
- </div>
- </fieldset>
- <?php endif; ?>
-
- <?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?>
- <fieldset id='databaseBackend'>
- <?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) {
- $hasOtherDB = true;
- } else {
- $hasOtherDB = false;
- } //other than SQLite?>
- <legend><?php p($l->t('Configure the database')); ?></legend>
- <div id="selectDbType">
- <?php foreach ($_['databases'] as $type => $label): ?>
- <?php if (count($_['databases']) === 1): ?>
- <p class="info">
- <?php p($l->t('Only %s is available.', [$label])); ?>
- <?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br>
- <a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener">
- <?php p($l->t('For more details check out the documentation.')); ?> ↗</a>
- </p>
- <input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
- <?php else: ?>
- <input type="radio" name="dbtype" value="<?php p($type) ?>" id="<?php p($type) ?>"
- <?php print_unescaped($_['dbtype'] === $type ? 'checked="checked" ' : '') ?>/>
- <label class="<?php p($type) ?>" for="<?php p($type) ?>"><?php p($label) ?></label>
- <?php endif; ?>
- <?php endforeach; ?>
- </div>
- </fieldset>
-
- <?php if ($hasOtherDB): ?>
- <fieldset id='databaseField'>
- <div id="use_other_db">
- <p class="grouptop">
- <label for="dbuser"><?php p($l->t('Database account')); ?></label>
- <input type="text" name="dbuser" id="dbuser"
- value="<?php p($_['dbuser']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false">
- </p>
- <p class="groupmiddle">
- <label for="dbpass"><?php p($l->t('Database password')); ?></label>
- <input type="password" name="dbpass" id="dbpass"
- value="<?php p($_['dbpass']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false">
- <button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
- <img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
- </button>
- </p>
- <p class="groupmiddle">
- <label for="dbname"><?php p($l->t('Database name')); ?></label>
- <input type="text" name="dbname" id="dbname"
- value="<?php p($_['dbname']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false"
- pattern="[0-9a-zA-Z$_-]+">
- </p>
- <?php if ($_['hasOracle']): ?>
- <div id="use_oracle_db">
- <p class="groupmiddle">
- <label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
- <input type="text" name="dbtablespace" id="dbtablespace"
- value="<?php p($_['dbtablespace']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false">
- </p>
- </div>
- <?php endif; ?>
- <p class="groupbottom">
- <label for="dbhost"><?php p($l->t('Database host')); ?></label>
- <input type="text" name="dbhost" id="dbhost"
- value="<?php p($_['dbhost']); ?>"
- autocomplete="off" autocapitalize="none" spellcheck="false">
- </p>
- <p class="info">
- <?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?>
- </p>
- </div>
- </fieldset>
- <?php endif; ?>
- <?php endif; ?>
-
- <?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?>
- <div id="sqliteInformation" class="notecard warning">
- <legend><?php p($l->t('Performance warning'));?></legend>
- <p><?php p($l->t('You chose SQLite as database.'));?></p>
- <p><?php p($l->t('SQLite should only be used for minimal and development instances. For production we recommend a different database backend.'));?></p>
- <p><?php p($l->t('If you use clients for file syncing, the use of SQLite is highly discouraged.')); ?></p>
- </div>
- <?php endif ?>
-
- <div class="icon-loading-dark float-spinner">&nbsp;</div>
-
- <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Install')); ?>" data-finishing="<?php p($l->t('Installing …')); ?>"></div>
-
- <p class="info">
- <span class="icon-info-white"></span>
- <?php p($l->t('Need help?'));?>
- <a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation'));?> ↗</a>
- </p>
-</form>
+<div id="content"></div>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 64bec6de9be..1b5b90c29fc 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -35,14 +35,16 @@ p($theme->getTitle());
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
- <body id="<?php p($_['bodyid']);?>">
+ <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) {
+ p("data-theme-$themeId ");
+ }?> data-themes="<?php p(join(',', $_['enabledThemes'])) ?>">
<?php include 'layout.noscript.warning.php'; ?>
<?php include 'layout.initial-state.php'; ?>
<div class="wrapper">
<div class="v-align">
<?php if ($_['bodyid'] === 'body-login'): ?>
<header>
- <div id="header">
+ <div id="header" class="header-guest">
<div class="logo"></div>
</div>
</header>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index 9512ca8ebe4..60460d60c83 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -10,7 +10,7 @@
<meta charset="utf-8">
<title>
<?php
- p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'] . ' - ' : '');
+ p(!empty($_['pageTitle']) && (empty($_['application']) || $_['pageTitle'] !== $_['application']) ? $_['pageTitle'] . ' - ' : '');
p(!empty($_['application']) ? $_['application'] . ' - ' : '');
p($theme->getTitle());
?>
@@ -77,6 +77,7 @@ p($theme->getTitle());
<div class="header-end">
<div id="public-page-menu"></div>
+ <div id="public-page-user-menu"></div>
</div>
</header>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 80f8459666b..47cced308bc 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -11,7 +11,7 @@
*/
$getUserAvatar = static function (int $size) use ($_): string {
- return \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
+ return \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.avatar.getAvatar', [
'userId' => $_['user_uid'],
'size' => $size,
'v' => $_['userAvatarVersion']
@@ -24,7 +24,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
<meta charset="utf-8">
<title>
<?php
- p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'] . ' - ' : '');
+ p(!empty($_['pageTitle']) && (empty($_['application']) || $_['pageTitle'] !== $_['application']) ? $_['pageTitle'] . ' - ' : '');
p(!empty($_['application']) ? $_['application'] . ' - ' : '');
p($theme->getTitle());
?>
diff --git a/core/templates/login.php b/core/templates/login.php
index 949916872de..251e4cd288e 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -7,7 +7,7 @@
*
* @var \OCP\IL10N $l
*/
-script('core', 'login');
+\OCP\Util::addScript('core', 'login', 'core');
?>
<div>
<div id="login"></div>
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
index 94aace60cba..265cb04a20f 100644
--- a/core/templates/loginflow/authpicker.php
+++ b/core/templates/loginflow/authpicker.php
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-script('core', 'login/authpicker');
+\OCP\Util::addScript('core', 'login/authpicker', 'core');
style('core', 'login/authpicker');
/** @var array $_ */
@@ -31,7 +31,7 @@ $urlGenerator = $_['urlGenerator'];
<br/>
<p id="redirect-link">
- <form id="login-form" action="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>" method="get">
+ <form id="login-form" action="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct'], 'providedRedirectUri' => $_['providedRedirectUri']])) ?>" method="get">
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
</form>
</p>
diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php
index dd2fb8d1a8e..8d092f8e005 100644
--- a/core/templates/loginflow/grant.php
+++ b/core/templates/loginflow/grant.php
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-script('core', 'login/grant');
+\OCP\Util::addScript('core', 'login/grant', 'core');
style('core', 'login/authpicker');
/** @var array $_ */
@@ -35,6 +35,7 @@ $urlGenerator = $_['urlGenerator'];
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
<input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" />
+ <input type="hidden" name="providedRedirectUri" value="<?php p($_['providedRedirectUri']) ?>">
<?php if ($_['direct']) { ?>
<input type="hidden" name="direct" value="1" />
<?php } ?>
diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php
index 9c77409ed05..c60aa81d3ea 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -5,7 +5,7 @@
*/
style('core', 'login/authpicker');
-script('core', 'login/authpicker');
+\OCP\Util::addScript('core', 'login/authpicker', 'core');
/** @var array $_ */
/** @var \OCP\IURLGenerator $urlGenerator */
diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php
index 2fec49942d5..dea4ed27d6c 100644
--- a/core/templates/loginflowv2/grant.php
+++ b/core/templates/loginflowv2/grant.php
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-script('core', 'login/grant');
+\OCP\Util::addScript('core', 'login/grant', 'core');
style('core', 'login/authpicker');
/** @var array $_ */
diff --git a/core/templates/print_exception.php b/core/templates/print_exception.php
index 2def6d4e9d9..bb66d5abce3 100644
--- a/core/templates/print_exception.php
+++ b/core/templates/print_exception.php
@@ -1,11 +1,13 @@
<?php
+
+use OCP\IL10N;
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
-
-function print_exception(Throwable $e, \OCP\IL10N $l): void {
+function print_exception(Throwable $e, IL10N $l): void {
print_unescaped('<pre>');
p($e->getTraceAsString());
print_unescaped('</pre>');
diff --git a/core/templates/print_xml_exception.php b/core/templates/print_xml_exception.php
index 94452d8ae9d..f103e13545f 100644
--- a/core/templates/print_xml_exception.php
+++ b/core/templates/print_xml_exception.php
@@ -1,11 +1,13 @@
<?php
+
+use OCP\IL10N;
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
-
-function print_exception(Throwable $e, \OCP\IL10N $l): void {
+function print_exception(Throwable $e, IL10N $l): void {
p($e->getTraceAsString());
if ($e->getPrevious() !== null) {
diff --git a/core/templates/recommendedapps.php b/core/templates/recommendedapps.php
index 3654acb317d..dc92694f1b0 100644
--- a/core/templates/recommendedapps.php
+++ b/core/templates/recommendedapps.php
@@ -5,7 +5,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-script('core', 'recommendedapps');
+\OCP\Util::addScript('core', 'recommendedapps', 'core');
?>
diff --git a/core/templates/success.php b/core/templates/success.php
index 2493fe9a095..700a1611a67 100644
--- a/core/templates/success.php
+++ b/core/templates/success.php
@@ -8,10 +8,10 @@
/** @var \OCP\Defaults $theme */
?>
-<div class="update">
+<div class="guest-box">
<h2><?php p($_['title']) ?></h2>
<p><?php p($_['message']) ?></p>
- <p><a class="button primary" href="<?php p(\OC::$server->get(\OCP\IURLGenerator::class)->linkTo('', 'index.php')) ?>">
+ <p><a class="button primary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkTo('', 'index.php')) ?>">
<?php p($l->t('Go to %s', [$theme->getName()])); ?>
</a></p>
</div>
diff --git a/core/templates/twofactorselectchallenge.php b/core/templates/twofactorselectchallenge.php
index 582f45d70e8..e979cfd58ab 100644
--- a/core/templates/twofactorselectchallenge.php
+++ b/core/templates/twofactorselectchallenge.php
@@ -24,7 +24,7 @@ $noProviders = empty($_['providers']);
<strong><?php p($l->t('Two-factor authentication is enforced but has not been configured on your account. Contact your admin for assistance.')) ?></strong>
<?php } else { ?>
<strong><?php p($l->t('Two-factor authentication is enforced but has not been configured on your account. Please continue to setup two-factor authentication.')) ?></strong>
- <a class="button primary two-factor-primary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.setupProviders',
+ <a class="button primary two-factor-primary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.setupProviders',
[
'redirect_url' => $_['redirect_url'],
]
@@ -41,7 +41,7 @@ $noProviders = empty($_['providers']);
<?php foreach ($_['providers'] as $provider): ?>
<li>
<a class="two-factor-provider"
- href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
+ href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.showChallenge',
[
'challengeProviderId' => $provider->getId(),
'redirect_url' => $_['redirect_url'],
@@ -66,7 +66,7 @@ $noProviders = empty($_['providers']);
<?php endif ?>
<?php if (!is_null($_['backupProvider'])): ?>
<p>
- <a class="<?php if ($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
+ <a class="<?php if ($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.showChallenge',
[
'challengeProviderId' => $_['backupProvider']->getId(),
'redirect_url' => $_['redirect_url'],
@@ -76,7 +76,7 @@ $noProviders = empty($_['providers']);
</a>
</p>
<?php endif; ?>
- <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
+ <p><a id="cancel-login" class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
<?php p($l->t('Cancel login')) ?>
</a></p>
</div>
diff --git a/core/templates/twofactorsetupchallenge.php b/core/templates/twofactorsetupchallenge.php
index 09a143f1100..c575ca21343 100644
--- a/core/templates/twofactorsetupchallenge.php
+++ b/core/templates/twofactorsetupchallenge.php
@@ -14,7 +14,7 @@ $template = $_['template'];
<div class="body-login-container update">
<h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
<?php print_unescaped($template); ?>
- <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
+ <p><a id="cancel-login" class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
<?php p($l->t('Cancel login')) ?>
</a></p>
</div>
diff --git a/core/templates/twofactorsetupselection.php b/core/templates/twofactorsetupselection.php
index 9633e1faacb..77139ab0e2a 100644
--- a/core/templates/twofactorsetupselection.php
+++ b/core/templates/twofactorsetupselection.php
@@ -13,7 +13,7 @@ declare(strict_types=1);
<?php foreach ($_['providers'] as $provider): ?>
<li>
<a class="two-factor-provider"
- href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.setupProvider',
+ href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.setupProvider',
[
'providerId' => $provider->getId(),
'redirect_url' => $_['redirect_url'],
@@ -35,7 +35,7 @@ declare(strict_types=1);
</li>
<?php endforeach; ?>
</ul>
- <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
+ <p><a id="cancel-login" class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
<?php p($l->t('Cancel login')) ?>
</a></p>
</div>
diff --git a/core/templates/twofactorshowchallenge.php b/core/templates/twofactorshowchallenge.php
index 16f4390f177..6bc367d4025 100644
--- a/core/templates/twofactorshowchallenge.php
+++ b/core/templates/twofactorshowchallenge.php
@@ -28,7 +28,7 @@ $template = $_['template'];
<?php print_unescaped($template); ?>
<?php if (!is_null($_['backupProvider'])): ?>
<p>
- <a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
+ <a class="two-factor-secondary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.showChallenge',
[
'challengeProviderId' => $_['backupProvider']->getId(),
'redirect_url' => $_['redirect_url'],
@@ -38,7 +38,7 @@ $template = $_['template'];
</a>
</p>
<?php endif; ?>
- <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
+ <p><a id="cancel-login" class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
<?php p($l->t('Cancel login')) ?>
</a></p>
</div>