summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.css7
-rw-r--r--settings/js/admin.js33
-rw-r--r--settings/templates/admin.php2
3 files changed, 34 insertions, 8 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css
index 0af63821627..7340f2b2a63 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -360,7 +360,6 @@ table.grid td.date{
#security-warning li {
list-style: initial;
margin: 10px 0;
- color: #ce3702;
}
#shareAPI p { padding-bottom: 0.8em; }
@@ -491,6 +490,12 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
background-position: left center;
}
+#postsetupchecks .errors,
+#postsetupchecks .warnings,
+#security-warning > ul {
+ color: #ce3702;
+}
+
#admin-tips li {
list-style: initial;
}
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 3e17d7cc182..aa228e76be7 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -173,17 +173,36 @@ $(document).ready(function(){
OC.SetupChecks.checkSetup(),
OC.SetupChecks.checkGeneric()
).then(function(check1, check2, check3) {
- var errors = [].concat(check1, check2, check3);
+ var messages = [].concat(check1, check2, check3);
var $el = $('#postsetupchecks');
- var $errorsEl;
$el.find('.loading').addClass('hidden');
- if (errors.length === 0) {
+ if (messages.length === 0) {
} else {
- $errorsEl = $el.find('.errors');
- for (var i = 0; i < errors.length; i++ ) {
- $errorsEl.append('<li>' + errors[i] + '</li>');
+ var $errorsEl = $el.find('.errors');
+ var $warningsEl = $el.find('.warnings');
+ var $infoEl = $el.find('.info');
+ for (var i = 0; i < messages.length; i++ ) {
+ switch(messages[i].type) {
+ case OC.SetupChecks.MESSAGE_TYPE_INFO:
+ $infoEl.append('<li>' + messages[i].msg + '</li>');
+ break;
+ case OC.SetupChecks.MESSAGE_TYPE_WARNING:
+ $warningsEl.append('<li>' + messages[i].msg + '</li>');
+ break;
+ case OC.SetupChecks.MESSAGE_TYPE_ERROR:
+ default:
+ $errorsEl.append('<li>' + messages[i].msg + '</li>');
+ }
+ }
+ if ($errorsEl.find('li').length > 0) {
+ $errorsEl.removeClass('hidden');
+ }
+ if ($warningsEl.find('li').length > 0) {
+ $warningsEl.removeClass('hidden');
+ }
+ if ($infoEl.find('li').length > 0) {
+ $infoEl.removeClass('hidden');
}
- $errorsEl.removeClass('hidden');
$el.find('.hint').removeClass('hidden');
}
});
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index ff8a2f0c953..888ed823793 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -171,6 +171,8 @@ if ($_['cronErrors']) {
<div id="postsetupchecks">
<div class="loading"></div>
<ul class="errors hidden"></ul>
+ <ul class="warnings hidden"></ul>
+ <ul class="info hidden"></ul>
<p class="hint hidden">
<?php print_unescaped($l->t('Please double check the <a target="_blank" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="#log-section">log</a>.', link_to_docs('admin-install'))); ?>
</p>