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

unable to delete last row of submission form inline group in existing item #74

Open
saschaszott opened this issue Feb 23, 2024 · 0 comments
Labels

Comments

@saschaszott
Copy link

Bug description

DSC7 comes with several inline groups in submission-forms.xml, e.g.

      <row>
        <field>
          <dc-schema>oairecerif</dc-schema>
          <dc-element>person</dc-element>
          <dc-qualifier>affiliation</dc-qualifier>
          <label>Affiliation(s)</label>
          <input-type>inline-group</input-type>
          <repeatable>true</repeatable>
          <required />
          <hint />
        </field>
      </row>

The group (in this example oairecerif.person.affiliation) consists of multiple (4) form elements. At least one of them is marked as required:

        <field>
          <dc-schema>oairecerif</dc-schema>
          <dc-element>person</dc-element>
          <dc-qualifier>affiliation</dc-qualifier>
          <label>Organisation name</label>
          <input-type>onebox</input-type>
          <repeatable>false</repeatable>
          <required>You must enter at least the organisation of your affiliation.</required>
          <style>col-xs-12 col-md-6 col-lg-3</style>
          <hint />
        </field>

The UI does not allow to delete the "last row" of a group as you can see in the screenshot below (trash icon is disabled):

image

This means (in this example) that you are not able to delete all affiliations of an existing researcher profile: one row in the group remains and as (in this example) oairecerif.person.affiliation is a mandatory field, you cannot delete all form field values in the remaining row.

@abollini , @atarix83 I'm not sure how a robust fix should look like. An easy option could be to fully remove the disabling of the trash button and allow the user to delete all rows in a given group. If you agree with this proposal, I'll create a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant