Merge pull request #4925 from nextcloud/error-styling
Improve design and wording of various error messages
This commit is contained in:
commit
7d8b7d4e4e
|
@ -23,10 +23,9 @@ style('core', ['styles', 'header']);
|
||||||
/** @param $_ array */
|
/** @param $_ array */
|
||||||
?>
|
?>
|
||||||
<span class="error error-wide">
|
<span class="error error-wide">
|
||||||
<h2><strong><?php p($_['title']) ?></strong></h2>
|
<h2><?php p($_['title']) ?></h2>
|
||||||
<br>
|
|
||||||
|
|
||||||
<h2><strong><?php p($l->t('Technical details')) ?></strong></h2>
|
<h3><strong><?php p($l->t('Technical details')) ?></strong></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
|
<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
|
||||||
<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
|
<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
|
||||||
|
|
|
@ -492,6 +492,11 @@ form #selectDbType label.ui-state-active {
|
||||||
.warning {
|
.warning {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
.warning h2,
|
||||||
|
.update h2,
|
||||||
|
.error h2 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.warning.updateAnyways {
|
.warning.updateAnyways {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
<ul class="error-wide">
|
<div class="error">
|
||||||
|
<h2><?php p($l->t('Error')) ?></h2>
|
||||||
|
<ul>
|
||||||
<?php foreach($_["errors"] as $error):?>
|
<?php foreach($_["errors"] as $error):?>
|
||||||
<li class='error'>
|
<li>
|
||||||
<?php p($error['error']) ?><br>
|
<p><?php p($error['error']) ?></p>
|
||||||
<?php if(isset($error['hint']) && $error['hint']): ?>
|
<?php if(isset($error['hint']) && $error['hint']): ?>
|
||||||
<p class='hint'><?php p($error['hint']) ?></p>
|
<p class='hint'><?php p($error['hint']) ?></p>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
|
@ -4,14 +4,13 @@
|
||||||
|
|
||||||
style('core', ['styles', 'header']);
|
style('core', ['styles', 'header']);
|
||||||
?>
|
?>
|
||||||
<span class="error error-wide">
|
<div class="error error-wide">
|
||||||
<h2><strong><?php p($l->t('Internal Server Error')) ?></strong></h2>
|
<h2><?php p($l->t('Internal Server Error')) ?></h2>
|
||||||
<p><?php p($l->t('The server encountered an internal error and was unable to complete your request.')) ?></p>
|
<p><?php p($l->t('The server encountered an internal error and was unable to complete your request.')) ?></p>
|
||||||
<p><?php p($l->t('Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.')) ?></p>
|
<p><?php p($l->t('Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.')) ?></p>
|
||||||
<p><?php p($l->t('More details can be found in the server log.')) ?></p>
|
<p><?php p($l->t('More details can be found in the server log.')) ?></p>
|
||||||
<br>
|
|
||||||
|
|
||||||
<h2><strong><?php p($l->t('Technical details')) ?></strong></h2>
|
<h3><?php p($l->t('Technical details')) ?></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
|
<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
|
||||||
<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
|
<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
|
||||||
|
@ -26,7 +25,7 @@ style('core', ['styles', 'header']);
|
||||||
|
|
||||||
<?php if($_['debugMode']): ?>
|
<?php if($_['debugMode']): ?>
|
||||||
<br />
|
<br />
|
||||||
<h2><strong><?php p($l->t('Trace')) ?></strong></h2>
|
<h3><?php p($l->t('Trace')) ?></h3>
|
||||||
<pre><?php p($_['trace']) ?></pre>
|
<pre><?php p($_['trace']) ?></pre>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</span>
|
</div>
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
<?php /** @var $_ array */ ?>
|
<?php /** @var $_ array */ ?>
|
||||||
|
|
||||||
<ul class="error-wide">
|
<div class="error">
|
||||||
<li class='error'>
|
<h2><?php p($l->t('Access through untrusted domain')); ?></h2>
|
||||||
<?php p($l->t('You are accessing the server from an untrusted domain.')); ?><br>
|
|
||||||
|
|
||||||
<p class='hint'>
|
<p>
|
||||||
<?php p($l->t('Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domains" setting in config/config.php. An example configuration is provided in config/config.sample.php.')); ?>
|
<?php p($l->t('Please contact your administrator. If you are an administrator, edit the "trusted_domains" setting in config/config.php like the example in config.sample.php.')); ?>
|
||||||
<br>
|
</p>
|
||||||
<?php p($l->t('Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain.')); ?>
|
<p>
|
||||||
<br><br>
|
<?php p($l->t('Depending on your configuration, this button could also work to trust the domain:')); ?>
|
||||||
<p style="text-align:center;">
|
</p>
|
||||||
<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->getAbsoluteURL(\OCP\Util::linkToRoute('settings.AdminSettings.index'))); ?>?trustDomain=<?php p($_['domain']); ?>" class="button">
|
<p style="text-align:center;">
|
||||||
<?php p($l->t('Add "%s" as trusted domain', array($_['domain']))); ?>
|
<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->getAbsoluteURL(\OCP\Util::linkToRoute('settings.AdminSettings.index'))); ?>?trustDomain=<?php p($_['domain']); ?>" class="button">
|
||||||
</a>
|
<?php p($l->t('Add "%s" as trusted domain', array($_['domain']))); ?>
|
||||||
</p>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
|
|
Loading…
Reference in New Issue