From d25c27da7aeb8795c04f1aaf247e7f816b908eeb Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Tue, 13 Dec 2022 16:46:48 +0100
Subject: [PATCH] update colors

---
 public_html/classes/render-adminlte.class.php | 28 ++++++++-----------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/public_html/classes/render-adminlte.class.php b/public_html/classes/render-adminlte.class.php
index 757ddf0..7567e7c 100755
--- a/public_html/classes/render-adminlte.class.php
+++ b/public_html/classes/render-adminlte.class.php
@@ -21,21 +21,17 @@ class renderadminlte {
         
         'bgcolor'=>[
             // for colors see https://adminlte.io/docs/3.2/layout.html
+            // https://adminlte.io/themes/v3/pages/UI/general.html
             '', // none
-            'primary', 'blue',
-            'secondary',
-            'success', 'green',
-            'info', 'cyan',
-            'warning', 'yellow',
-            'danger', 'red',
-            'dark',
 
             'black', 
+            'dark', 
             'gray-dark', 
             'gray', 
             'light',
 
             'indigo',
+            'lightblue',
             'navy',
             'purple',
             'fuchsia',
@@ -124,7 +120,7 @@ class renderadminlte {
             return false;
         }
         if(array_search($sValue, $this->_aValidItems[$sType])===false){
-            die("ERROR: ".($sReferrer ? $sReferrer.' - ' : '')."value [$sValue] is not a valid for type [$sType]; it must be one of ".implode("|", $this->_aValidItems[$sType]));
+            echo "ERROR: ".($sReferrer ? $sReferrer.' - ' : '')."value [$sValue] is not a valid for type [$sType]; it must be one of ".implode("|", $this->_aValidItems[$sType]).'<br>';
         }
         return true;
     }
@@ -391,7 +387,7 @@ class renderadminlte {
                 }
                 $aOptions['_infos'][]="added missing key: $sKey";
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         return $aOptions;
     }
@@ -457,7 +453,7 @@ class renderadminlte {
         $aElement['class']='badge'
             . ($aOptions['class']   ? ' badge-'.$aOptions['class'] : '')
             . ($aOptions['type']    ? ' badge-'.$aOptions['type'] : '')
-            . ($aOptions['bgcolor'] ? ' badge-'.$aOptions['bgcolor']   : '')
+            . ($aOptions['bgcolor'] ? ' bg-'.$aOptions['bgcolor']   : '')
             ;
         if ($aOptions['id']){
             $aElement['id']=$aOptions['id'];
@@ -808,7 +804,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         return '<div class="alert'
                     .($aOptions['type'] ? ' alert-'.$aOptions['type'] : '')
@@ -847,7 +843,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         return '<small class="label'
                     . ($aOptions['type']  ? ' label-'.$aOptions['type'] : '')
@@ -878,7 +874,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         return '<div class="callout'
                     .($aOptions['type'] ? ' callout-'.$aOptions['type'] : '')
@@ -917,7 +913,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         
         // system icons on top right
@@ -1011,7 +1007,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         if(!$aOptions['url']){
             $aOptions['url']='#';
@@ -1047,7 +1043,7 @@ class renderadminlte {
             if(!isset($aOptions[$sKey])){
                 $aOptions[$sKey]=false;
             }
-            $this->_checkValue($sKey, $aOptions[$sKey]);
+            $this->_checkValue($sKey, $aOptions[$sKey], __METHOD__);
         }
         
         // if onclick is available then add a a-tag to all labels that do not contain a link yet
-- 
GitLab