mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-09 23:08:36 +02:00
Better helper text
This commit is contained in:
parent
d86843977b
commit
4273880126
@ -232,7 +232,17 @@ class CreateServer extends CreateRecord
|
||||
->columnSpan(2)
|
||||
->defaultItems(fn () => count($this->eggDefaultPorts))
|
||||
->label('Port Assignments')
|
||||
->helperText(fn (Forms\Get $get) => empty($get('ports')) ? 'You must add ports to assign them!' : '')
|
||||
->helperText(function (Forms\Get $get) {
|
||||
if (empty($this->eggDefaultPorts)) {
|
||||
return "This egg doesn't have any ports defined.";
|
||||
}
|
||||
|
||||
if (empty($get('ports'))) {
|
||||
return 'You must add ports to assign them!';
|
||||
}
|
||||
|
||||
return '';
|
||||
})
|
||||
->live()
|
||||
->addable(false)
|
||||
->deletable(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user