Skip to content

Commit

Permalink
Merge pull request #4949 from effective-webwork/mandatory-metadata
Browse files Browse the repository at this point in the history
Make mandatory metadata required
  • Loading branch information
Kathrin-Huber authored Mar 17, 2022
2 parents bd97841 + 336cbe1 commit 9b58e21
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
readonly="#{not item.editable}"
styleClass="#{not item.editable or readOnly ? 'read-only disabled' : ''}"
disabled="#{not item.editable or readOnly}"
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
showCheckbox="true">
<f:selectItems value="#{item.items}"/>
<p:ajax event="change" oncomplete="preserveMetadata(); #{request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : ''}"/>
Expand All @@ -111,6 +112,7 @@
readonly="#{not item.editable}"
autoWidth="false"
disabled="#{not item.editable or readOnly}"
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
styleClass="#{readOnly ? 'read-only' : ''}">
<f:selectItem itemValue="#{null}"
itemDisabled="#{item.required}"
Expand All @@ -126,6 +128,7 @@
<p:selectOneRadio id="selectOneRadio"
value="#{item.selectedItem}"
readonly="#{not item.editable}"
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
disabled="#{not item.editable or readOnly}"
styleClass="#{not item.editable or readOnly ? 'read-only disabled' : ''}"
layout="grid"
Expand All @@ -140,6 +143,7 @@
title="#{item.active.toString()}">
<p:selectBooleanCheckbox id="selectBooleanCheckbox"
disabled="#{not item.editable or readOnly}"
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
value="#{item.active}">
<p:ajax event="change" oncomplete="preserveMetadata(); #{request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : ''}"/>
</p:selectBooleanCheckbox>
Expand Down

0 comments on commit 9b58e21

Please sign in to comment.