From bf69b2c2daeb2d5c1f9b1b3dfe99bfb62a739a9a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 10 Feb 2026 02:42:15 +0000
Subject: [PATCH] =more CRUDSkeleton

---
 inc/ui/CRUDSkeleton.php |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/inc/ui/CRUDSkeleton.php b/inc/ui/CRUDSkeleton.php
index 380a25b..e74a010 100644
--- a/inc/ui/CRUDSkeleton.php
+++ b/inc/ui/CRUDSkeleton.php
@@ -573,7 +573,7 @@
 			<?php
 			echo Form::render(
 				'new_' . $this->dataType,
-				null,
+				'',
 				$this->uploaderConfig
 			);
 			?>
@@ -1249,7 +1249,7 @@
 								$config['autocomplete'] = true;
 							}
 
-							echo Form::render($name, null, $config);
+							echo Form::render($name, '', $config);
 							echo $makeThisDetailed ? '</details>' : '';
 						} else {
 							echo '<p></p>';
@@ -1332,7 +1332,7 @@
 							$config['autocomplete'] = true;
 						}
 						?>
-						<?= Form::render($name, null, $config); ?>
+						<?= Form::render($name, '', $config); ?>
 						<?= $makeThisDetailed ? '</details>' : '' ?>
 					</td>
 					<?php
@@ -1360,7 +1360,7 @@
 					?>
 					<td class="field show-<?= esc_attr($name) ?>" data-field="<?= esc_attr($name) ?>" data-field-type="<?=$config['type']?>"<?=(in_array($name, $this->stuck)) ? ' data-stuck':''?>>
 						<?= $makeThisDetailed ? '<details><summary class="row btw">See Value</summary>' : '' ?>
-						<?= Form::render($name, null, $config); ?>
+						<?= Form::render($name, '', $config); ?>
 						<?= $makeThisDetailed ? '</details>' : '' ?>
 					</td>
 					<?php
@@ -1576,7 +1576,6 @@
 					$tabs = false;
 				}
 
-
 				$fields = $this->fields;
 				if (!$this->isTimeline) {
 					$first = ['post_thumbnail', 'post_title', 'price'];
@@ -1584,11 +1583,10 @@
 					foreach ($first as $f) {
 						if (array_key_exists($f, $fields)) {
 							if ($tabs) {
-								$tabs['basic']['content'] .= Form::render($f, null, $fields[$f]);
+								$tabs['basic']['content'] .= Form::render($f, '', $fields[$f]);
 							} else {
-								Form::render($f, null, $fields[$f]);
+								echo Form::render($f, '', $fields[$f]);
 							}
-
 							unset($fields[$f]);
 						}
 					}
@@ -1599,7 +1597,7 @@
 						return in_array($field, $this->timelineUniqueFields);
 					}, ARRAY_FILTER_USE_KEY);
 					$config = [
-						'type'		=> 'gallery',
+						'type'		=> 'upload',
 						'subtype'	=> 'timeline',
 						'data'		=> 'timeline',
 						'label'		=> 'Progression',
@@ -1611,12 +1609,12 @@
 							if (in_array($field['type'], ['taxonomy', 'selector'])) {
 								$field = array_merge($field, $this->taxConfig($field['taxonomy'], $field['label']));
 							}
-							$content .= Form::render($slug, null, $field);
+							$content .= Form::render($slug, '', $field);
 						}
 					}
 
 
-					$content .= Form::render('timeline', null, $config);
+					$content .= Form::render('timeline', '', $config);
 
 					$tabs['progression']['content'] = $content;
 					$fields = $this->nonTimelineFields;
@@ -1624,12 +1622,12 @@
 				foreach ($fields as $n => $config) {
 					if ($tabs) {
 						$section = (array_key_exists('section', $config)) ? $config['section'] : 'basic';
-						$tabs[$section]['content'] .= Form::render($n,null, $config);
+						$tabs[$section]['content'] .= Form::render($n,'', $config);
 					} else {
 						if (in_array($config['type'], ['taxonomy', 'selector'])) {
 							$config = array_merge($config, $this->taxConfig($config['taxonomy'], $config['label']));
 						}
-						Form::render($n, null, $config);
+						echo Form::render($n, '', $config);
 					}
 				}
 
@@ -1664,11 +1662,9 @@
 			<p class="description">You can unselect items by clicking the image here.</p>
 			<p class="hint"><strong>IMPORTANT: </strong> Whatever changes you make here will be applied to all selected <?=$this->plural?>.</p>
 			<div class="fields">
-				<div class="field-group radio-options row">
-					<?php
-					$this->getApplicableStatuses('bulk-');
-					?>
-				</div>
+				<?php
+				$this->getApplicableStatuses('bulk-');
+				?>
 				<?php
 				if (!empty($this->taxonomies)) {
 					?>
@@ -1686,7 +1682,7 @@
 					return array_key_exists('bulkEdit', $field);
 				});
 				foreach ($fields as $fieldName => $config) {
-					echo Form::render($fieldName, null, $config);
+					echo Form::render($fieldName, '', $config);
 				}
 				?>
 			</div>
@@ -1707,6 +1703,7 @@
 	}
 
 	protected function getApplicableStatuses(string $prefix) {
+		ob_start();
 		foreach ($this->statuses as $status) {
 			if ($status === 'all' || !array_key_exists($status, $this->allowedStatuses)) {
 				continue;
@@ -1736,5 +1733,7 @@
 			</label>
 			<?php
 		}
+		$out = ob_get_clean();
+		echo Form::fieldWrap('post_status', $out, ['type'=>'group']);
 	}
 }

--
Gitblit v1.10.0