Forráskód Böngészése

Ticket #4558 - Build-in API support: Fix for form's Labels field.

AntonLV 2 éve
szülő
commit
d9fc90b281
1 módosított fájl, 5 hozzáadás és 5 törlés
  1. 5 5
      template/scripts/BxBaseFormView.php

+ 5 - 5
template/scripts/BxBaseFormView.php

@@ -1892,12 +1892,12 @@ BLAH;
                 'disabled' => 'disabled'
             )
         );
-        
-        if (bx_is_api()){
-            $aInput['type'] = 'labels';
-            //$aInput['ajax_get_suggestions'] = 'system/select_labels/TemplLabelsServices&params[]=';
-            $aInput['values'] = bx_srv('system', 'get_labels', [], 'TemplLabelsServices');
 
+        if (bx_is_api()) {
+            return array_merge($aInput, [
+                'type' => 'labels',
+                'values' => bx_srv('system', 'get_labels', [], 'TemplLabelsServices')
+            ]);
         }
 
         return $this->oTemplate->parseHtmlByName('label_select_field.html', array(