mirror of
				https://git.proxmox.com/git/proxmox-widget-toolkit
				synced 2025-10-31 04:18:58 +00:00 
			
		
		
		
	certificates: removal prompt: don't display name if there is no name
The default certificate does not have a name, which caused this to display an undefined text in the prompt. Reported-by: Dietmar Maurer <dietmar@proxmox.com> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com> [ TL: drop useless instance of calling format, keep arrow-fn ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		
							parent
							
								
									8d95122d85
								
							
						
					
					
						commit
						461bb2e56c
					
				| @ -237,10 +237,16 @@ Ext.define('Proxmox.panel.Certificates', { | ||||
| 	    { | ||||
| 		xtype: 'proxmoxButton', | ||||
| 		text: gettext('Delete Custom Certificate'), | ||||
| 		confirmMsg: rec => Ext.String.format( | ||||
| 		    gettext('Are you sure you want to remove the certificate used for {0}'), | ||||
| 		    me.certById[rec.id].name, | ||||
| 		), | ||||
| 		confirmMsg: rec => { | ||||
| 		    let cert = me.certById[rec.id]; | ||||
| 		    if (cert.name) { | ||||
| 			return Ext.String.format( | ||||
| 			    gettext('Are you sure you want to remove the certificate used for {0}'), | ||||
| 			    cert.name, | ||||
| 			); | ||||
| 		    } | ||||
| 		    return gettext('Are you sure you want to remove the certificate'); | ||||
| 		}, | ||||
| 		callback: () => me.reload(), | ||||
| 		selModel: me.selModel, | ||||
| 		disabled: true, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Maximiliano Sandoval
						Maximiliano Sandoval