jqh преди 5 години
родител
ревизия
6a91efb5fe
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 3 3
      src/Form/Field/KeyValue.php
  2. 3 3
      src/Form/Field/ListField.php

+ 3 - 3
src/Form/Field/KeyValue.php

@@ -16,7 +16,7 @@ class KeyValue extends Field
      *
      *
      * @param array $data
      * @param array $data
      *
      *
-     * @return mixed
+     * @return array
      */
      */
     public function formatFieldData($data)
     public function formatFieldData($data)
     {
     {
@@ -65,7 +65,7 @@ class KeyValue extends Field
         return $input;
         return $input;
     }
     }
 
 
-    protected function setupScript()
+    protected function addScript()
     {
     {
         $value = old($this->column, $this->value());
         $value = old($this->column, $this->value());
 
 
@@ -102,7 +102,7 @@ JS;
 
 
     public function render()
     public function render()
     {
     {
-        $this->setupScript();
+        $this->addScript();
 
 
         Admin::style('td .form-group {margin-bottom: 0 !important;}');
         Admin::style('td .form-group {margin-bottom: 0 !important;}');
 
 

+ 3 - 3
src/Form/Field/ListField.php

@@ -58,7 +58,7 @@ class ListField extends Field
      *
      *
      * @param array $data
      * @param array $data
      *
      *
-     * @return void
+     * @return array
      */
      */
     public function formatFieldData($data)
     public function formatFieldData($data)
     {
     {
@@ -118,7 +118,7 @@ class ListField extends Field
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
-    protected function setupScript()
+    protected function addScript()
     {
     {
         $value = old($this->column, $this->value());
         $value = old($this->column, $this->value());
 
 
@@ -159,7 +159,7 @@ JS;
      */
      */
     public function render()
     public function render()
     {
     {
-        $this->setupScript();
+        $this->addScript();
 
 
         Admin::style('td .form-group {margin-bottom: 0 !important;}');
         Admin::style('td .form-group {margin-bottom: 0 !important;}');