jsform field defaults to no when field is disabled

Bug #1853387 reported by Lisa Seeto on 2019-11-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 20.04
19.10
High
Unassigned
20.04
High
Lisa Seeto

Bug Description

An issue was picked up on Administration Menu->Configure site->Site options->Security Settings which could be a bigger issue with the way JSForms processes.

Preconditions:
In the config.php file have "recaptchaonregisterform" set to true, i.e $cfg->recaptchaonregisterform = true;
Test:
1. Log in as site admin and go to Administration Menu->Configure site->Site options->Security Settings.
2. Scroll to "reCAPTCHA on user registration / contact us forms" and it should be set to "yes" as it reads from the config.php file. It should also be disabled.
3. Submit the page then view the Security Settings again.
Expected result:
The disabled "reCAPTCHA on user registration / contact us forms" button still shows "yes".
Actual result:
The disabled ""reCAPTCHA on user registration / contact us forms" button now shows "no"

This issue was also seen in admin/site/networking.php during work on https://reviews.mahara.org/#/c/10616/2. Removing the jsform => true in the pieform stopped the disabled form fields defaulting to their 'false' values, i.e when the page is submitted.

Mahara: 19.10_STABLE
Browsers: Firefox and Chrome
DB: Postgres

Lisa Seeto (lisaseeto) on 2019-11-21
Changed in mahara:
status: New → In Progress
assignee: nobody → Lisa Seeto (lisaseeto)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers