|
@@ -233,7 +233,7 @@ class Input
|
|
|
$html = '';
|
|
|
|
|
|
if (isset($param['option'])) {
|
|
|
- if (isset($param['option']['state']) && $param['option']['state'] == 1) {
|
|
|
+ if (isset($param['option']['state']) && $param['option']['state'] >= 1) {
|
|
|
if (isset($param['value'])) {
|
|
|
$param['value'] = explode(',', $param['value']);
|
|
|
} else {
|
|
@@ -241,7 +241,7 @@ class Input
|
|
|
}
|
|
|
# 处理比较复杂的多维数组
|
|
|
unset($param['option']['state']);
|
|
|
-
|
|
|
+ $j = -1;
|
|
|
foreach ($param['option'] as $k => $v) {
|
|
|
$check = '';
|
|
|
if (isset($param['update_parent'])) {
|
|
@@ -251,13 +251,13 @@ class Input
|
|
|
}
|
|
|
|
|
|
//{check}
|
|
|
- $html .= '<input update_type="checked" class="update_value checkbox-checkall ' . (isset($param['valid']) ? $param['valid'] : '') . '" type="' . $input_type . '" name="temp[]" value="'.$param['name'] . '-' . $k . '"/> 【' . $v['name'] . '】 <br />';
|
|
|
+ $html .= '<input update_type="checked" class="update_value checkbox-checkall ' . (isset($param['valid']) ? $param['valid'] : '') . '" type="' . $input_type . '" name="temp[]" value="'.$param['name'] . '-' . $k . '"/> -----【' . $v['name'] . '】----- <br />';
|
|
|
|
|
|
$span = array('', '');
|
|
|
|
|
|
if (isset($v['child']) && $v['child']) {
|
|
|
//$i = 1;
|
|
|
- $j = -1;
|
|
|
+
|
|
|
$html .= '<ul style="list-style:none;margin:0px;display:;" class="">';
|
|
|
foreach ($v['child'] as $ki => $vi) {
|
|
|
if (!is_array($vi)) {
|
|
@@ -281,16 +281,23 @@ class Input
|
|
|
$j++;
|
|
|
}
|
|
|
|
|
|
- $input = '';
|
|
|
+ $input = $input_value = '';
|
|
|
|
|
|
if (isset($param['update_input'])) {
|
|
|
if (isset($param['update_input_data']) && isset($param['update_input_data'][$j])) {
|
|
|
$input_value = $param['update_input_data'][$j];
|
|
|
+ if ($disabled) {
|
|
|
+ $input_value = '';
|
|
|
+ }
|
|
|
} else {
|
|
|
- $input_value = 1;
|
|
|
+ $input_value = isset($param['update_input_default']) ? $param['update_input_default'] : '';
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($param['update_input']) {
|
|
|
+ $input = '[' . $param['update_input'] . ']';
|
|
|
}
|
|
|
|
|
|
- $input = '[' . $param['update_input'] . ']:<input class="form-control" name="' . $param['name'] . '_input[]" type="text" value="' . $input_value . '" style="width:5%;margin:5px;display:inline" placeholder="' . $param['update_input'] . '" ' . $disabled . '/>';
|
|
|
+ $input = $input . ': <input class="form-control" name="' . $param['name'] . '_input[]" type="text" value="' . $input_value . '" style="width:20%;margin:5px;display:inline" placeholder="' . $param['update_input'] . '" ' . $disabled . '/>';
|
|
|
}
|
|
|
|
|
|
$html .= '<li><input update_type="checked" class="update_value checkbox-checkall-' . $param['name'] . '-'. $k . ' ' . (isset($param['valid']) ? $param['valid'] : '') . '" type="' . $param['update'] . '" name="' . $param['name'] . '[]" value="' . $ki . '" ' . $check . '/> ' . $span[0] . $vi['name'] . $span[1] . ' ' . $input . '</li>';
|