Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Multicheckboxes and radiobuttons could have ids with spaces in them.
Browse files Browse the repository at this point in the history
  • Loading branch information
tijsverkoyen committed Mar 30, 2012
1 parent 0031970 commit e6b1ea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spoon/form/multi_checkbox.php
Expand Up @@ -385,7 +385,7 @@ public function setValues(array $values, $defaultClass = 'inputCheckbox')
if(!isset($this->variables[$value['value']]['id']))
{
if(isset($this->attributes[$value['value']]['id'])) $this->variables[$value['value']]['id'] = $this->attributes[$value['value']]['id'];
else $this->variables[$value['value']]['id'] = SpoonFilter::toCamelCase($this->name . '_' . $value['value'], '_', true);
else $this->variables[$value['value']]['id'] = SpoonFilter::toCamelCase($this->name . '_' . str_replace(' ', '_', $value['value']), '_', true);
}

// add some custom vars
Expand Down
2 changes: 1 addition & 1 deletion spoon/form/radiobutton.php
Expand Up @@ -373,7 +373,7 @@ public function setValues(array $values, $defaultClass = 'inputRadio')
if(!isset($this->variables[$value['value']]['id']))
{
if(isset($this->attributes[$value['value']]['id'])) $this->variables[$value['value']]['id'] = $this->attributes[$value['value']]['id'];
else $this->variables[$value['value']]['id'] = SpoonFilter::toCamelCase($this->name . '_' . $value['value'], '_', true);
else $this->variables[$value['value']]['id'] = SpoonFilter::toCamelCase($this->name . '_' . str_replace(' ', '_', $value['value']), '_', true);
}

// add some custom vars
Expand Down

0 comments on commit e6b1ea2

Please sign in to comment.