diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f8fed35..7404914c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.18.7] - 2022-07-29 +### Fixed +- New ad unit size error + ## [1.18.6] - 2022-07-20 ### Fixed - Handling missing ad unit's size @@ -454,7 +458,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Publisher features (Sites & AdUnits) -[Unreleased]: https://github.com/adshares/adpanel/compare/v1.18.6...develop +[Unreleased]: https://github.com/adshares/adpanel/compare/v1.18.7...develop +[1.18.7]: https://github.com/adshares/adpanel/compare/v1.18.6...v1.18.7 [1.18.6]: https://github.com/adshares/adpanel/compare/v1.18.5...v1.18.6 [1.18.5]: https://github.com/adshares/adpanel/compare/v1.18.4...v1.18.5 [1.18.4]: https://github.com/adshares/adpanel/compare/v1.18.2...v1.18.4 diff --git a/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.html b/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.html index e4fd0a5e4..90045e584 100644 --- a/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.html +++ b/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.html @@ -97,6 +97,7 @@ class="dwmth-form-input" formControlName="name" data-test="publisher-edit-site-create-ad-units-form-short-headline" + [readonly]="!adUnitForm.get('size').value && adUnitForm.get('saved').value" >
@@ -193,7 +194,7 @@
diff --git a/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.ts b/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.ts index bdb6691b8..e5ebd26ab 100644 --- a/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.ts +++ b/src/app/publisher/edit-site/edit-site-create-ad-units/edit-site-create-ad-units.component.ts @@ -86,7 +86,7 @@ export class EditSiteCreateAdUnitsComponent extends HandleSubscription implement if (savedAdUnits.length > 0) { savedAdUnits.forEach((savedAdUnit, index) => { - this.adUnitForms.push(this.generateFormField(savedAdUnit)); + this.adUnitForms.push(this.generateFormField(savedAdUnit, true)); this.adUnitPanelsStatus[index] = false; this.selectChosenSize(savedAdUnit, index); }); @@ -120,7 +120,7 @@ export class EditSiteCreateAdUnitsComponent extends HandleSubscription implement } } - generateFormField(adUnit: Partial): FormGroup { + generateFormField(adUnit: Partial, saved: boolean = false): FormGroup { this.filteredAdUnitSizes.push(cloneDeep(this.adUnitSizes)); this.allAdUnitSizes.push(cloneDeep(this.adUnitSizes)); @@ -133,6 +133,7 @@ export class EditSiteCreateAdUnitsComponent extends HandleSubscription implement label: new FormControl(adUnit.label, Validators.required), tags: new FormControl(adUnit.tags, Validators.required), id: new FormControl(adUnit.id), + saved: new FormControl(saved) }); }