dever 6 years ago
parent
commit
c3bb48c62b
1 changed files with 12 additions and 3 deletions
  1. 12 3
      src/Lib/Input.php

+ 12 - 3
src/Lib/Input.php

@@ -397,14 +397,23 @@ class Input
                         $param['media'] = $v['key'];
                     }
 
-                    $v['type'] = 'editor_tool" tool="' . $v['type'];
+                    $v['attr'] = 'editor_tool" tool="' . $v['type'];
                     
                 } else {
-                    $v['type'] = 'upload_show_editor';
+                    $v['attr'] = 'upload_show_editor';
                 }
 
 
-                $html .= '<input type="button" style="width:100px;display:inline;padding-left:0px;margin:5px;" class="form-control layui-input '.$v['type'].'" editor_id="' . $param['name'] . '_editor" key="'.$v['key'].'" value="'.$v['name'].'">';
+                if (isset($v['type']) && $v['type'] == 'update') {
+
+                    $v['attr'] = 'update_show_editor';
+                    $v['key'] = Dever::url($v['key']);
+
+                    $html .= '<input type="button" style="width:100px;padding-left:0px;margin:5px;" class="form-control layui-input '.$v['attr'].'" editor_id="' . $param['name'] . '_editor" key="'.$v['key'].'" value="'.$v['name'].'">';
+                } else {
+                    $html .= '<input type="button" style="width:100px;display:inline;padding-left:0px;margin:5px;" class="form-control layui-input '.$v['attr'].'" editor_id="' . $param['name'] . '_editor" key="'.$v['key'].'" value="'.$v['name'].'">';
+                }
+                
             }