mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 12:04:44 +02:00
When editing set the custom image selector correctly
This commit is contained in:
parent
25177d1685
commit
4c5072b5c0
@ -325,6 +325,15 @@ class ServerResource extends Resource
|
||||
->live()
|
||||
->label('Custom Image?')
|
||||
->default(false)
|
||||
->formatStateUsing(function ($state, Forms\Get $get) {
|
||||
if ($state !== null) {
|
||||
return $state;
|
||||
}
|
||||
|
||||
$images = Egg::find($get('egg_id'))->docker_images ?? [];
|
||||
|
||||
return !in_array($get('image'), $images);
|
||||
})
|
||||
->options([
|
||||
false => 'No',
|
||||
true => 'Yes',
|
||||
|
Loading…
x
Reference in New Issue
Block a user