4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
14 stars 28 forks source link

metadata fields with <input-type>name</input-type>: field visibility switch is not shown in edit / submission form #47

Open saschaszott opened 1 year ago

saschaszott commented 1 year ago

This bug affects DS CRIS 2023.01

The metadata field value visibility switch, e.g. image, is not shown if the metadata field's input type is set to name in submission-forms.xml.

Example

In this example we consider the metadata field crisrp. preferredName in entity type Person.

excerpt from submission-forms.xml

    <form name="person">
      <row>
        <field>
          <dc-schema>crisrp</dc-schema>
          <dc-element>preferredName</dc-element>
          <repeatable>false</repeatable>
          <label>Preferred Name</label>
          <input-type>name</input-type>  <!-- if you change this value to "onebox" it works as expected -->
          <hint />
        </field>
      </row>
      …
    </form>

excerpt from local.cfg

metadatavalue.visibility.Person.crisrp.preferredName.settings = [0 2]

expected behaviour

The edit / submission form shows a visibility switch image next to the input field.

current behaviour

The visibility switch is not shown in the edit/form next to the input field.

image