mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 16:56:52 +01:00 
			
		
		
		
	Better helper text
This commit is contained in:
		
							parent
							
								
									d86843977b
								
							
						
					
					
						commit
						4273880126
					
				| @ -232,7 +232,17 @@ class CreateServer extends CreateRecord | |||||||
|                                 ->columnSpan(2) |                                 ->columnSpan(2) | ||||||
|                                 ->defaultItems(fn () => count($this->eggDefaultPorts)) |                                 ->defaultItems(fn () => count($this->eggDefaultPorts)) | ||||||
|                                 ->label('Port Assignments') |                                 ->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() |                                 ->live() | ||||||
|                                 ->addable(false) |                                 ->addable(false) | ||||||
|                                 ->deletable(false) |                                 ->deletable(false) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Lance Pioch
						Lance Pioch