fix(php): update formbuilder dropdown options for incontent ads

- Extend max ads dropdown from 15 to 25 options
- Add "1 elemento" option to min spacing dropdown
- Fix undefined variable $isLegacy, changed to $isParagraphsOnly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-12-10 12:20:44 -06:00
parent d7c9c2a801
commit 50c411408e

View File

@@ -533,7 +533,7 @@ final class AdsensePlacementFormBuilder
$html .= ' </details>';
// Subseccion: Limites y espaciado
$html .= ' <details class="mb-3 border rounded" id="roiLimitsDetails"' . ($isLegacy ? '' : ' open') . '>';
$html .= ' <details class="mb-3 border rounded" id="roiLimitsDetails"' . ($isParagraphsOnly ? '' : ' open') . '>';
$html .= ' <summary class="p-3 bg-light fw-bold" style="cursor: pointer;">';
$html .= ' <i class="bi bi-sliders me-1"></i>';
$html .= ' Limites y Espaciado';
@@ -547,7 +547,7 @@ final class AdsensePlacementFormBuilder
$html .= ' Maximo total de ads';
$html .= ' </label>';
$html .= ' <select class="form-select form-select-sm" id="' . esc_attr($cid) . 'IncontentMaxTotalAds" ' . $disabledAttr . '>';
for ($i = 1; $i <= 15; $i++) {
for ($i = 1; $i <= 25; $i++) {
$iStr = (string)$i;
$adSelected = selected($maxAds, $iStr, false);
$label = $i === 1 ? '1 anuncio' : $i . ' anuncios';
@@ -563,6 +563,7 @@ final class AdsensePlacementFormBuilder
$html .= ' </label>';
$html .= ' <select class="form-select form-select-sm" id="' . esc_attr($cid) . 'IncontentMinSpacing" ' . $disabledAttr . '>';
$spacingOptions = [
'1' => '1 elemento',
'2' => '2 elementos',
'3' => '3 elementos',
'4' => '4 elementos',