Project

General

Profile

Actions

Bug #1958

closed

Multiple submits at dynamic add entity function

Added by Nina Richards 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
2023-02-06
Estimated time:
Found in version:

Description

I've run into a bug today. When I go to e.g. an actor and want to set a "born in", then press the +place button to create a new place, I can add that place several times to the database. I am able to do this, by pressing the insert button repeatedly (in the same window while the system is saving the entry). This should not be possible, even if it takes longer to create the place. As for all the other forms, the insert button should be disabled after pressing it for the first time.

It happened to me here, for example: https://demo-dev.openatlas.eu/insert/person
But the bug can also be found in the THANADOS instance.

Actions #1

Updated by Alexander Watzinger 8 months ago

  • Status changed from New to Assigned
  • Target version set to 7.12.0
  • Found in version changed from 7.12.0 to 7.10.0
Actions #2

Updated by Alexander Watzinger 8 months ago

  • Subject changed from Multiple place entries to Multiple (unwanted) submits at dynamic add entity function
Actions #3

Updated by Alexander Watzinger 8 months ago

We had a similar problem with regular form submission some years ago (#547) which was solved by Christoph. I added him as watcher and feel free to contact him for more information if needed.

Actions #4

Updated by Christoph Hoffmann 8 months ago

the solution for the forms currently is a one-liner in the validation function: https://github.com/craws/OpenAtlas/blob/f2617e34c922aecfe5efc9bdd8ea0d617ff0d167/openatlas/static/js/forms.js#L150

Actions #5

Updated by Andreas Olschnögger 8 months ago

  • Status changed from Assigned to In Progress
  • Assignee changed from Moritz Großfurtner to Andreas Olschnögger
Actions #6

Updated by Andreas Olschnögger 8 months ago

  • Status changed from In Progress to Closed

Thanks for reporting this issue.
Now the submit button will be disabled and '... in progress' is displayed, when an entity is inserted.
I've also noticed that '... in progress' is currently not translated, so I've updated this also. Tranlslations in the .po files still need to be done.

Changes are on the develop branch.

Actions #7

Updated by Alexander Watzinger 8 months ago

  • Subject changed from Multiple (unwanted) submits at dynamic add entity function to Multiple submits at dynamic add entity function
Actions #8

Updated by Alexander Watzinger 8 months ago

  • Target version changed from 7.12.0 to 7.11.0
Actions

Also available in: Atom PDF