We have moved to Github. Please open tickets there.

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#334 closed Defect (fixed)

Notifications setting error. (Was: views/default/input/radio.php *always* selects first radio box, regardless of settings. [FIX INCLUDED])

Reported by: duncane Owned by: marcus
Priority: high Milestone:
Component: Core Version: 1.0
Severity: major Keywords: radio checkbox
Cc: brettp Difficulty:

Description

I discovered when changing the notify by email setting in user settings. Regardless of whether I set "yes" or "no", it would always display "yes" when I refreshed the page.

There are two bugs in views/default/input/radio.php:

  1. $vars[value] is checked against the key, rather than the value.
  2. To check a radio button, the form should use 'checked' not 'checked = checked'.

I've attached a patch to this ticket.

Attachments (1)

patch-radio (1.0 KB) - added by duncane 5 years ago.
Patches views/default/input/radio.php

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by duncane

Patches views/default/input/radio.php

comment:1 Changed 5 years ago by marcus

  • Owner set to marcus
  • Status changed from new to assigned
  • Summary changed from views/default/input/radio.php *always* selects first radio box, regardless of settings. [FIX INCLUDED] to Notifications setting error. (Was: views/default/input/radio.php *always* selects first radio box, regardless of settings. [FIX INCLUDED])

comment:2 Changed 5 years ago by marcus

Additionally, checked="checked" is valid XHTML, but checked isn't. Elgg is trying to be XHTML throughout.

comment:3 Changed 5 years ago by marcus

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:4 Changed 5 years ago by marcus

See notes for [svn:2058]

Note: See TracTickets for help on using tickets.