Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
milanmajchrak opened this issue Nov 29, 2024 · 0 comments
Open
Assignees

Comments

@milanmajchrak
Copy link
Collaborator

milanmajchrak commented Nov 29, 2024

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
@milanmajchrak milanmajchrak self-assigned this Nov 29, 2024
@milanmajchrak milanmajchrak changed the title Submission workflow/type-binded inputs are not displayed correctly Submission workflow/type-bound inputs are not displayed correctly Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant