Skip to content

Submission workflow/type-bound inputs are not displayed correctly #751

@milanmajchrak

Description

@milanmajchrak

Problem description

When the user changes the type, the type-bound input fields are not displayed or hidden correctly. They appear or disappear as expected when the type is selected at the start of the submission. However, after some inputs in each form are filled and the license is marked as true, the type-bound inputs do not update correctly when the dc.type field is changed.

The type-bound inputs are displayed correctly only when the user clicks the Save button.

How to reproduce

  1. Set up input field with type-bind like
            <row>
                <field>
                    <dc-schema>dc</dc-schema>
                    <dc-element>language</dc-element>
                    <dc-qualifier>iso</dc-qualifier>
                    <repeatable>false</repeatable>
                    <label>Language</label>
                    <type-bind>corpus,lexicalConceptualResource,languageDescription</type-bind>
                    <input-type>onebox</input-type>
                    <hint>Select the language of the main content of the item. Multiple languages are possible. Start
                        typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support).
                    </hint>
                    <required>Please choose a language for the resource.</required>
                </field>
            </row>
            <row>
                <field>
                    <dc-schema>dc</dc-schema>
                    <dc-element>language</dc-element>
                    <dc-qualifier>iso</dc-qualifier>
                    <repeatable>true</repeatable>
                    <label>Language</label>
                    <type-bind>toolService</type-bind>
                    <input-type>onebox</input-type>
                    <hint>If the tool/service is language dependent, select the appropriate language(s). Otherwise leave the field empty. Multiple languages are possible. Start typing the language and use autocomplete
                        form that will appear.
                    </hint>
                    <required/>
                </field>
            </row>
  1. type options must be like this:
<value-pairs value-pairs-name="common_types" dc-term="type">
            <pair>
                <displayed-value>N/A</displayed-value>
                <stored-value/>
            </pair>
            <pair>
                <displayed-value>Corpus</displayed-value>
                <stored-value>corpus</stored-value>
            </pair>
            <pair>
                <displayed-value>Lexical conceptual</displayed-value>
                <stored-value>lexicalConceptualResource</stored-value>
            </pair>
            <pair>
                <displayed-value>Language description</displayed-value>
                <stored-value>languageDescription</stored-value>
            </pair>
            <pair>
                <displayed-value>Technology / Tool / Service</displayed-value>
                <stored-value>toolService</stored-value>
            </pair>
            <!--<pair> <displayed-value>Evaluation package</displayed-value> <stored-value>evaluationPackage</stored-value>
              </pair> -->

        </value-pairs>
  1. Start creating an Item and fill in some inputs in every form WITHOUT TOUCHING THE TYPE input field
  2. Accept the license
  3. Fill in another input field
  4. Check the Language input field is not displayed
  5. Change type to Corpus
  6. BUG: the Language input field is not displayed
  7. Click Save -> the Language input field is displayed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions