Skip to content

Commit

Permalink
Make mandatory metadata required
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramMaalej committed Jan 31, 2022
1 parent 3b6c7d0 commit d67da33
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="#{request.requestURI.contains('metadataEditor') ? 'preserveMetadata(); 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="#{request.requestURI.contains('metadataEditor') ? 'preserveMetadata(); updateTitleMetadata();' : ''}"/>
</p:selectBooleanCheckbox>
Expand Down

0 comments on commit d67da33

Please sign in to comment.