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

Save button not enabled when adding a room in a location #4115

Closed
fweng322 opened this issue Oct 27, 2019 · 3 comments
Closed

Save button not enabled when adding a room in a location #4115

fweng322 opened this issue Oct 27, 2019 · 3 comments
Assignees
Labels
bug
Milestone

Comments

@fweng322
Copy link

@fweng322 fweng322 commented Oct 27, 2019

Describe the bug
In the room booking system, add a room in a location. In the "Add Room" dialog there are some fields marked with red asterisk which is required. However the save button would not be enabled even all the fields were filled. I also need to fill both "Longitude" and "Latitude" then the save button will be enabled, and will keep enabled even I remove the value in Longitude and Latitude.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Room booking system
  2. Click on 'Administration'
  3. Click on a pre-defined location and click "Add room"
  4. In the "Add Room" dialog the save button is disabled until I fill both Longitude and Latitude

Expected behavior
I should be able to save the room without filling the Longitude and Latitude

Screenshots
image

@ThiefMaster ThiefMaster added the bug label Oct 27, 2019
@ThiefMaster ThiefMaster added this to the v2.2 milestone Oct 27, 2019
@ThiefMaster

This comment has been minimized.

Copy link
Member

@ThiefMaster ThiefMaster commented Oct 27, 2019

Longitude/Latitude should be optional unless you fill out one of them, then both are required (since having just one value makes no sense). So indeed a bug...

Probably we need to set those two fields to null explicitly in the initialValues used when creating a new room, since they otherwise default to undefined.

Do you want to test if defaulting to null fixed this and if it does, send a Pull Request for it (against the 2.2-maintenance branch)?

@ThiefMaster ThiefMaster self-assigned this Oct 30, 2019
@fweng322

This comment has been minimized.

Copy link
Author

@fweng322 fweng322 commented Oct 30, 2019

Probably we need to set those two fields to null explicitly in the initialValues used when creating a new room, since they otherwise default to undefined.

Do you want to test if defaulting to null fixed this and if it does, send a Pull Request for it (against the 2.2-maintenance branch)?

Sorry I didn't notice these messages. Do I still have to test it?

@ThiefMaster

This comment has been minimized.

Copy link
Member

@ThiefMaster ThiefMaster commented Oct 30, 2019

Nope, I fixed it a few minutes ago; it will be included in 2.2.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.