Fix missing pos for checkboxes

This commit is contained in:
2025-01-23 12:54:21 +09:00
parent 7999a0aa46
commit 00d64c54c2
7 changed files with 197 additions and 16 deletions

View File

@@ -43,7 +43,7 @@ Alternative setup composer local zip file repot:
3) Upate the global `src/Extensions/DefaultExtension.php`:
1) `getFunctionHandler`: popup_init, popup
2) `getBlockHandler`: t
4) check either `src/FunctionHander/HtmlCheckboxes.php` and `src/FunctionHander/HtmlOptions.php` have changed
4) check either `src/FunctionHander/HtmlCheckboxes.php`, `src/FunctionHander/HtmlOptions.php` and `src/FunctionHander/HtmlBase.php` have changed
1) Update and leep the label/pos changes
5) Create new release version as official relase number
@@ -84,6 +84,42 @@ Then open the vscode settings and set for the Folder (if multiple folders are in
### Changed
- `src/FunctionHander/HtmlBase.php`
```diff
diff --git i/src/FunctionHandler/HtmlBase.php w/src/FunctionHandler/HtmlBase.php
index 99f8e6c..99a82a6 100644
--- i/src/FunctionHandler/HtmlBase.php
+++ w/src/FunctionHandler/HtmlBase.php
@@ -16,6 +16,7 @@ class HtmlBase extends Base {
* @param $labels
* @param $label_ids
* @param bool $escape
+ * @param $pos [default='']
*
* @return string
*/
@@ -30,7 +31,8 @@ class HtmlBase extends Base {
$separator,
$labels,
$label_ids,
- $escape = true
+ $escape = true,
+ $pos = ''
) {
$_output = '';
@@ -83,7 +85,7 @@ class HtmlBase extends Base {
}
$_output .= '<input type="' . $inputType . '" name="' . $name;
if ($ismultiselect) {
- $_output .= '[]';
+ $_output .= '[' . $pos . ']';
}
$_output .= '" value="' . $value . '"';
if ($labels && $label_ids) {
```
- `src/FunctionHander/HtmlCheckboxes.php`
```diff
@@ -127,8 +163,10 @@ Then open the vscode settings and set for the Folder (if multiple folders are in
$separator,
$labels,
$label_ids,
+ $_pos,
$escape
- $_pos,
- $escape
+ $escape,
+ $_pos
);
}
} else {
@@ -142,8 +180,10 @@ Then open the vscode settings and set for the Folder (if multiple folders are in
$separator,
$labels,
$label_ids,
+ $_pos,
$escape
- $_pos,
- $escape
+ $escape,
+ $_pos
);
}
```