2026-05-20 18:25:15 +02:00
< ? php
/** @var \App\Models\Modification $modif */
/** @var \App\Models\Status $status */
?>
{{ -- Pushed in header . -- }}
@ push ( 'styles' )
< meta name = " fs-section " content = " { { $section }} " >
< meta name = " csrf-token " content = " { { csrf_token() }} " >
< meta name = " submission-has-errors " content = " { { $errors->any () ? '1' : '0' }} " >
@ endpush
@ push ( 'scripts' )
@ vite ( 'resources/js/submissions.js' )
@ endpush
{{ -- Server side errors summary -- }}
@ if ( $errors -> any ())
@ foreach ( $errors -> all () as $error )
< x - form - error - text message = " { { $error }} " />
@ endforeach
@ endif
< div class = " block " >
< form action = " { { $isEdit ? route('submit.update', [ $section , $entry->id ] ) : route('submit.store', $section ) }} "
method = " POST " x - data = " Submission() " x - init = " init() " @ submit . prevent = " submitForm( $event ) " >
@ include ( 'submissions.fs-upload' )
<!-- ABOUT THE ENTRY -->
< x - form - group - title label = " { { $words['about_the'] }} " icon = " puzzle " />
2026-06-09 11:45:59 +02:00
@ if ( section_must_not_be ( [ 'translations' , 'homebrew' ], $section ) )
2026-05-20 18:25:15 +02:00
< div class = " form-group " >
< x - form - field - title name = " { { $words['entry_title'] }} " required = " true " />
< input class = " form-input " type = " text " name = " entry_title " value = " { { old('entry_title', $entry->title ?? '' ) }} " required >
@ error ( 'entry_title' )
< x - form - error - text message = " { { $message }} " />
@ enderror
</ div >
2026-06-09 11:45:59 +02:00
@ elseif ( section_must_be ( 'translations' , $section ) )
2026-05-20 18:25:15 +02:00
< div class = " form-group " >
< x - form - field - title name = " { { $words['entry_title'] }} " helper = " { { $words['entry_title_helper'] }} " />
< input class = " form-input " type = " text " name = " entry_title " value = " { { old('entry_title', $entry->title , '' ) }} " >
@ error ( 'entry_title' )
< x - form - error - text message = " { { $message }} " />
@ enderror
</ div >
@ endif
2026-06-10 11:04:26 +02:00
@ if ( section_must_be ( [ 'romhacks' , 'lua-scripts' ], $section ) )
2026-05-20 18:25:15 +02:00
< div class = " form-group " >
< x - form - field - title name = " { { $words['type_of_hack'] }} " required = " true " />
< div class = " form-type-of-checkboxes form-group level " id = " modifications-group " x - ref = " modificationsGroup " >
@ foreach ( $modifications as $modif )
< label >< input class = " form-checkbox " type = " checkbox " name = " modifications[] " value = " { { $modif->id }} " {{ in_array ( $modif -> id , $oldModifications ) ? 'checked' : '' }} > {{ $modif -> name }} </ label >
@ endforeach
</ div >
< div class = " form-error-text " x - show = " errorKey === 'noModifications' " x - text = " errorMessage " ></ div >
</ div >
2026-06-10 11:04:26 +02:00
@ elseif ( section_must_be ( [ 'utilities' , 'documents' ], $section ) )
< div class = " form-group " >
< x - form - field - title name = " Categories " required = " true " />
< x - category - selector : section = " $section " : selected = " $oldCategories " />
</ div >
2026-05-20 18:25:15 +02:00
@ endif
2026-06-10 11:04:26 +02:00
@ if ( section_must_be ( 'utilities' , $section ) )
< div class = " form-group " >
< x - form - field - title name = " { { $words['system'] }} " required = " true " />
< div class = " form-type-of-checkboxes form-group level " id = " systems-group " x - ref = " systemsGroup " >
@ foreach ( $systems as $system )
< label >< input class = " form-checkbox " type = " checkbox " name = " systems[] " value = " { { $system->id }} " {{ in_array ( $system -> id , $oldSystems ) ? 'checked' : '' }} > {{ $system -> name }} </ label >
@ endforeach
</ div >
< div class = " form-error-text " x - show = " errorKey === 'noSystems' " x - text = " errorMessage " ></ div >
</ div >
@ endif
@ if ( section_must_be ( [ 'romhacks' , 'translations' , 'homebrew' , 'utilities' , 'documents' , 'lua-scripts' ], $section ) )
2026-05-20 18:25:15 +02:00
< div class = " form-group grid-c3 " >
< div >
< x - form - field - title name = " { { $words['version'] }} " required = " true " />
< input class = " form-input " type = " text " name = " version " value = " { { old( 'version', $entry->version ?? '' ) }} " required >
</ div >
< div >
< x - form - field - title name = " { { $words['release_date'] }} " helper = " { { $words['release_date_helper'] }} " required = " true " />
{{ -- TODO : Add max to the date -- }}
< input type = " date " class = " form-input " name = " release-date " value = " { { old('release-date') ?? $entry->release_date ?->format('Y-m-d') ?? '' }} " required >
</ div >
< div >
2026-06-10 11:04:26 +02:00
@ if ( section_must_be ( [ 'utilities' , 'documents' ], $section ) )
< x - form - field - title name = " { { $words['level'] }} " required = " true " />
2026-05-20 18:25:15 +02:00
< div class = " form-status-radio form-group level " >
2026-06-10 11:04:26 +02:00
@ foreach ( $levels as $level )
< label >< input class = " form-radio " type = " radio " name = " level " value = " { { $level->id }} " {{ old ( 'level' , $entry -> level_id ) == $level -> id ? 'checked' : '' }} required > {{ $level -> name }} </ label >
@ endforeach
</ div >
@ else
< x - form - field - title name = " { { $words['status'] }} " required = " true " />
< div class = " form-status-radio form-group level " >
@ foreach ( $statuses as $status )
< label >< input class = " form-radio " type = " radio " name = " status " value = " { { $status->id }} " {{ old ( 'status' , $entry -> status_id ) == $status -> id ? 'checked' : '' }} required > {{ $status -> name }} </ label >
@ endforeach
</ div >
@ endif
2026-05-20 18:25:15 +02:00
</ div >
</ div >
@ endif
2026-06-10 11:04:26 +02:00
@ if ( section_must_be ( [ 'translations' , 'utilities' , 'documents' ] , $section ) )
2026-05-20 18:25:15 +02:00
< x - form - field - title name = " Languages " required = " true " />
< x - languages - selector : selected = " $oldLanguages " />
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noLanguages' " x - text = " errorMessage " ></ div >
2026-05-27 21:24:38 +02:00
@ error ( 'languages' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'languages.*' )
< x - form - error - text message = " { { $message }} " />
@ enderror
2026-05-20 18:25:15 +02:00
@ endif
< div class = " form-group " x - ref = " descriptionField " >
2026-07-01 13:41:58 +02:00
< x - form - field - title name = " { { $words['description'] }} " helper = " You must write in markdown. Click on the interrogation mark in the toolbar to learn more about Markdown. " required = " true " />
2026-07-01 15:11:18 +02:00
< x - markdown - textarea name = " description " value = " { !! old('description', $entry->description ?? '') !!} " />
2026-05-20 18:25:15 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noDescription' " x - text = " errorMessage " ></ div >
@ error ( 'description' )
< x - form - error - text message = " { { $message }} " />
@ enderror
</ div >
< x - form - group - title label = " { { $words['about_game'] }} " icon = " gamepad-2 " />
< div x - ref = " gameSelector " >
< livewire : game - selector
2026-06-10 11:04:26 +02:00
: game - id = " old('game_id', $entry->game_id ?? null) "
2026-05-20 18:25:15 +02:00
: new - game - title = " old('new-game-title') "
: new - game - platform = " old('new-game-platform') "
: new - game - genre = " old('new-game-genre') "
2026-06-10 11:04:26 +02:00
: platform - only - id = " old('platform_only_id', $entry->platform_id ?? null) "
: section = " $section "
2026-05-20 18:25:15 +02:00
/>
</ div >
< div class = " form-error-text " x - show = " errorKey === 'noGame' " x - text = " errorMessage " ></ div >
@ error ( 'game_id' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'new-game-title' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'new-game-platform' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'new-game-genre' )
< x - form - error - text message = " { { $message }} " />
@ enderror
2026-06-10 11:04:26 +02:00
@ if ( section_must_be ( [ 'romhacks' , 'translations' ], $section ))
< livewire : hashes - upload : old - hashes = " old('hashes', $entry->hashes ->toArray(), []) " />
@ endif
2026-05-20 18:25:15 +02:00
2026-06-10 11:04:26 +02:00
@ if ( section_must_not_be ( [ 'translations' , 'utilities' , 'documents' ], $section ) )
2026-05-20 18:25:15 +02:00
< x - form - field - title name = " Languages " required = " true " />
< x - languages - selector : selected = " $oldLanguages " />
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noLanguages' " x - text = " errorMessage " ></ div >
2026-05-20 18:25:15 +02:00
@ error ( 'languages' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'languages.*' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ endif
< x - form - group - title label = " { { $words['attachments'] }} " icon = " paperclip " />
2026-06-08 16:25:52 +02:00
< x - main - image - field : old - path = " old('main-image', $entry->main_image ?? '') ?? '' " />
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noMainImage' " x - text = " errorMessage " ></ div >
2026-05-20 18:25:15 +02:00
< x - gallery - field : old - paths = " old('gallery', $entry->gallery ->pluck('image')->toArray() ?? [] ) " />
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noGalleryImages' " x - text = " errorMessage " ></ div >
2026-05-20 18:25:15 +02:00
@ error ( 'gallery' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'gallery.*' )
< x - form - error - text message = " { { $message }} " />
@ enderror
< x - form - group - title label = " { { $words['authors'] }} " icon = " users " />
< livewire : authors - selector : old - authors = " old('authors', $entry->authors ->map(fn( $a ) => ['id' => $a->id , 'name' => $a->name ])->toArray() ?? []) " : old - new - authors = " old('new-authors', []) " />
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'noAuthors' " x - text = " errorMessage " ></ div >
2026-05-20 18:25:15 +02:00
@ error ( 'authors' )
< x - form - error - text message = " { { $message }} " />
@ enderror
@ error ( 'new-authors' )
< x - form - error - text message = " { { $message }} " />
@ enderror
< x - staff - credits - field : old - staff - credits = " old('staff_credits', $entry->staff_credits ?? null) " />
2026-06-10 11:04:26 +02:00
@ if ( section_must_not_be ( 'documents' , $section ) )
< x - form - group - title label = " { { $words['related_links'] }} " icon = " link " />
< div class = " form-group grid-c2 " >
< div >
< x - form - field - title name = " { { $words['release_site'] }} " helper = " { { $words['release_site_helper'] }} " required = " " />
< input class = " form-input " type = " url " name = " release_site " value = " { { old( 'release_site', $entry->relevant_link ?? '' ) }} " >
</ div >
< div >
< x - form - field - title name = " { { $words['youtube_video'] }} " required = " " />
< input class = " form-input " type = " url " name = " youtube_video " value = " { { old( 'youtube_video', $entry->youtube_link ?? '' ) }} " >
</ div >
2026-05-20 18:25:15 +02:00
</ div >
2026-06-10 11:04:26 +02:00
@ else
< div class = " form-group " ></ div >
@ endif
2026-05-20 18:25:15 +02:00
2026-06-02 20:54:10 +02:00
@ if ( $isEdit )
< x - form - group - title label = " Entry Management " icon = " wrench " />
@ can ( 'moderate' , $entry )
< div class = " form-group grid-c2 " >
< div >
< x - form - field - title name = " Staff comment " />
< textarea class = " form-textarea " name = " staff_comment " rows = " 3 " > {{ old ( 'staff_comment' , $entry -> staff_comment ? ? '' ) }} </ textarea >
</ div >
< div >
< x - form - field - title name = " Owner " required = " true " />
2026-06-09 11:45:59 +02:00
< livewire : xf - user - selector : initial - user - id = " old('owner_user_id', $entry->user_id ) " />
2026-06-02 20:54:10 +02:00
</ div >
</ div >
2026-06-08 16:25:52 +02:00
< div class = " form-group grid-c2 " >
< div >
< x - form - field - title name = " XenForo Comments Thread ID " />
< input type = " text " name = " comments_thread_id " class = " form-input " value = " { { old('comments_thread_id', $entry->comments_thread_id ) }} " >
</ div >
</ div >
< div class = " form-group " >
< x - form - field - title name = " Metadata " required = " true " />
< div class = " form-type-of-checkboxes form-group level " id = " entry-metadata " >
< label >< input class = " form-checkbox " type = " checkbox " name = " featured " value = " 1 " {{ old ( 'featured' , $entry -> featured ) ? 'checked' : '' }} > Featured entry </ label >
2026-06-23 19:24:38 +02:00
< label >< input class = " form-checkbox " type = " checkbox " name = " refresh_created_at " value = " 1 " > Refresh created at </ label >
2026-06-27 18:57:26 +02:00
@ if ( section_must_be ([ 'romhacks' , 'homebrew' ], $section ) )
< label >< input class = " form-checkbox " type = " checkbox " name = " nsfw-entry " value = " 1 " {{ old ( 'nsfw-entry' , $entry -> nsfw ) ? 'checked' : '' }} > NSFW </ label >
@ endif
2026-06-27 19:24:55 +02:00
@ if ( section_must_be ( [ 'romhacks' , 'translations' ], $section ) )
< label >< input class = " form-checkbox " type = " checkbox " name = " bypass_hashes " value = " 1 " > Bypass hashes requirements </ label >
@ endif
2026-06-08 16:25:52 +02:00
</ div >
</ div >
2026-06-02 20:54:10 +02:00
@ endcan
@ cannot ( 'moderate' , $entry )
@ endcannot
@ endif
2026-05-20 18:25:15 +02:00
@ csrf
2026-06-23 19:24:38 +02:00
< div class = " submit " x - ref = " submitButton " >
2026-06-02 20:54:10 +02:00
< x - submit - entry - status : section = " $section " : is - edit = " $isEdit " : current - state = " $entry->state ?? null " : entry = " $entry " />
2026-05-20 18:25:15 +02:00
< button id = " submit-button " type = " submit " class = " btn primary " style = " padding:1%; " > Submit </ button >
</ div >
2026-06-23 19:24:38 +02:00
< div class = " form-error-text " x - show = " errorKey === 'isSubmitting' " x - text = " errorMessage " ></ div >
2026-05-20 18:25:15 +02:00
</ form >
</ div >