Resolve "Editing of capacity does not work unless focus is explictly lost"
Summary
Before, editing a capacity of a slot when creating/editing a slotted lab required the user to explicitly lose focus from the capacity textbox for the new capacity to be saved. Now the capacity gets saved as soon as you enter a number. There are also checks for NaN and negative capacities.
Checklist
All items on this checklist should be checked.
-
I have added a changelog entry. -
I have added a test that catches the original bug behaviour. -
I adhere to the style guide.
How to review
- Log in as somebody allowed to create a new slotted lab
- Choose or make a course
- Start creating a slotted lab, and make some slots
- Before savng the lab, choose a slot and edit the capacity to see that it changes immediately
- Try to put in text or a negative number to see that they do not get saved as a valid capacity
- Save the lab
- Edit the slot capacity from session overview to see that it also works there
Issues and tasks closed
Closes #766 (closed)
Edited by Rūta Giedrytė