aboutsummaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/403.php29
-rw-r--r--core/templates/404-profile.php27
-rw-r--r--core/templates/404.php15
-rw-r--r--core/templates/429.php6
-rw-r--r--core/templates/confirmation.php13
-rw-r--r--core/templates/error.php11
-rw-r--r--core/templates/exception.php27
-rw-r--r--core/templates/filepicker.html61
-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.php175
-rw-r--r--core/templates/installation_forbidden.php10
-rw-r--r--core/templates/installation_incomplete.php10
-rw-r--r--core/templates/layout.base.php24
-rw-r--r--core/templates/layout.guest.php61
-rw-r--r--core/templates/layout.initial-state.php11
-rw-r--r--core/templates/layout.noscript.warning.php15
-rw-r--r--core/templates/layout.public.php135
-rw-r--r--core/templates/layout.user.php195
-rw-r--r--core/templates/legacy/fileexists.html35
-rw-r--r--core/templates/login.php26
-rw-r--r--core/templates/loginflow/authpicker.php39
-rw-r--r--core/templates/loginflow/grant.php32
-rw-r--r--core/templates/loginflowv2/authpicker.php39
-rw-r--r--core/templates/loginflowv2/done.php21
-rw-r--r--core/templates/loginflowv2/grant.php36
-rw-r--r--core/templates/message.html3
-rw-r--r--core/templates/print_exception.php23
-rw-r--r--core/templates/print_xml_exception.php18
-rw-r--r--core/templates/profile.php5
-rw-r--r--core/templates/publicshareauth.php156
-rw-r--r--core/templates/recommendedapps.php22
-rw-r--r--core/templates/success.php8
-rw-r--r--core/templates/tags.html4
-rw-r--r--core/templates/twofactorselectchallenge.php25
-rw-r--r--core/templates/twofactorsetupchallenge.php6
-rw-r--r--core/templates/twofactorsetupselection.php39
-rw-r--r--core/templates/twofactorshowchallenge.php11
-rw-r--r--core/templates/unsupportedbrowser.php7
-rw-r--r--core/templates/untrustedDomain.php11
-rw-r--r--core/templates/update.admin.php21
-rw-r--r--core/templates/update.use-cli.php33
-rw-r--r--core/templates/update.user.php11
-rw-r--r--core/templates/xml_exception.php39
45 files changed, 645 insertions, 850 deletions
diff --git a/core/templates/403.php b/core/templates/403.php
index 1ee3569ed03..dc34c8d854f 100644
--- a/core/templates/403.php
+++ b/core/templates/403.php
@@ -1,19 +1,30 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
// @codeCoverageIgnoreStart
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
?>
-<ul>
- <li class='error'>
- <?php p($l->t('Access forbidden')); ?><br>
- <p class='hint'><?php if (isset($_['message'])) {
- p($_['message']);
-}?></p>
- </li>
-</ul>
+<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'])): ?>
+ <?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-profile.php b/core/templates/404-profile.php
deleted file mode 100644
index 867d5d8a1d3..00000000000
--- a/core/templates/404-profile.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/** @var array $_ */
-/** @var \OCP\IL10N $l */
-/** @var \OCP\Defaults $theme */
-// @codeCoverageIgnoreStart
-if (!isset($_)) { //standalone page is not supported anymore - redirect to /
- require_once '../../lib/base.php';
-
- $urlGenerator = \OC::$server->getURLGenerator();
- header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
- exit;
-}
-// @codeCoverageIgnoreEnd
-?>
-<?php if (isset($_['content'])) : ?>
- <?php print_unescaped($_['content']) ?>
-<?php else : ?>
- <div class="body-login-container update">
- <div class="icon-big icon-error icon-white"></div>
- <h2><?php p($l->t('Profile not found')); ?></h2>
- <p class="infogroup"><?php p($l->t('The profile does not exist.')); ?></p>
- <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>">
- <?php p($l->t('Back to %s', [$theme->getName()])); ?>
- </a></p>
- </div>
-<?php endif; ?>
diff --git a/core/templates/404.php b/core/templates/404.php
index 10c49f34b6c..3dcce4d26d3 100644
--- a/core/templates/404.php
+++ b/core/templates/404.php
@@ -1,4 +1,9 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
/** @var array $_ */
/** @var \OCP\IL10N $l */
/** @var \OCP\Defaults $theme */
@@ -6,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;
}
@@ -16,10 +21,10 @@ if (!isset($_)) {//standalone page is not supported anymore - redirect to /
<?php print_unescaped($_['content']) ?>
<?php else: ?>
<div class="body-login-container update">
- <div class="icon-big icon-search icon-white"></div>
- <h2><?php p($l->t('File not found')); ?></h2>
- <p class="infogroup"><?php p($l->t('The document could not be found on the server. Maybe the share was deleted or has expired?')); ?></p>
- <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>">
+ <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(\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/429.php b/core/templates/429.php
index caf8a3675e2..0cfe1eb75ff 100644
--- a/core/templates/429.php
+++ b/core/templates/429.php
@@ -1,3 +1,9 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
<div class="body-login-container update">
<h2><?php p($l->t('Too many requests')); ?></h2>
<p class="infogroup"><?php p($l->t('There were too many requests from your network. Retry later or contact your administrator if this is an error.')); ?></p>
diff --git a/core/templates/confirmation.php b/core/templates/confirmation.php
index 26014cd1e79..0a73699fd68 100644
--- a/core/templates/confirmation.php
+++ b/core/templates/confirmation.php
@@ -1,20 +1,19 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
/** @var array $_ */
/** @var \OCP\IL10N $l */
/** @var \OCP\Defaults $theme */
-
?>
-
-<div class="update">
- <form method="POST" action="<?php print_unescaped($_['targetUrl']);?>">
+<div class="guest-box">
+ <form method="POST">
<h2><?php p($_['title']) ?></h2>
<p><?php p($_['message']) ?></p>
<div class="buttons">
<input type="submit" class="primary" value="<?php p($_['action']); ?>">
</div>
- <?php foreach ($_['parameters'] as $name => $value) {?>
- <input type="hidden" name="<?php p($name); ?>" value="<?php p($value); ?>">
- <?php } ?>
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
</form>
</div>
diff --git a/core/templates/error.php b/core/templates/error.php
index c6f7706edc1..ac9bd34d558 100644
--- a/core/templates/error.php
+++ b/core/templates/error.php
@@ -1,7 +1,14 @@
-<div class="error">
+<?php
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
+<div class="guest-box">
<h2><?php p($l->t('Error')) ?></h2>
<ul>
- <?php foreach ($_["errors"] as $error):?>
+ <?php foreach ($_['errors'] as $error):?>
<li>
<p><?php p($error['error']) ?></p>
<?php if (isset($error['hint']) && $error['hint']): ?>
diff --git a/core/templates/exception.php b/core/templates/exception.php
index c8a26220092..44f9908c57c 100644
--- a/core/templates/exception.php
+++ b/core/templates/exception.php
@@ -1,30 +1,25 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
/** @var array $_ */
/** @var \OCP\IL10N $l */
-style('core', ['styles', 'header']);
+style('core', ['styles', 'header', 'exception']);
-function print_exception(Throwable $e, \OCP\IL10N $l): void {
- print_unescaped('<pre>');
- p($e->getTraceAsString());
- print_unescaped('</pre>');
-
- if ($e->getPrevious() !== null) {
- print_unescaped('<br />');
- print_unescaped('<h4>');
- p($l->t('Previous'));
- print_unescaped('</h4>');
-
- print_exception($e->getPrevious(), $l);
- }
-}
+require_once __DIR__ . '/print_exception.php';
?>
-<div class="error error-wide">
+<div class="guest-box wide">
<h2><?php p($l->t('Internal Server Error')) ?></h2>
<p><?php p($l->t('The server was unable to complete your request.')) ?></p>
<p><?php p($l->t('If this happens again, please send the technical details below to the server administrator.')) ?></p>
<p><?php p($l->t('More details can be found in the server log.')) ?></p>
+ <?php if (isset($_['serverLogsDocumentation']) && $_['serverLogsDocumentation'] !== ''): ?>
+ <p><a href="<?php print_unescaped($_['serverLogsDocumentation']) ?>" target="_blank" rel="noopener"><?php p($l->t('For more details see the documentation ↗.')) ?></a></p>
+ <?php endif; ?>
<h3><?php p($l->t('Technical details')) ?></h3>
<ul>
diff --git a/core/templates/filepicker.html b/core/templates/filepicker.html
deleted file mode 100644
index 91514010cb3..00000000000
--- a/core/templates/filepicker.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<div id="{dialog_name}" title="{title}">
- <span class="dirtree breadcrumb">
- <span class="actions creatable"><a href="#" class="icon icon-add button button-add"></a>
- <nav class="menu popovermenu bubble menu-left newFolderMenu">
- <ul><li>
- <form class="filenameform">
- <input type="text" value={newtext}>
- <input class="icon-confirm" type="submit" value="">
- </form>
- </li></ul>
- </nav>
- </span>
-
- </span>
-
- <input type="checkbox" class="hidden-visually" id="picker-showgridview" checked="checked" />
- <label id="picker-view-toggle" for="picker-showgridview" class="button icon-toggle-filelist"></label>
- <div class="filelist-container">
- <div class="emptycontent">
- <div class="icon-folder"></div>
- <h2>{emptytext}</h2>
- </div>
- <table id="picker-filestable" class="filelist list-container view-grid">
- <thead>
- <tr>
- <th id="headerName" class="column-name">
- <div id="headerName-container">
- <a class="name sort columntitle" data-sort="name">
- <span>{nameCol}</span>
- <span class="sort-indicator hidden icon-triangle-n"></span>
- </a>
- </div>
- </th>
- <th id="headerSize" class="column-size">
- <a class="size sort columntitle" data-sort="size">
- <span>{sizeCol}</span>
- <span class="sort-indicator hidden icon-triangle-n"></span></a>
- </th>
- <th id="headerDate" class="column-mtime">
- <a id="modified" class="columntitle" data-sort="mtime">
- <span>{modifiedCol}</span>
- <span class="sort-indicator hidden icon-triangle-n"></span></a>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr data-entryname="{filename}" data-type="{type}">
- <td class="filename"
- style="background-image:url({icon})">
- <span class="filename-parts">
- <span class="filename-parts__first">{filename1}</span>
- <span class="filename-parts__last">{filename2}</span>
- </span>
- </td>
- <td class="filesize">{size}</td>
- <td class="date">{date}</td>
- </tr>
- </tbody>
- </table>
- </div>
-</div>
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 0137466c9f1..b002ee400cc 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -1,171 +1,8 @@
<?php
-script('core', 'install');
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
?>
-<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 action="index.php" method="post">
-<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('Create an <strong>admin account</strong>')); ?></legend>
- <p class="grouptop">
- <input type="text" name="adminlogin" id="adminlogin"
- placeholder="<?php p($l->t('Username')); ?>"
- value="<?php p($_['adminlogin']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
- <label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label>
- </p>
- <p class="groupbottom">
- <input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
- placeholder="<?php p($l->t('Password')); ?>"
- value="<?php p($_['adminpass']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off" required>
- <label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label>
- <input type="checkbox" id="show" class="hidden-visually" name="show" aria-label="<?php p($l->t('Show password')); ?>">
- <label for="show"></label>
- </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('', 'actions/caret-white.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" autocorrect="off">
- </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" class="infield"><?php p($l->t('Database user')); ?></label>
- <input type="text" name="dbuser" id="dbuser"
- placeholder="<?php p($l->t('Database user')); ?>"
- value="<?php p($_['dbuser']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off">
- </p>
- <p class="groupmiddle">
- <input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle"
- placeholder="<?php p($l->t('Database password')); ?>"
- value="<?php p($_['dbpass']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off">
- <label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label>
- <input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle" aria-label="<?php p($l->t('Show password')); ?>">
- <label for="dbpassword-toggle"></label>
- </p>
- <p class="groupmiddle">
- <label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label>
- <input type="text" name="dbname" id="dbname"
- placeholder="<?php p($l->t('Database name')); ?>"
- value="<?php p($_['dbname']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off"
- 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"
- placeholder="<?php p($l->t('Database tablespace')); ?>"
- value="<?php p($_['dbtablespace']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off">
- </p>
- </div>
- <?php endif; ?>
- <p class="groupbottom">
- <label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label>
- <input type="text" name="dbhost" id="dbhost"
- placeholder="<?php p($l->t('Database host')); ?>"
- value="<?php p($_['dbhost']); ?>"
- autocomplete="off" autocapitalize="none" autocorrect="off">
- </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): ?>
- <fieldset id="sqliteInformation" class="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>
- </fieldset>
- <?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/installation_forbidden.php b/core/templates/installation_forbidden.php
index 743d14b1330..56b4a9082f4 100644
--- a/core/templates/installation_forbidden.php
+++ b/core/templates/installation_forbidden.php
@@ -1,6 +1,12 @@
-<div class="error">
+<?php
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
+<div class="guest-box">
<h2><?php p($l->t('Error')) ?></h2>
- <p>
+ <p class="text-left">
<?php p($l->t('It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.')) ?>
</p>
</div>
diff --git a/core/templates/installation_incomplete.php b/core/templates/installation_incomplete.php
index 867f637d701..b3a3cae5988 100644
--- a/core/templates/installation_incomplete.php
+++ b/core/templates/installation_incomplete.php
@@ -1,6 +1,12 @@
-<div class="error">
+<?php
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
+<div class="guest-box">
<h2><?php p($l->t('Error')) ?></h2>
- <p>
+ <p class="text-left">
<?php p($l->t('Could not remove CAN_INSTALL from the config folder. Please remove this file manually.')) ?>
</p>
</div>
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 0eb80098889..44731172760 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -1,24 +1,32 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
<!DOCTYPE html>
-<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
+<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php p($theme->getTitle()); ?>
</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) {
+ p(', maximum-scale=' . $_['viewport_maximum_scale']);
+ } ?>">
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
- <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
- <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
- <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
+ <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>">
+ <link rel="icon" href="<?php print_unescaped(image_path('core', 'favicon.ico')); /* IE11+ supports png */ ?>">
+ <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('core', 'favicon-touch.png')); ?>">
+ <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('core', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
<?php emit_css_loading_tags($_); ?>
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
<body id="body-public" class="layout-base">
<?php include 'layout.noscript.warning.php'; ?>
- <?php foreach ($_['initialStates'] as $app => $initialState) { ?>
- <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
- <?php }?>
+ <?php include 'layout.initial-state.php'; ?>
<div id="content" class="app-public" role="main">
<?php print_unescaped($_['content']); ?>
</div>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 980d9abb7c4..1b5b90c29fc 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -1,5 +1,12 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
<!DOCTYPE html>
-<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
+<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
<head
<?php if ($_['user_uid']) { ?>
data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>"
@@ -7,47 +14,57 @@
data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
- <?php p($theme->getTitle()); ?>
+ <?php
+ p(!empty($_['pageTitle']) ? $_['pageTitle'] . ' – ' : '');
+p($theme->getTitle());
+?>
</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+ <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) {
+ p(', maximum-scale=' . $_['viewport_maximum_scale']);
+ } ?>">
<?php if ($theme->getiTunesAppId() !== '') { ?>
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<?php } ?>
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
- <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
- <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
- <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
- <link rel="manifest" href="<?php print_unescaped(image_path('', 'manifest.json')); ?>">
+ <link rel="icon" href="<?php print_unescaped(image_path('core', 'favicon.ico')); /* IE11+ supports png */ ?>">
+ <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('core', 'favicon-touch.png')); ?>">
+ <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('core', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
+ <link rel="manifest" href="<?php print_unescaped(image_path('core', 'manifest.json')); ?>" crossorigin="use-credentials">
<?php emit_css_loading_tags($_); ?>
<?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 foreach ($_['initialStates'] as $app => $initialState) { ?>
- <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
- <?php }?>
+ <?php include 'layout.initial-state.php'; ?>
<div class="wrapper">
<div class="v-align">
<?php if ($_['bodyid'] === 'body-login'): ?>
- <header role="banner">
- <div id="header">
- <div class="logo">
- <h1 class="hidden-visually">
- <?php p($theme->getName()); ?>
- </h1>
- </div>
+ <header>
+ <div id="header" class="header-guest">
+ <div class="logo"></div>
</div>
</header>
<?php endif; ?>
- <main>
+ <div>
+ <h1 class="hidden-visually">
+ <?php p($theme->getName()); ?>
+ </h1>
<?php print_unescaped($_['content']); ?>
- </main>
+ </div>
</div>
</div>
- <footer role="contentinfo">
+ <?php
+ $longFooter = $theme->getLongFooter();
+?>
+ <footer class="guest-box <?php if ($longFooter === '') {
+ p('hidden');
+ } ?>">
<p class="info">
- <?php print_unescaped($theme->getLongFooter()); ?>
+ <?php print_unescaped($longFooter); ?>
</p>
</footer>
</body>
diff --git a/core/templates/layout.initial-state.php b/core/templates/layout.initial-state.php
new file mode 100644
index 00000000000..f2387990b12
--- /dev/null
+++ b/core/templates/layout.initial-state.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
+<div id="initial-state-container" style="display: none;">
+ <?php foreach ($_['initialStates'] as $app => $initialState) { ?>
+ <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
+ <?php }?>
+</div>
diff --git a/core/templates/layout.noscript.warning.php b/core/templates/layout.noscript.warning.php
index 7d7a32bfbf4..103af843477 100644
--- a/core/templates/layout.noscript.warning.php
+++ b/core/templates/layout.noscript.warning.php
@@ -1,11 +1,18 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
<noscript>
<div id="nojavascript">
<div>
<?php print_unescaped(str_replace(
- ['{linkstart}', '{linkend}'],
- ['<a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">', '</a>'],
- $l->t('This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page.')
- )); ?>
+ ['{linkstart}', '{linkend}'],
+ ['<a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">', '</a>'],
+ $l->t('This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page.')
+ )); ?>
</div>
</div>
</noscript>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index 17752de10cd..60460d60c83 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -1,14 +1,24 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
<!DOCTYPE html>
-<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
+<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
- <?php
- p(!empty($_['application'])?$_['application'].' - ':'');
- p($theme->getTitle());
- ?>
+ <?php
+ p(!empty($_['pageTitle']) && (empty($_['application']) || $_['pageTitle'] !== $_['application']) ? $_['pageTitle'] . ' - ' : '');
+p(!empty($_['application']) ? $_['application'] . ' - ' : '');
+p($theme->getTitle());
+?>
</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+ <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) {
+ p(', maximum-scale=' . $_['viewport_maximum_scale']);
+ } ?>">
<?php if ($theme->getiTunesAppId() !== '') { ?>
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<?php } ?>
@@ -21,86 +31,81 @@
<link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
- <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>">
+ <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>" crossorigin="use-credentials">
<?php emit_css_loading_tags($_); ?>
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
-<body id="<?php p($_['bodyid']);?>">
-<?php include('layout.noscript.warning.php'); ?>
-<?php foreach ($_['initialStates'] as $app => $initialState) { ?>
- <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
-<?php }?>
- <div id="notification-container">
- <div id="notification"></div>
+<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 id="skip-actions">
+ <?php if ($_['id-app-content'] !== null) { ?><a href="<?php p($_['id-app-content']); ?>" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a><?php } ?>
+ <?php if ($_['id-app-navigation'] !== null) { ?><a href="<?php p($_['id-app-navigation']); ?>" class="button primary skip-navigation"><?php p($l->t('Skip to navigation of app')); ?></a><?php } ?>
</div>
+
<header id="header">
- <div class="header-left">
- <span id="nextcloud">
- <div class="logo logo-icon svg"></div>
- <h1 class="header-appname">
- <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
- <?php p($template->getHeaderTitle()); ?>
- <?php } else { ?>
- <?php p($theme->getName()); ?>
+ <div class="header-start">
+ <div id="nextcloud" class="header-appname">
+ <?php if ($_['logoUrl']): ?>
+ <a href="<?php print_unescaped($_['logoUrl']); ?>"
+ aria-label="<?php p($l->t('Go to %s', [$_['logoUrl']])); ?>">
+ <div class="logo logo-icon"></div>
+ </a>
+ <?php else: ?>
+ <div class="logo logo-icon"></div>
+ <?php endif; ?>
+
+ <div class="header-info">
+ <span class="header-title">
+ <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
+ <?php p($template->getHeaderTitle()); ?>
+ <?php } else { ?>
+ <?php p($theme->getName()); ?>
+ <?php } ?>
+ </span>
+ <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
+ <span class="header-shared-by">
+ <?php p($template->getHeaderDetails()); ?>
+ </span>
<?php } ?>
- </h1>
- <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
- <div class="header-shared-by">
- <?php p($template->getHeaderDetails()); ?>
</div>
- <?php } ?>
- </span>
+ </div>
</div>
- <div class="header-right">
- <?php
- /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
- if (isset($template) && $template->getActionCount() !== 0) {
- $primary = $template->getPrimaryAction();
- $others = $template->getOtherActions(); ?>
- <span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) {
- p($primary->getIcon());
- } ?>">
- <a href="<?php p($primary->getLink()); ?>" class="primary button">
- <span><?php p($primary->getLabel()) ?></span>
- </a>
- </span>
- <?php if ($template->getActionCount() > 1) { ?>
- <div id="header-secondary-action">
- <button id="header-actions-toggle" class="menutoggle icon-more-white"></button>
- <div id="header-actions-menu" class="popovermenu menu">
- <ul>
- <?php
- /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
- foreach ($others as $action) {
- print_unescaped($action->render());
- }
- ?>
- </ul>
- </div>
- </div>
- <?php } ?>
- <?php
- } ?>
+ <div class="header-end">
+ <div id="public-page-menu"></div>
+ <div id="public-page-user-menu"></div>
</div>
</header>
- <div id="content" class="app-<?php p($_['appid']) ?>" role="main">
+
+ <div id="content" class="app-<?php p($_['appid']) ?>">
+ <h1 class="hidden-visually">
+ <?php
+ if (isset($template) && $template->getHeaderTitle() !== '') {
+ p($template->getHeaderTitle());
+ } else {
+ p($theme->getName());
+ } ?>
+ </h1>
<?php print_unescaped($_['content']); ?>
</div>
- <?php if (isset($template) && $template->getFooterVisible()) { ?>
+
+ <?php if (isset($template) && $template->getFooterVisible() && ($theme->getLongFooter() !== '' || $_['showSimpleSignUpLink'])) { ?>
<footer>
<p><?php print_unescaped($theme->getLongFooter()); ?></p>
<?php
- if ($_['showSimpleSignUpLink']) {
- ?>
- <p>
- <a href="https://nextcloud.com/signup/" target="_blank" rel="noreferrer noopener">
+if ($_['showSimpleSignUpLink']) {
+ ?>
+ <p class="footer__simple-sign-up">
+ <a href="<?php p($_['signUpLink']); ?>" target="_blank" rel="noreferrer noopener">
<?php p($l->t('Get your own free account')); ?>
</a>
</p>
<?php
- }
+}
?>
</footer>
<?php } ?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 4efe072a5bb..47cced308bc 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -1,11 +1,17 @@
<?php
/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+/**
* @var \OC_Defaults $theme
* @var array $_
*/
$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']
@@ -13,16 +19,21 @@ $getUserAvatar = static function (int $size) use ($_): string {
}
?><!DOCTYPE html>
-<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
+<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
<head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php
- p(!empty($_['application'])?$_['application'].' - ':'');
- p($theme->getTitle());
- ?>
+ p(!empty($_['pageTitle']) && (empty($_['application']) || $_['pageTitle'] !== $_['application']) ? $_['pageTitle'] . ' - ' : '');
+p(!empty($_['application']) ? $_['application'] . ' - ' : '');
+p($theme->getTitle());
+?>
</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+ <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) {
+ p(', maximum-scale=' . $_['viewport_maximum_scale']);
+ } ?>">
+
<?php if ($theme->getiTunesAppId() !== '') { ?>
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<?php } ?>
@@ -35,168 +46,48 @@ $getUserAvatar = static function (int $size) use ($_): string {
<link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
- <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>">
+ <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>" crossorigin="use-credentials">
<?php emit_css_loading_tags($_); ?>
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
- <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) {
- p("data-theme-$themeId ");
- }?>>
- <?php include 'layout.noscript.warning.php'; ?>
+ <body dir="<?php p($_['direction']); ?>" 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'; ?>
- <?php foreach ($_['initialStates'] as $app => $initialState) { ?>
- <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
- <?php }?>
-
- <a href="#app-content" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a>
- <a href="#app-navigation" class="button primary skip-navigation"><?php p($l->t('Skip to navigation of app')); ?></a>
-
- <div id="notification-container">
- <div id="notification"></div>
+ <div id="skip-actions">
+ <?php if ($_['id-app-content'] !== null) { ?><a href="<?php p($_['id-app-content']); ?>" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a><?php } ?>
+ <?php if ($_['id-app-navigation'] !== null) { ?><a href="<?php p($_['id-app-navigation']); ?>" class="button primary skip-navigation"><?php p($l->t('Skip to navigation of app')); ?></a><?php } ?>
</div>
- <header role="banner" id="header">
- <div class="header-left">
+
+ <header id="header">
+ <div class="header-start">
<a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
+ aria-label="<?php p($l->t('Go to %s', [$_['logoUrl'] ?: $_['defaultAppName']])); ?>"
id="nextcloud">
- <div class="logo logo-icon">
- <h1 class="hidden-visually">
- <?php p($theme->getName()); ?> <?php p(!empty($_['application'])?$_['application']: $l->t('Apps')); ?>
- </h1>
- </div>
+ <div class="logo logo-icon"></div>
</a>
- <ul id="appmenu">
- <?php foreach ($_['navigation'] as $entry): ?>
- <li data-id="<?php p($entry['id']); ?>" class="hidden" tabindex="-1">
- <a href="<?php print_unescaped($entry['href']); ?>"
- <?php if (isset($entry['target']) && $entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
- <?php if ($entry['active']): ?> class="active"<?php endif; ?>
- aria-label="<?php p($entry['name']); ?>">
- <svg width="24" height="20" viewBox="0 0 24 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>
- <defs>
- <mask id="hole">
- <rect width="100%" height="100%" fill="white"/>
- <circle r="4.5" cx="21" cy="3" fill="black"/>
- </mask>
- </defs>
- <image x="2" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" style="<?php if ($entry['unread'] !== 0) { ?>mask: url("#hole");<?php } ?>" class="app-icon"></image>
- <circle class="app-icon-notification" r="3" cx="21" cy="3" fill="red"/>
- </svg>
- <div class="unread-counter" aria-hidden="true"><?php p($entry['unread']); ?></div>
- <span>
- <?php p($entry['name']); ?>
- </span>
- </a>
- </li>
- <?php endforeach; ?>
- <li id="more-apps" class="menutoggle"
- aria-haspopup="true" aria-controls="navigation" aria-expanded="false">
- <a href="#" aria-label="<?php p($l->t('More apps')); ?>">
- <div class="icon-more-white"></div>
- <span><?php p($l->t('More')); ?></span>
- </a>
- </li>
- </ul>
-
- <nav role="navigation">
- <div id="navigation" style="display: none;" aria-label="<?php p($l->t('More apps menu')); ?>">
- <div id="apps">
- <ul>
- <?php foreach ($_['navigation'] as $entry): ?>
- <li data-id="<?php p($entry['id']); ?>">
- <a href="<?php print_unescaped($entry['href']); ?>"
- <?php if (isset($entry['target']) && $entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
- <?php if ($entry['active']): ?> class="active"<?php endif; ?>
- aria-label="<?php p($entry['name']); ?>">
- <svg width="20" height="20" viewBox="0 0 20 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>
- <defs>
- <filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter>
- <mask id="hole">
- <rect width="100%" height="100%" fill="white"/>
- <circle r="4.5" cx="17" cy="3" fill="black"/>
- </mask>
- </defs>
- <image x="0" y="0" width="16" height="16" preserveAspectRatio="xMinYMin meet" filter="url(#invertMenuMore-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" style="<?php if ($entry['unread'] !== 0) { ?>mask: url("#hole");<?php } ?>" class="app-icon"></image>
- <circle class="app-icon-notification" r="3" cx="17" cy="3" fill="red"/>
- </svg>
- <div class="unread-counter" aria-hidden="true"><?php p($entry['unread']); ?></div>
- <span class="app-title"><?php p($entry['name']); ?></span>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- </div>
- </div>
- </nav>
-
+ <nav id="header-start__appmenu"></nav>
</div>
- <div class="header-right">
- <div id="notifications"></div>
+ <div class="header-end">
<div id="unified-search"></div>
- <div id="contactsmenu">
- <div class="icon-contacts menutoggle" tabindex="0" role="button"
- aria-haspopup="true" aria-controls="contactsmenu-menu" aria-expanded="false">
- <span class="hidden-visually"><?php p($l->t('Contacts'));?></span>
- </div>
- <div id="contactsmenu-menu" class="menu"
- aria-label="<?php p($l->t('Contacts menu'));?>"></div>
- </div>
- <div id="settings">
- <div id="expand" tabindex="0" role="button" class="menutoggle"
- aria-label="<?php p($l->t('Settings'));?>"
- aria-haspopup="true" aria-controls="expanddiv" aria-expanded="false">
- <div id="avatardiv-menu" class="avatardiv<?php if ($_['userAvatarSet']) {
- print_unescaped(' avatardiv-shown');
- } else {
- print_unescaped('" style="display: none');
- } ?>"
- data-user="<?php p($_['user_uid']); ?>"
- data-displayname="<?php p($_['user_displayname']); ?>"
- <?php
- if ($_['userAvatarSet']) {
- $avatar32 = $getUserAvatar(32); ?> data-avatar="<?php p($avatar32); ?>"
- <?php
- } ?>>
- <?php
- if ($_['userAvatarSet']) {?>
- <img alt="" width="32" height="32"
- src="<?php p($avatar32);?>"
- srcset="<?php p($getUserAvatar(64));?> 2x, <?php p($getUserAvatar(128));?> 4x"
- >
- <?php } ?>
- </div>
- </div>
- <nav class="settings-menu" id="expanddiv" style="display:none;"
- aria-label="<?php p($l->t('Settings menu'));?>">
- <ul>
- <?php foreach ($_['settingsnavigation'] as $entry):?>
- <li data-id="<?php p($entry['id']); ?>">
- <a href="<?php print_unescaped($entry['href']); ?>"
- <?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
- <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
- <?php p($entry['name']) ?>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- </nav>
- </div>
+ <div id="notifications"></div>
+ <div id="contactsmenu"></div>
+ <div id="user-menu"></div>
</div>
</header>
- <div id="sudo-login-background" class="hidden"></div>
- <form id="sudo-login-form" class="hidden" method="POST">
- <label>
- <?php p($l->t('This action requires you to confirm your password')); ?><br/>
- <input type="password" class="question" autocomplete="new-password" name="question" value=" <?php /* Hack against browsers ignoring autocomplete="off" */ ?>"
- placeholder="<?php p($l->t('Confirm your password')); ?>" />
- </label>
- <input class="confirm" value="<?php p($l->t('Confirm')); ?>" type="submit">
- </form>
-
- <div id="content" class="app-<?php p($_['appid']) ?>" role="main">
+ <div id="content" class="app-<?php p($_['appid']) ?>">
+ <h1 class="hidden-visually" id="page-heading-level-1">
+ <?php p((!empty($_['application']) && !empty($_['pageTitle']) && $_['application'] != $_['pageTitle'])
+ ? $_['application'] . ': ' . $_['pageTitle']
+ : (!empty($_['pageTitle']) ? $_['pageTitle'] : $theme->getName())
+ ); ?>
+ </h1>
<?php print_unescaped($_['content']); ?>
</div>
<div id="profiler-toolbar"></div>
diff --git a/core/templates/legacy/fileexists.html b/core/templates/legacy/fileexists.html
new file mode 100644
index 00000000000..de213803e0e
--- /dev/null
+++ b/core/templates/legacy/fileexists.html
@@ -0,0 +1,35 @@
+<!--
+ - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ - SPDX-License-Identifier: AGPL-3.0-only
+ -->
+<div id="{dialog_name}" title="{title}" class="fileexists">
+ <span class="why">{why}<!-- Which files do you want to keep --></span><br/>
+ <span class="what">{what}<!-- If you select both versions, the copied file will have a number added to its name. --></span><br/>
+ <br/>
+ <table>
+ <th><input id="checkbox-allnewfiles" class="allnewfiles checkbox" type="checkbox" /><label for="checkbox-allnewfiles">{allnewfiles}<span class="count"></span></label></th>
+ <th><input id="checkbox-allexistingfiles" class="allexistingfiles checkbox" type="checkbox" /><label for="checkbox-allexistingfiles">{allexistingfiles}<span class="count"></span></label></th>
+ </table>
+ <div class="conflicts">
+ <div class="template">
+ <div class="filename"></div>
+ <div class="replacement">
+ <input type="checkbox" class="checkbox u-left"/>
+ <label>
+ <span class="svg icon"></span>
+ <div class="mtime"></div>
+ <div class="size"></div>
+ </label>
+ </div>
+ <div class="original">
+ <input type="checkbox" class="checkbox u-left" />
+ <label>
+ <span class="svg icon"></span>
+ <div class="mtime"></div>
+ <div class="size"></div>
+ <div class="message"></div>
+ </label>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/core/templates/login.php b/core/templates/login.php
index 6b4b9285240..251e4cd288e 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -1,16 +1,14 @@
-<?php /** @var \OCP\IL10N $l */ ?>
<?php
-script('core', 'login');
-?>
-
-<div id="login"></div>
-<?php if (!empty($_['alt_login'])) { ?>
- <div id="alternative-logins" class="alternative-logins">
- <?php foreach ($_['alt_login'] as $login): ?>
- <a class="button <?php p($login['style'] ?? ''); ?>" href="<?php print_unescaped($login['href']); ?>" >
- <?php p($login['name']); ?>
- </a>
- <?php endforeach; ?>
- </div>
-<?php } ?>
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ *
+ * @var \OCP\IL10N $l
+ */
+\OCP\Util::addScript('core', 'login', 'core');
+?>
+<div>
+ <div id="login"></div>
+</div>
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
index a7d4faa67bf..265cb04a20f 100644
--- a/core/templates/loginflow/authpicker.php
+++ b/core/templates/loginflow/authpicker.php
@@ -1,25 +1,10 @@
<?php
/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * 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 $_ */
@@ -36,28 +21,28 @@ $urlGenerator = $_['urlGenerator'];
])) ?>
</p>
- <span class="warning">
+ <div class="notecard warning">
<h3><?php p($l->t('Security warning')) ?></h3>
<p>
<?php p($l->t('If you are not trying to set up a new device or app, someone is trying to trick you into granting them access to your data. In this case do not proceed and instead contact your system administrator.')) ?>
</p>
- </span>
+ </div>
<br/>
<p id="redirect-link">
- <a href="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>">
- <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
- </a>
+ <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>
<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">
<p class="grouptop">
- <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')) ?>">
- <label for="user" class="infield"><?php p($l->t('Username')) ?></label>
+ <input type="text" name="user" id="user" placeholder="<?php p($l->t('Login')) ?>">
+ <label for="user" class="infield"><?php p($l->t('Login')) ?></label>
</p>
<p class="groupbottom">
- <input type="password" name="password" id="password" placeholder="<?php p($l->t('App token')) ?>">
+ <input type="password" name="password" id="password" placeholder="<?php p($l->t('App password')) ?>">
<label for="password" class="infield"><?php p($l->t('Password')) ?></label>
</p>
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
@@ -69,6 +54,6 @@ $urlGenerator = $_['urlGenerator'];
</form>
<?php if (empty($_['oauthState'])): ?>
- <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app token')) ?></a>
+ <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app password')) ?></a>
<?php endif; ?>
</div>
diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php
index c537c47ea64..8d092f8e005 100644
--- a/core/templates/loginflow/grant.php
+++ b/core/templates/loginflow/grant.php
@@ -1,25 +1,10 @@
<?php
/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * 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 $_ */
@@ -27,9 +12,15 @@ style('core', 'login/authpicker');
$urlGenerator = $_['urlGenerator'];
?>
-<div class="picker-window">
+<div class="picker-window small">
<h2><?php p($l->t('Account access')) ?></h2>
<p class="info">
+ <?php p($l->t('Currently logged in as %1$s (%2$s).', [
+ $_['userDisplayName'],
+ $_['userId'],
+ ])) ?>
+ </p>
+ <p class="info">
<?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [
'<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
\OCP\Util::sanitizeHTML($_['instanceName'])
@@ -44,7 +35,8 @@ $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']) ?>" />
- <?php if (p($_['direct'])) { ?>
+ <input type="hidden" name="providedRedirectUri" value="<?php p($_['providedRedirectUri']) ?>">
+ <?php if ($_['direct']) { ?>
<input type="hidden" name="direct" value="1" />
<?php } ?>
<div id="submit-wrapper">
diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php
index 8caa42f2ce8..c60aa81d3ea 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -1,26 +1,11 @@
<?php
/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
style('core', 'login/authpicker');
-script('core', 'login/authpicker');
+\OCP\Util::addScript('core', 'login/authpicker', 'core');
/** @var array $_ */
/** @var \OCP\IURLGenerator $urlGenerator */
@@ -36,28 +21,28 @@ $urlGenerator = $_['urlGenerator'];
])) ?>
</p>
- <span class="warning">
+ <div class="notecard warning">
<h3><?php p($l->t('Security warning')) ?></h3>
<p>
<?php p($l->t('If you are not trying to set up a new device or app, someone is trying to trick you into granting them access to your data. In this case do not proceed and instead contact your system administrator.')) ?>
</p>
- </span>
+ </div>
<br/>
<p id="redirect-link">
- <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user']])) ?>">
- <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
- </a>
+ <form id="login-form" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user'], 'direct' => $_['direct'] ?? 0])) ?>" method="get">
+ <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
+ </form>
</p>
<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">
<p class="grouptop">
- <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')) ?>">
- <label for="user" class="infield"><?php p($l->t('Username')) ?></label>
+ <input type="text" name="user" id="user" placeholder="<?php p($l->t('Login')) ?>">
+ <label for="user" class="infield"><?php p($l->t('Login')) ?></label>
</p>
<p class="groupbottom">
- <input type="password" name="password" id="password" placeholder="<?php p($l->t('App token')) ?>">
+ <input type="password" name="password" id="password" placeholder="<?php p($l->t('App password')) ?>">
<label for="password" class="infield"><?php p($l->t('Password')) ?></label>
</p>
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
@@ -66,6 +51,6 @@ $urlGenerator = $_['urlGenerator'];
</form>
<?php if (empty($_['oauthState'])): ?>
- <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app token')) ?></a>
+ <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app password')) ?></a>
<?php endif; ?>
</div>
diff --git a/core/templates/loginflowv2/done.php b/core/templates/loginflowv2/done.php
index 8b9dc3649e1..b0369a0a637 100644
--- a/core/templates/loginflowv2/done.php
+++ b/core/templates/loginflowv2/done.php
@@ -1,25 +1,8 @@
<?php
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
style('core', 'login/authpicker');
diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php
index b036d33ad7c..dea4ed27d6c 100644
--- a/core/templates/loginflowv2/grant.php
+++ b/core/templates/loginflowv2/grant.php
@@ -1,25 +1,10 @@
<?php
/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * 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 $_ */
@@ -27,9 +12,15 @@ style('core', 'login/authpicker');
$urlGenerator = $_['urlGenerator'];
?>
-<div class="picker-window">
+<div class="picker-window small">
<h2><?php p($l->t('Account access')) ?></h2>
<p class="info">
+ <?php p($l->t('Currently logged in as %1$s (%2$s).', [
+ $_['userDisplayName'],
+ $_['userId'],
+ ])) ?>
+ </p>
+ <p class="info">
<?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [
'<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
\OCP\Util::sanitizeHTML($_['instanceName'])
@@ -41,10 +32,13 @@ $urlGenerator = $_['urlGenerator'];
<p id="redirect-link">
<form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.generateAppPassword')) ?>">
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
+ <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
+ <?php if ($_['direct']) { ?>
+ <input type="hidden" name="direct" value="1" />
+ <?php } ?>
<div id="submit-wrapper">
<input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
- </div>
+ </div>
</form>
</p>
</div>
diff --git a/core/templates/message.html b/core/templates/message.html
deleted file mode 100644
index 06f8a789599..00000000000
--- a/core/templates/message.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div id="{dialog_name}" title="{title} ">
- <p><span class="ui-icon ui-icon-{type}"></span>{message}</p>
-</div>
diff --git a/core/templates/print_exception.php b/core/templates/print_exception.php
new file mode 100644
index 00000000000..bb66d5abce3
--- /dev/null
+++ b/core/templates/print_exception.php
@@ -0,0 +1,23 @@
+<?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, IL10N $l): void {
+ print_unescaped('<pre>');
+ p($e->getTraceAsString());
+ print_unescaped('</pre>');
+
+ if ($e->getPrevious() !== null) {
+ print_unescaped('<br />');
+ print_unescaped('<h4>');
+ p($l->t('Previous'));
+ print_unescaped('</h4>');
+
+ print_exception($e->getPrevious(), $l);
+ }
+}
diff --git a/core/templates/print_xml_exception.php b/core/templates/print_xml_exception.php
new file mode 100644
index 00000000000..f103e13545f
--- /dev/null
+++ b/core/templates/print_xml_exception.php
@@ -0,0 +1,18 @@
+<?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, IL10N $l): void {
+ p($e->getTraceAsString());
+
+ if ($e->getPrevious() !== null) {
+ print_unescaped('<s:previous-exception>');
+ print_exception($e->getPrevious(), $l);
+ print_unescaped('</s:previous-exception>');
+ }
+}
diff --git a/core/templates/profile.php b/core/templates/profile.php
deleted file mode 100644
index 84d6eb0e38f..00000000000
--- a/core/templates/profile.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<div
- id="vue-profile"
- class="icon-loading"
- style="width: 100%;">
-</div>
diff --git a/core/templates/publicshareauth.php b/core/templates/publicshareauth.php
index 74303ce02ea..f8e102076bb 100644
--- a/core/templates/publicshareauth.php
+++ b/core/templates/publicshareauth.php
@@ -1,83 +1,87 @@
<?php
- /** @var array $_ */
- /** @var \OCP\IL10N $l */
- style('core', 'guest');
- style('core', 'publicshareauth');
- script('core', 'publicshareauth');
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+/** @var array $_ */
+/** @var \OCP\IL10N $l */
+\OCP\Util::addStyle('core', 'guest');
+\OCP\Util::addStyle('core', 'publicshareauth');
+\OCP\Util::addScript('core', 'publicshareauth');
?>
-<!-- password prompt form. It should be hidden when we show the email prompt form -->
-<?php if (!isset($_['identityOk'])): ?>
- <form method="post" id="password-input-form">
-<?php else: ?>
- <form method="post" id="password-input-form" style="display:none;">
-<?php endif; ?>
- <fieldset class="warning">
- <?php if (!isset($_['wrongpw'])): ?>
- <div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
- <?php endif; ?>
- <?php if (isset($_['wrongpw'])): ?>
- <div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
- <?php endif; ?>
- <p>
- <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="password" name="password" id="password"
- placeholder="<?php p($l->t('Password')); ?>" value=""
- autocomplete="new-password" autocapitalize="off" autocorrect="off"
- autofocus />
- <input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
- <input type="hidden" name="sharingType" value="<?php p($_['share']->getShareType()) ?>" id="sharingType">
- <input type="submit" id="password-submit"
- class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
- </p>
- </fieldset>
-</form>
+<div class="guest-box">
+ <!-- password prompt form. It should be hidden when we show the email prompt form -->
+ <?php if (!isset($_['identityOk'])): ?>
+ <form method="post" id="password-input-form">
+ <?php else: ?>
+ <form method="post" id="password-input-form" style="display:none;">
+ <?php endif; ?>
+ <fieldset class="warning">
+ <?php if (!isset($_['wrongpw'])): ?>
+ <div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
+ <?php endif; ?>
+ <?php if (isset($_['wrongpw'])): ?>
+ <div class="warning wrongPasswordMsg"><?php p($l->t('The password is wrong or expired. Please try again or request a new one.')); ?></div>
+ <?php endif; ?>
+ <p>
+ <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
+ <input type="hidden" id="requesttoken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
+ <input type="password" name="password" id="password"
+ placeholder="<?php p($l->t('Password')); ?>" value=""
+ autocomplete="new-password" autocapitalize="off" spellcheck="false"
+ autofocus />
+ <input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
+ <input type="hidden" name="sharingType" value="<?php p($_['share']->getShareType()) ?>" id="sharingType">
+ <input type="submit" id="password-submit"
+ class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
+ </p>
+ </fieldset>
+ </form>
-<!-- email prompt form. It should initially be hidden -->
-<?php if (isset($_['identityOk'])): ?>
- <form method="post" id="email-input-form">
-<?php else: ?>
- <form method="post" id="email-input-form" style="display:none;">
-<?php endif; ?>
- <fieldset class="warning">
- <div class="warning-info" id="email-prompt"><?php p($l->t('Please type in your email address to request a temporary password')); ?></div>
- <p>
- <input type="email" id="email" name="identityToken" placeholder="<?php p($l->t('Email address')); ?>" />
- <input type="submit" id="password-request" name="passwordRequest" class="svg icon-confirm input-button-inline" value="" disabled="disabled"/>
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
- <input type="hidden" name="sharingType" value="<?php p($_['share']->getShareType()) ?>" id="sharingType">
- </p>
- <?php if (isset($_['identityOk'])): ?>
- <?php if ($_['identityOk']): ?>
- <div class="warning-info" id="identification-success"><?php p($l->t('Password sent!')); ?></div>
- <?php else: ?>
- <div class="warning" id="identification-failure"><?php p($l->t('You are not authorized to request a password for this share')); ?></div>
+ <!-- email prompt form. It should initially be hidden -->
+ <?php if (isset($_['identityOk'])): ?>
+ <form method="post" id="email-input-form">
+ <?php else: ?>
+ <form method="post" id="email-input-form" style="display:none;">
+ <?php endif; ?>
+ <fieldset class="warning">
+ <div class="warning-info" id="email-prompt"><?php p($l->t('Please type in your email address to request a temporary password')); ?></div>
+ <p>
+ <input type="email" id="email" name="identityToken" placeholder="<?php p($l->t('Email address')); ?>" />
+ <input type="submit" id="password-request" name="passwordRequest" class="svg icon-confirm input-button-inline" value="" disabled="disabled"/>
+ <input type="hidden" id="requesttoken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
+ <input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
+ <input type="hidden" name="sharingType" value="<?php p($_['share']->getShareType()) ?>" id="sharingType">
+ </p>
+ <?php if (isset($_['identityOk'])): ?>
+ <?php if ($_['identityOk']): ?>
+ <div class="warning-info" id="identification-success"><?php p($l->t('Password sent!')); ?></div>
+ <?php else: ?>
+ <div class="warning" id="identification-failure"><?php p($l->t('You are not authorized to request a password for this share')); ?></div>
+ <?php endif; ?>
<?php endif; ?>
- <?php endif; ?>
- </fieldset>
-</form>
+ </fieldset>
+ </form>
-<!-- request password button -->
-<?php if (!isset($_['identityOk']) && $_['share']->getShareType() === $_['share']::TYPE_EMAIL && !$_['share']->getSendPasswordByTalk()): ?>
- <input type="button"
- id="request-password-button-not-talk"
- value="<?php p($l->t('Request password')); ?>"
- class="primary" />
-<?php endif; ?>
+ <!-- request password button -->
+ <?php if (!isset($_['identityOk']) && $_['share']->getShareType() === $_['share']::TYPE_EMAIL && !$_['share']->getSendPasswordByTalk()): ?>
+ <a id="request-password-button-not-talk"><?php p($l->t('Forgot password?')); ?></a>
+ <?php endif; ?>
-<!-- back to showShare button -->
-<form method="get">
- <fieldset>
- <input type="submit"
- id="request-password-back-button"
- value="<?php p($l->t('Back')); ?>"
- class="primary"
-<?php if (isset($_['identityOk'])): ?>
- style="display:block;" />
-<?php else: ?>
- style="display:none;" />
-<?php endif; ?>
- </fieldset>
-</form>
+ <!-- back to showShare button -->
+ <form method="get">
+ <fieldset>
+ <a
+ href=""
+ id="request-password-back-button"
+ <?php if (isset($_['identityOk'])): ?>
+ style="display:block;">
+ <?php else: ?>
+ style="display:none;">
+ <?php endif; ?>
+ <?php p($l->t('Back')); ?></a>
+ </fieldset>
+ </form>
+</div>
diff --git a/core/templates/recommendedapps.php b/core/templates/recommendedapps.php
index e51189ec137..dc92694f1b0 100644
--- a/core/templates/recommendedapps.php
+++ b/core/templates/recommendedapps.php
@@ -1,27 +1,11 @@
<?php declare(strict_types=1);
/**
- * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * 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 5ce8ff4f045..700a1611a67 100644
--- a/core/templates/success.php
+++ b/core/templates/success.php
@@ -1,13 +1,17 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
/** @var array $_ */
/** @var \OCP\IL10N $l */
/** @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/tags.html b/core/templates/tags.html
index a7125027a26..83c8b644b22 100644
--- a/core/templates/tags.html
+++ b/core/templates/tags.html
@@ -1,3 +1,7 @@
+<!--
+ - SPDX-FileCopyrightText: 2013-2015 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+ -->
<div id="tagsdialog">
<div class="content">
<div class="scrollarea">
diff --git a/core/templates/twofactorselectchallenge.php b/core/templates/twofactorselectchallenge.php
index e815fa16631..e979cfd58ab 100644
--- a/core/templates/twofactorselectchallenge.php
+++ b/core/templates/twofactorselectchallenge.php
@@ -1,4 +1,9 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
$noProviders = empty($_['providers']);
?>
<div class="body-login-container update two-factor">
@@ -19,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'],
]
@@ -36,19 +41,19 @@ $noProviders = empty($_['providers']);
<?php foreach ($_['providers'] as $provider): ?>
<li>
<a class="two-factor-provider"
- href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
- [
- 'challengeProviderId' => $provider->getId(),
- 'redirect_url' => $_['redirect_url'],
- ]
- )) ?>">
+ href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.showChallenge',
+ [
+ 'challengeProviderId' => $provider->getId(),
+ 'redirect_url' => $_['redirect_url'],
+ ]
+ )) ?>">
<?php
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
$icon = $provider->getLightIcon();
} else {
$icon = image_path('core', 'actions/password-white.svg');
}
- ?>
+ ?>
<img src="<?php p($icon) ?>" alt="" />
<div>
<h3><?php p($provider->getDisplayName()) ?></h3>
@@ -61,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'],
@@ -71,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 ea6a1e62f6e..c575ca21343 100644
--- a/core/templates/twofactorsetupchallenge.php
+++ b/core/templates/twofactorsetupchallenge.php
@@ -1,4 +1,8 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
/** @var \OCP\IL10N $l */
/** @var array $_ */
/** @var \OCP\Authentication\TwoFactorAuth\IProvider $provider */
@@ -10,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 837d171a80d..77139ab0e2a 100644
--- a/core/templates/twofactorsetupselection.php
+++ b/core/templates/twofactorsetupselection.php
@@ -1,48 +1,31 @@
<?php
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
?>
<div class="body-login-container update">
- <h2 class="two-factor-header"><?php p($l->t('Setup two-factor authentication')) ?></h2>
+ <h2 class="two-factor-header"><?php p($l->t('Set up two-factor authentication')) ?></h2>
<?php p($l->t('Enhanced security is enforced for your account. Choose which provider to set up:')) ?>
<ul>
<?php foreach ($_['providers'] as $provider): ?>
<li>
<a class="two-factor-provider"
- href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.setupProvider',
- [
- 'providerId' => $provider->getId(),
- 'redirect_url' => $_['redirect_url'],
- ]
- )) ?>">
+ href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.setupProvider',
+ [
+ 'providerId' => $provider->getId(),
+ 'redirect_url' => $_['redirect_url'],
+ ]
+ )) ?>">
<?php
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
$icon = $provider->getLightIcon();
} else {
$icon = image_path('core', 'actions/password-white.svg');
}
- ?>
+ ?>
<img src="<?php p($icon) ?>" alt="" />
<div>
<h3><?php p($provider->getDisplayName()) ?></h3>
@@ -52,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 9be36fe13a2..6bc367d4025 100644
--- a/core/templates/twofactorshowchallenge.php
+++ b/core/templates/twofactorshowchallenge.php
@@ -1,6 +1,11 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
/** @var \OCP\IL10N $l */
-/** @var array $_*/
+/** @var array $_ */
/** @var boolean $error */
$error = $_['error'];
/* @var $error_message string */
@@ -23,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'],
@@ -33,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>
diff --git a/core/templates/unsupportedbrowser.php b/core/templates/unsupportedbrowser.php
new file mode 100644
index 00000000000..519f0bc9f5c
--- /dev/null
+++ b/core/templates/unsupportedbrowser.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+?>
+<div id="unsupported-browser"></div>
diff --git a/core/templates/untrustedDomain.php b/core/templates/untrustedDomain.php
index 75054106ab2..874fd7aa8d5 100644
--- a/core/templates/untrustedDomain.php
+++ b/core/templates/untrustedDomain.php
@@ -1,6 +1,13 @@
-<?php /** @var array $_ */ ?>
+<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2014-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+/** @var array $_ */
+?>
-<div class="error">
+<div class="guest-box">
<h2><?php p($l->t('Access through untrusted domain')); ?></h2>
<p>
diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php
index b285a7296bf..504071451a9 100644
--- a/core/templates/update.admin.php
+++ b/core/templates/update.admin.php
@@ -1,4 +1,11 @@
-<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
+<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2013-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
+<div class="guest-box update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
<div class="updateOverview">
<?php if ($_['isAppsOnlyUpgrade']) { ?>
<h2 class="title"><?php p($l->t('App update required')); ?></h2>
@@ -7,7 +14,7 @@
[$_['productName'], $_['version']])); ?></h2>
<?php } ?>
<?php if (!empty($_['appsToUpgrade'])) { ?>
- <div class="infogroup">
+ <div class="text-left">
<span><?php p($l->t('The following apps will be updated:')); ?></span>
<ul class="content appList">
<?php foreach ($_['appsToUpgrade'] as $appInfo) { ?>
@@ -17,7 +24,7 @@
</div>
<?php } ?>
<?php if (!empty($_['incompatibleAppsList'])) { ?>
- <div class="infogroup">
+ <div class="text-left">
<span><?php p($l->t('These incompatible apps will be disabled:')) ?></span>
<ul class="content appList">
<?php foreach ($_['incompatibleAppsList'] as $appInfo) { ?>
@@ -31,15 +38,13 @@
<?php p($l->t('The theme %s has been disabled.', [$_['oldTheme']])) ?>
</div>
<?php } ?>
- <div class="infogroup bold">
+ <div class="text-left margin-top bold">
<?php p($l->t('Please make sure that the database, the config folder and the data folder have been backed up before proceeding.')) ?>
</div>
- <input class="updateButton primary" type="button" value="<?php p($l->t('Start update')) ?>">
- <div class="infogroup">
- <em>
+ <input class="updateButton primary margin-top" type="button" value="<?php p($l->t('Start update')) ?>">
+ <div class="notecard warning">
<?php p($l->t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?>
<pre>./occ upgrade</pre>
- </em>
</div>
</div>
diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php
index 6e6d19483db..a13dd2f51f1 100644
--- a/core/templates/update.use-cli.php
+++ b/core/templates/update.use-cli.php
@@ -1,23 +1,32 @@
-<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
+<?php
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
+<div class="guest-box update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
<div class="updateOverview">
<h2 class="title"><?php p($l->t('Update needed')) ?></h2>
- <div class="infogroup">
+ <div class="text-left">
<?php if ($_['tooBig']) {
- p($l->t('Please use the command line updater because you have a big instance with more than 50 users.'));
-} else {
- p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
-} ?><br><br>
- <?php
- print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?><br><br>
+ p($l->t('Please use the command line updater because you have a big instance with more than 50 accounts.'));
+ } else {
+ p($l->t('Please use the command line updater because updating via browser is disabled in your config.php.'));
+ } ?><br><br>
+ <?php if (is_string($_['cliUpgradeLink']) && $_['cliUpgradeLink'] !== '') {
+ $cliUpgradeLink = $_['cliUpgradeLink'];
+ } else {
+ $cliUpgradeLink = link_to_docs('admin-cli-upgrade');
+ }
+print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [$cliUpgradeLink])); ?>
</div>
</div>
<?php if ($_['tooBig']) { ?>
- <div class="warning updateAnyways">
+ <div class="notecard warning">
<p><?php p($l->t('I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure.')); ?></p>
- <a href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis" class="button updateAnywaysButton"><?php p($l->t('Upgrade via web on my own risk')); ?></a>
+ <a class="button error margin-top" href="?IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup=IAmSuperSureToDoThis"><?php p($l->t('Upgrade via web on my own risk')); ?></a>
</div>
<?php } ?>
-
-
</div>
diff --git a/core/templates/update.user.php b/core/templates/update.user.php
index 2c6ffd43444..0b702c0d246 100644
--- a/core/templates/update.user.php
+++ b/core/templates/update.user.php
@@ -1,5 +1,12 @@
-<div class="body-login-container">
- <div class="icon-big icon-error-white"></div>
+<?php
+/**
+ * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2013-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
+<div class="guest-box">
+ <div class="icon-big icon-error"></div>
<h2><?php p($l->t('Maintenance mode', [$theme->getName()])) ?></h2>
<p><?php p($l->t('This %s instance is currently in maintenance mode, which may take a while.', [$theme->getName()])) ?> <?php p($l->t('This page will refresh itself when the instance is available again.')) ?></p>
<p><?php p($l->t('Contact your system administrator if this message persists or appeared unexpectedly.')) ?></p>
diff --git a/core/templates/xml_exception.php b/core/templates/xml_exception.php
new file mode 100644
index 00000000000..ba808c88595
--- /dev/null
+++ b/core/templates/xml_exception.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+require_once __DIR__ . '/print_xml_exception.php';
+
+print_unescaped('<?xml version="1.0" encoding="utf-8"?>' . "\n");
+?>
+<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
+ <s:exception><?php p($l->t('Internal Server Error')) ?></s:exception>
+ <s:message>
+ <?php p($l->t('The server was unable to complete your request.')) ?>
+ <?php p($l->t('If this happens again, please send the technical details below to the server administrator.')) ?>
+ <?php p($l->t('More details can be found in the server log.')) ?>
+ <?php if (isset($_['serverLogsDocumentation']) && $_['serverLogsDocumentation'] !== ''): ?>
+ <?php p($l->t('For more details see the documentation ↗.'))?>: <?php print_unescaped($_['serverLogsDocumentation']) ?>
+ <?php endif; ?>
+ </s:message>
+
+ <s:technical-details>
+ <s:remote-address><?php p($_['remoteAddr']) ?></s:remote-address>
+ <s:request-id><?php p($_['requestID']) ?></s:request-id>
+
+ <?php if (isset($_['debugMode']) && $_['debugMode'] === true): ?>
+ <s:type><?php p($_['errorClass']) ?></s:type>
+ <s:code><?php p($_['errorCode']) ?></s:code>
+ <s:message><?php p($_['errorMsg']) ?></s:message>
+ <s:file><?php p($_['file']) ?></s:file>
+ <s:line><?php p($_['line']) ?></s:line>
+
+ <s:stacktrace>
+ <?php print_exception($_['exception'], $l); ?>
+ </s:stacktrace>
+ <?php endif; ?>
+ </s:technical-details>
+</d:error>