rubyforgood / casa

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.
https://casavolunteertracking.org/
MIT License
314 stars 478 forks source link

Duration inputs on forms require the user to input both hours and minutes #5383

Closed FireLemons closed 11 months ago

FireLemons commented 12 months ago

What type(s) of user does this feature affect?

Description

Problem

Duration sections like this: image

require the user to type a number for both hours and minutes. So if the activity lasts exactly an hour the user has to type a 0 for minutes to be able to submit the form.

Removing the required HTML attribute reveals the controller requires the field also. image

Solution

Remove the required attributes from the form. If the input is blank, make the controller assume the value is 0. Update / write a test

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

schoork commented 12 months ago

Could also initially set the value as 0. I'd probably do this in the view.

value: form.object.new_record? ? 0 : VALUE

fchagasjr commented 12 months ago

Can I be assigned to this?

Br0k3nh4nd012 commented 11 months ago

@FireLemons Can I work on this?

github-actions[bot] commented 11 months ago

This issue has been inactive for 247 hours (10.29 days) and will be unassigned after 113 more hours (4.71 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time