Update Submissions and add fields
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if( section_must_be( 'romhacks', $section ) )
|
||||
@if( section_must_be( ['romhacks', 'lua-scripts'], $section ) )
|
||||
<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">
|
||||
@@ -57,9 +57,26 @@
|
||||
</div>
|
||||
<div class="form-error-text" x-show="errorKey === 'noModifications'" x-text="errorMessage"></div>
|
||||
</div>
|
||||
@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>
|
||||
@endif
|
||||
|
||||
@if( section_must_be( ['romhacks', 'translations', 'homebrew'], $section ) )
|
||||
@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 ) )
|
||||
<div class="form-group grid-c3">
|
||||
<div>
|
||||
<x-form-field-title name="{{ $words['version'] }}" required="true" />
|
||||
@@ -71,17 +88,26 @@
|
||||
<input type="date" class="form-input" name="release-date" value="{{ old('release-date') ?? $entry->release_date?->format('Y-m-d') ?? '' }}" required>
|
||||
</div>
|
||||
<div>
|
||||
<x-form-field-title name="{{ $words['status'] }}" required="true" />
|
||||
@if( section_must_be( ['utilities', 'documents'], $section ) )
|
||||
<x-form-field-title name="{{ $words['level'] }}" 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>
|
||||
@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
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if( section_must_be( 'translations', $section ) )
|
||||
@if( section_must_be( [ 'translations', 'utilities', 'documents'] , $section ) )
|
||||
<x-form-field-title name="Languages" required="true" />
|
||||
<x-languages-selector :selected="$oldLanguages" />
|
||||
@error('languages')
|
||||
@@ -104,10 +130,12 @@
|
||||
<x-form-group-title label="{{ $words['about_game'] }}" icon="gamepad-2" />
|
||||
<div x-ref="gameSelector">
|
||||
<livewire:game-selector
|
||||
:game-id="old('game_id', $entry->game_id ?? null )"
|
||||
:game-id="old('game_id', $entry->game_id ?? null)"
|
||||
:new-game-title="old('new-game-title')"
|
||||
:new-game-platform="old('new-game-platform')"
|
||||
:new-game-genre="old('new-game-genre')"
|
||||
:platform-only-id="old('platform_only_id', $entry->platform_id ?? null)"
|
||||
:section="$section"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-error-text" x-show="errorKey === 'noGame'" x-text="errorMessage"></div>
|
||||
@@ -123,9 +151,11 @@
|
||||
@error('new-game-genre')
|
||||
<x-form-error-text message="{{ $message }}" />
|
||||
@enderror
|
||||
<livewire:hashes-upload :old-hashes="old('hashes', $entry->hashes->toArray(), [])" />
|
||||
@if( section_must_be( [ 'romhacks', 'translations' ], $section ))
|
||||
<livewire:hashes-upload :old-hashes="old('hashes', $entry->hashes->toArray(), [])" />
|
||||
@endif
|
||||
|
||||
@if( section_must_not_be( 'translations', $section ) )
|
||||
@if( section_must_not_be( [ 'translations', 'utilities', 'documents' ], $section ) )
|
||||
<x-form-field-title name="Languages" required="true" />
|
||||
<x-languages-selector :selected="$oldLanguages" />
|
||||
@error('languages')
|
||||
@@ -156,17 +186,21 @@
|
||||
@enderror
|
||||
<x-staff-credits-field :old-staff-credits="old('staff_credits', $entry->staff_credits ?? null)" />
|
||||
|
||||
<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 ?? '' ) }}">
|
||||
@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>
|
||||
</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>
|
||||
</div>
|
||||
@else
|
||||
<div class="form-group"></div>
|
||||
@endif
|
||||
|
||||
@if($isEdit)
|
||||
<x-form-group-title label="Entry Management" icon="wrench" />
|
||||
|
||||
Reference in New Issue
Block a user