Fix object-store container toggle for turning public access on/off

After updating to angular 1.8, changes to a object (in this case the
container object) has changed from the click event to the onchange event
for input radio's and checkboxes as described on
https://docs.angularjs.org/guide/migration#-input-radio-and-input-checkbox-

In our scenario this means the container.is_public value is changed
_after_ the ajax call went to the horizon API, effectively not changing it.

This change fixes this, by migrating to the ng-change event for this toggle

Closes-Bug: #2020879
Change-Id: If3b87da6d747bb7e738b64f4c2f3472a7556c652
This commit is contained in:
Michel Nederlof 2023-05-30 16:17:01 +02:00 committed by Michel Nederlof
parent cbbc7d3621
commit cd64730ee4
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@
<div class="themable-checkbox col-lg-7 col-md-12">
<input type="checkbox" id="id_access" ng-model="container.is_public"
ng-if="container.name === cc.model.container.name"
ng-click="cc.toggleAccess(container)">
ng-change="cc.toggleAccess(container)">
<label class="hz-object-label" for="id_access" translate>Public Access</label>
</div>
<span class="hz-object-val col-lg-5 col-md-12">