You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'pdf' => 'PDF (recommended — keeps clickable links from the file)',
160
+
'pdf' => 'PDF (inline viewer, links inside the file)',
161
+
'image' => 'Image (PNG/JPG thumbnail linking to URL you set)',
161
162
'svg' => 'SVG (static graphic; exports usually do not preserve PDF links)',
162
163
'none' => 'None (remove placeholder output)',
163
164
])
164
165
->default('pdf')
165
-
->help('Put [[embed_roadmap_pdf]] or [[embed_roadmap]] in Content where the roadmap should appear. Use PDF when the roadmap must open real URLs from the document.'),
166
+
->help('Put [[embed_roadmap_pdf]] or [[embed_roadmap]] in Content where the roadmap should appear.'),
166
167
167
168
Text::make('Roadmap PDF embed URL', 'roadmap_pdf_embed_url')
168
169
->nullable()
169
170
->rules('nullable', 'url')
170
171
->dependsOn(['roadmap_embed_kind'], function (Text$field, NovaRequest$request, FormData$formData) {
171
-
if (($formData->roadmap_embed_kind ?? 'pdf') === 'pdf') {
172
+
$kind = $formData->roadmap_embed_kind ?? 'pdf';
173
+
if ($kind === 'pdf' || $kind === 'image') {
172
174
$field->show();
173
175
} else {
174
176
$field->hide();
175
177
}
176
178
})
177
-
->help('HTTPS URL to the PDF. Shown in an iframe with the browser’s built-in PDF viewer so links inside the file stay active.'),
179
+
->help('HTTPS URL to the roadmap PDF. For PDF format this is embedded in-page. For Image format use it too (or Roadmap image link URL) as the PDF click target.'),
178
180
179
181
Textarea::make('Roadmap SVG', 'roadmap_svg')
180
182
->nullable()
@@ -188,6 +190,30 @@ public function fields(Request $request): array
188
190
})
189
191
->help('Optional: paste full <svg>...</svg> only for a non-interactive graphic. For clickable resources, prefer PDF above.'),
0 commit comments