Initial commit
This commit is contained in:
28
resources/views/components/submit-entry-status.blade.php
Normal file
28
resources/views/components/submit-entry-status.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="submit-level" x-data="{
|
||||
nsfw: null,
|
||||
state: '{{ old('submit-state', $defaultState) }}',
|
||||
init(){
|
||||
this.$watch('nsfw', (val) => {
|
||||
if( val && this.state === 'published' ) {
|
||||
this.state = 'draft';
|
||||
}
|
||||
});
|
||||
}
|
||||
}" x-init="init()">
|
||||
<div>
|
||||
@if( section_must_be( [ 'romhacks', 'homebrew' ], $section ) )
|
||||
<label class="nsfw-label"><input id="nsfw-checkbox" type="checkbox" name="nsfw-entry" x-model="nsfw" style="transform: scale(1.5)"> NSFW</label>
|
||||
@endif
|
||||
</div>
|
||||
<select class="form-select" name="submit-state" x-model="state">
|
||||
@foreach( $states as $k => $v )
|
||||
@if( $k == 'published' )
|
||||
<template x-if="!nsfw">
|
||||
<option value="{{ $k }}" {{ $defaultState == $k ? 'selected' : '' }}>{{ $v }}</option>
|
||||
</template>
|
||||
@else
|
||||
<option value="{{ $k }}" {{ $defaultState == $k ? 'selected' : '' }}>{{ $v }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
Reference in New Issue
Block a user