Opened 8 years ago
Closed 8 years ago
#27431 closed Bug (fixed)
Disabled fields are marked as changed in form
Reported by: | Paul | Owned by: | Kenneth Veldman |
---|---|---|---|
Component: | Forms | Version: | 1.10 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If field has initial value and is marked as disabled, then it will be marked as changed after form submission.
Change History (7)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 8 years ago
Has patch: | set |
---|
See branch: https://github.com/veldman/django/tree/ticket_27431
Added a check in the has_changed function of a field to see if a field is disabled and always return true.
All test pass under SQLite.
Version 0, edited 8 years ago by (next)
comment:4 by , 8 years ago
Patch needs improvement: | set |
---|
comment:6 by , 8 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Able to reproduce using a form on submit using a simple form with two comparable fields.
Code highlighting:
Results of form.has_changed() and form.changed_data after the form has been submitted are:
Code highlighting:
Working on writing a patch.