web/elements: Fix display in deleteform when object has no name
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -49,6 +49,12 @@ export class DeleteForm extends ModalButton {
|
||||
}
|
||||
|
||||
renderModalInner(): TemplateResult {
|
||||
let objName = this.obj?.name;
|
||||
if (objName) {
|
||||
objName = ` "${objName}"`;
|
||||
} else {
|
||||
objName = "";
|
||||
}
|
||||
return html`<section class="pf-c-page__main-section pf-m-light">
|
||||
<div class="pf-c-content">
|
||||
<h1 class="pf-c-title pf-m-2xl">
|
||||
@ -59,7 +65,7 @@ export class DeleteForm extends ModalButton {
|
||||
<section class="pf-c-page__main-section pf-m-light">
|
||||
<form class="pf-c-form pf-m-horizontal">
|
||||
<p>
|
||||
${t`Are you sure you want to delete ${this.objectLabel} "${this.obj?.name}"?`}
|
||||
${t`Are you sure you want to delete ${this.objectLabel} ${objName} ?`}
|
||||
</p>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user