diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.html b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.html
index 509c6025d37..529fca185ab 100644
--- a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.html
+++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.html
@@ -46,14 +46,23 @@
>
}
@if (form.controls.folder.enabled) {
-
+ @if (isNewBucketOptionSelected) {
+
+ } @else {
+
+ }
}
= of(null);
- if (!!this.form.value.bucket_input && this.form.value.bucket === newOption) {
+ if (!!this.form.value.bucket_input && this.isNewBucketOptionSelected) {
createBucket$ = this.ws.call('cloudsync.create_bucket', [this.form.value.credentials, this.form.value.bucket_input]);
}
@@ -279,7 +283,7 @@ export class CloudBackupFormComponent implements OnInit {
private prepareData(formValue: FormValue): CloudBackupUpdate {
const attributes: CloudBackupUpdate['attributes'] = {
folder: formValue.folder,
- bucket: this.form.value.bucket_input && this.form.value.bucket === newOption
+ bucket: this.form.value.bucket_input && this.isNewBucketOptionSelected
? this.form.value.bucket_input
: formValue.bucket,
};