Download & Extend

List Checkbox Default "Checked" Cannot Be Unchecked On Node Form

Project:FileField
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

SimpleTest claims another new bug: When creating a field, if the "List" field is enabled and defaults to "List files by default", then the checkbox is impossible to uncheck on the node form. Editing a node and unchecking the "List" box is not saved, the file is still visible, and re-editing the node the checkbox will be checked again.

This is because an empty checkbox does not pass any value to CCK, so we must check for the lack of a value at all, rather than expecting "0". This patch checks if a "List" field is in a file field, then sets the value to "0" if the list value is missing entirely.

AttachmentSize
filefield_uncheck_list.patch1.8 KB

Comments

#1

Status:needs review» fixed

The top of the provided patch contains some changes not relevant to this post. Committed this patch containing only the bottom part.

AttachmentSize
filefield_uncheck_list.patch 1.5 KB

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.