Procházet zdrojové kódy

Merge branch 'master' of https://github.com/unaio/una

AntonLV před 2 roky
rodič
revize
716ebafbf6

+ 12 - 0
install/css/styles.css

@@ -75,3 +75,15 @@ html, body {
 .bx-header.bx-def-color-bg-header {
     background-color: #3b8686;
 }
+
+fieldset.bx-form-section {
+    background-color:transparent !important;
+    border-left:none;
+    border-right:none;
+    border-bottom:none;
+    border-radius:0 !important;
+}
+
+fieldset.bx-form-section .bx-form-section-content {
+    background-color:transparent !important;
+}

+ 2 - 2
modules/boonex/oauth2/classes/BxOAuthAPI.php

@@ -116,10 +116,10 @@ class BxOAuthAPI extends BxDol
         if (!($oProfile = $this->_getProfileWithAccessChecking($iProfileId)))
             return;
 
-        if (!($oProfile = BxDolProfile::getInstance($aToken['user_id'])))
+        if (!(BxDolProfile::getInstance($aToken['user_id'])))
             return;
 
-        $this->output($this->_prepareProfileArray($oProfile, !isAdmin($oProfile->getAccountId())));
+        $this->output($this->_prepareProfileArray($oProfile, !isAdmin()));
     }
 
     /**

+ 7 - 1
template/scripts/BxBaseSearchExtended.php

@@ -312,6 +312,12 @@ class BxBaseSearchExtended extends BxDolSearchExtended
         $sFormSubmit = 'search' . $this->_sObject;
 
         list($sPageLink, $aPageParams) = bx_get_base_url_inline();
+        
+        $mDefValues = bx_get('filters');
+       
+        if ($mDefValues){
+            $mDefValues = json_decode($mDefValues, true);
+        }
 
         $aForm = array(
             'form_attrs' => array(
@@ -366,7 +372,7 @@ class BxBaseSearchExtended extends BxDolSearchExtended
                 'caption' => _t($aField['caption']),
             	'info' => _t($aField['info']),
                 'values' => $aField['values'],
-                'value' => $aField['search_value'],
+                'value' => $aField['search_value'] == '' && isset($mDefValues) && isset($mDefValues[$aField['name']]) ? $mDefValues[$aField['name']] : $aField['search_value'],
                 'attrs' => $aAttrs,
                 'db' => array(
                     'pass' => 'datepicker_range_age' === $aField['search_type'] ? 'AgeRange' : (!empty($aField['pass']) ? $aField['pass'] : 'Xss')

+ 11 - 0
template/scripts/BxBaseSearchExtendedServices.php

@@ -50,6 +50,17 @@ return [$mForm];
     public function serviceGetResults($mParams)
     {
         $aParams = [];
+        
+        $mDefValues = bx_get('filters');
+       
+        if ($mDefValues){
+            $mDefValues = json_decode($mDefValues, true);
+        }
+        
+        foreach($mDefValues as $sKey => $aParam){
+            $_POST[$sKey] = $aParam;
+        }
+        
         if (is_string($mParams)){
            $aPa = json_decode($mParams, true);    
             $aParams['object'] = $aPa['params']["object"];