Support readonly set via SendingContentNotification (#13557)

* Support readonly set via SendingContentNotification

* Apply changes to second umb-property-editor as well

* Remove check on property.supportsReadOnly

* Disable allow unlock

* Add check on property.readonly

* Small adjustment in the order of preview checks

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
(cherry picked from commit e30587f90d)
This commit is contained in:
Bjarne Fyrstenborg
2023-03-30 09:15:46 +02:00
committed by Sebastiaan Janssen
parent 02e16992b4
commit 4d13345b14
2 changed files with 7 additions and 7 deletions

View File

@@ -18,10 +18,10 @@
<umb-property-editor
model="property"
node="contentNodeModel"
preview="(propertyEditorDisabled(property) && allowUpdate) || (!allowUpdate && !property.supportsReadOnly)"
allow-unlock="allowUpdate && allowEditInvariantFromNonDefault"
preview="((property.readonly || !allowUpdate) && !property.supportsReadOnly) || (propertyEditorDisabled(property) && allowUpdate)"
allow-unlock="!property.readonly && allowUpdate && allowEditInvariantFromNonDefault"
on-unlock="unlockInvariantValue(property)"
ng-attr-readonly="{{ !allowUpdate || undefined}}">
ng-attr-readonly="{{property.readonly || !allowUpdate || undefined}}">
</umb-property-editor>
</umb-property>
@@ -52,10 +52,10 @@
<umb-property-editor
model="property"
node="contentNodeModel"
preview="(propertyEditorDisabled(property) && allowUpdate) || (!allowUpdate && !property.supportsReadOnly)"
allow-unlock="allowUpdate && allowEditInvariantFromNonDefault"
preview="((property.readonly || !allowUpdate) && !property.supportsReadOnly) || (propertyEditorDisabled(property) && allowUpdate)"
allow-unlock="!property.readonly && allowUpdate && allowEditInvariantFromNonDefault"
on-unlock="unlockInvariantValue(property)"
ng-attr-readonly="{{!allowUpdate || undefined}}">
ng-attr-readonly="{{property.readonly || !allowUpdate || undefined}}">
</umb-property-editor>
</umb-property>

View File

@@ -25,7 +25,7 @@
ng-click="openCurrentPicker()"
id="{{model.alias}}"
aria-label="{{model.label}}: {{labels.general_add}}"
ng-disabled="readonly">
ng-disabled="!allowAdd">
<localize key="general_add">Add</localize>
<span class="sr-only">...</span>
</button>