opencaching / opencaching-pl

The source code of Opencaching.PL (and some other domains)
https://opencaching.pl/
GNU General Public License v3.0
22 stars 33 forks source link

Editing cache description without previously configured reactivation rule leads to issue with sending form #2345

Closed mzylowski closed 2 years ago

mzylowski commented 2 years ago

Steps to reproduce

  1. Go to cache description edit (for cache that reactivation rule is not set yet)
  2. Set reactivation option that you choose
  3. Try to send form
  4. Sending is not possible because form is still asking for reactivation rule.

Screenshot_64

rapotek commented 2 years ago

Tried to reproduce in my development site on a few caches as well as on my only cache in opencaching.pl: all is working correctly, I did not manage to get the above effect.

deg-pl commented 2 years ago

@rapotek did you try using Chrome? I have the same problem like @mzylowski

rapotek commented 2 years ago

No, I use only firefox for opencaching. Didn't know it is a browser-dependent problem.

Ok, I checked it out and it is not browser-dependent, but the description above is too broad. The reproduction steps should be:

  1. Go to cache description edit (for cache that reactivation rule is not set yet)
  2. Try to send a form WITHOUT selecting any reactivation rule option: the request for selecting a reactivation rule correctly appears
  3. Set reactivation option that you choose
  4. Try to send form
  5. Sending is not possible because form is still asking for reactivation rule, while it is already set

In addition: the form is sent after repeating the sequence: 'set another reactivation rule option, send a form' a few times.

Moreover, a new cache creation has the same problem.

It looks like the problem lies in "reqiured" "oninvalid" "oninput" settings. There should be only one radio input required with set "oninvalid" and another inputs "oninput" should clear "invalid" state for the required one.

mzylowski commented 2 years ago

Sorry for inaccurate reproduction steps. I wasn't sure exactly all steps I did.

Great that we have now working fix. Thanks @rapotek and let's merge this. ;)

rapotek commented 2 years ago

I thought I named a PR (using "fixes" word) to close this issue on merge, but it is still open. I think it should be closed for now.

deg-pl commented 2 years ago

@rapotek you're right! It's strange a little.