2020-07-11 20:34:26 +01:00
@ extends ( 'adminlte::page' )
2022-03-19 05:56:20 +00:00
@ section ( 'title' , config ( 'app.name' ) . ' | ' . __ ( 'Edit vacancies' ))
2020-07-11 20:34:26 +01:00
@ section ( 'content_header' )
2022-03-19 05:56:20 +00:00
< h4 > {{ __ ( 'Administration' )}} / {{ __ ( 'Vacancies' )}} / {{ __ ( 'Edit' )}} </ h4 >
2020-07-11 20:34:26 +01:00
@ stop
@ section ( 'js' )
< x - global - errors >
</ x - global - errors >
@ stop
@ section ( 'content' )
< div class = " row " >
< div class = " col center " >
2022-03-19 05:56:20 +00:00
< h3 > {{ __ ( 'Vacancy Editor' )}} </ h3 >
2020-07-11 20:34:26 +01:00
</ div >
</ div >
< div class = " row " >
< div class = " col " >
< div class = " card " >
< div class = " card-header " >
< h3 class = " card-title " >< i class = " fas fa-clipboard " ></ i > {{ $vacancy -> vacancyName }} </ h3 >
</ div >
< div class = " card-body " >
2022-03-19 05:56:20 +00:00
< p class = " text-muted " >< i class = " fas fa-question-circle " ></ i > {{ __ ( 'For consistency purposes, grayed out fields can\'t be edited.' )}} </ p >
2020-07-11 20:34:26 +01:00
2020-09-03 02:26:05 +01:00
< form method = " POST " id = " editPositionForm " action = " { { route('updatePosition', ['vacancy' => $vacancy->id ]) }} " >
2020-07-11 20:34:26 +01:00
@ csrf
@ method ( 'PATCH' )
< div class = " row " >
< div class = " col " >
2022-03-19 05:56:20 +00:00
< label for = " vacancyName " > {{ __ ( 'Vacancy name' )}} </ label >
2020-07-11 20:34:26 +01:00
< input type = " text " value = " { { $vacancy->vacancyName }} " class = " form-control " disabled />
</ div >
< div class = " col " >
2022-03-19 05:56:20 +00:00
< label for = " vacancyDescription " > {{ __ ( 'Vacancy description' )}} </ label >
2020-07-11 20:34:26 +01:00
< input type = " vacancyDescription " class = " form-control " name = " vacancyDescription " value = " { { $vacancy->vacancyDescription }} " />
</ div >
</ div >
< div class = " row " >
< div class = " col " >
<!-- skipping the accessor for obvious reasons -->
2022-03-19 05:56:20 +00:00
< label for = " vacanyDetails " > {{ __ ( 'Vacancy details' )}} </ label >
< textarea name = " vacancyFullDescription " class = " form-control " placeholder = " { { (is_null( $vacancy->vacancyFullDescription )) ? __('No details yet... Add some!') : '' }} " rows = " 20 " > {{ $vacancy -> getAttributes ()[ 'vacancyFullDescription' ] }} </ textarea >
< span class = " text-muted " >< i class = " fab fa-markdown " ></ i > {{ __ ( 'Markdown supported' )}} </ span >
2020-07-11 20:34:26 +01:00
</ div >
</ div >
< div class = " row " >
< div class = " col " >
2022-10-24 01:04:22 +01:00
< label for = " discordRoleID " > {{ __ ( 'Comma-separated list of Discord role IDs' )}} </ label >
2020-07-11 20:34:26 +01:00
< input type = " text " class = " form-control " value = " { { $vacancy->discordRoleID }} " id = " discordRoleID " disabled />
</ div >
</ div >
< div class = " row " >
< div class = " col " >
2022-03-19 05:56:20 +00:00
< label for = " currentForm " > {{ __ ( 'Current from (uneditable)' )}} </ label >
2020-07-11 20:34:26 +01:00
< input type = " text " class = " form-control " value = " { { $vacancy->forms ->formName }} " id = " currentForm " disabled />
2022-03-19 05:56:20 +00:00
< label for = " remainingSlots " > {{ __ ( 'Remaining slots' )}} </ label >
2020-07-11 20:34:26 +01:00
< input type = " text " class = " form-control " value = " { { $vacancy->vacancyCount }} " id = " remainingSlots " name = " vacancyCount " />
2022-10-24 01:04:22 +01:00
< label for = " requiredAge " > {{ __ ( 'Minimum age' )}} </ label >
< input type = " number " min = " 13 " max = " 100 " class = " form-control " value = " { { $vacancy->requiredAge }} " id = " requiredAge " name = " requiredAge " />
< div class = " form-check mt-4 " >
< input type = " hidden " value = " off " name = " requireDiscordAccount " >
< input class = " form-check-input " type = " checkbox " id = " requireDiscordAccount " name = " requireDiscordAccount " @ if ( $vacancy -> requiresDiscord ) checked @ endif >
< label class = " text-bold form-check-label " for = " requireDiscordAccount " >
{{ __ ( 'Require a Discord account for users to apply' ) }}
</ label >
< p class = " text-muted " >< i class = " fas fa-info-circle " > </ i > {{ __ ( 'This will redirect users to sign in with Discord before they are allowed to submit the form.' ) }} </ p >
</ div >
2020-07-11 20:34:26 +01:00
</ div >
</ div >
</ form >
</ div >
< div class = " card-footer " >
2022-03-19 05:56:20 +00:00
< button type = " button " class = " btn btn-warning " onclick = " $ ('#editPositionForm').submit() " >< i class = " fas fa-edit " ></ i > {{ __ ( 'Save changes' )}} </ button >
< button type = " button " class = " btn btn-danger " onclick = " window.location.href=' { { route('showPositions') }}' " >< i class = " fas fa-times " ></ i > {{ __ ( 'Go back' )}} </ button >
2020-07-11 20:34:26 +01:00
@ if ( $vacancy -> vacancyStatus == 'OPEN' )
2020-07-16 21:21:28 +01:00
< form method = " POST " action = " { { route('updatePositionAvailability', ['vacancy' => $vacancy->id , 'status' => 'close']) }} " style = " display: inline " >
2020-07-11 20:34:26 +01:00
@ method ( 'PATCH' )
@ csrf
2022-03-19 05:56:20 +00:00
< button type = " submit " class = " ml-4 btn btn-danger " >< i class = " fas fa-ban " ></ i > {{ __ ( 'Close vacancy' )}} </ button >
2020-07-11 20:34:26 +01:00
</ form >
@ endif
</ div >
</ div >
</ div >
</ div >
@ stop
2020-07-16 06:46:20 +01:00
@ section ( 'footer' )
@ include ( 'breadcrumbs.dashboard.footer' )
@ stop