Download & Extend

"Allow user to clear value" checkbox always checked

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

Issue Summary

fivestar_field.inc line 193.

'#default_value' => $widget['allow_clear'] ? $widget['allow_clear'] : 1,

will always reset this form element to true. It should be something like
'#default_value' => ($widget['allow_clear'] == 0) ? $widget['allow_clear'] : 1,

or perhaps
'#default_value' => $widget['allow_clear'] ? $widget['allow_clear'] : 0,

Comments

#1

Status:active» fixed

I've committed the attached patch to fix this.

AttachmentSizeStatusTest resultOperations
fivestar_allow_clear.patch714 bytesIgnored: Check issue status.NoneNone

#2

Thanks :-)

#3

Status:fixed» closed (fixed)

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