mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 32182 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.0-nzct ........ r32182 | ischommer | 2007-03-14 23:34:50 +1300 (Wed, 14 Mar 2007) | 1 line More versatile character-replacing for css-classes ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52775 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ce8bf58b0d
commit
12c3ab559f
@ -44,7 +44,7 @@ class OptionsetField extends DropdownField {
|
|||||||
|
|
||||||
$odd = ($odd + 1) % 2;
|
$odd = ($odd + 1) % 2;
|
||||||
$extraClass = $odd ? "odd" : "even";
|
$extraClass = $odd ? "odd" : "even";
|
||||||
$extraClass .= " val" . str_replace(' ','',$key);
|
$extraClass .= " val" . preg_replace('/[^a-zA-Z0-9\-\_]/','_', $key);
|
||||||
$disabled = $this->disabled ? 'disabled="disabled"' : '';
|
$disabled = $this->disabled ? 'disabled="disabled"' : '';
|
||||||
|
|
||||||
$options .= "<li class=\"".$extraClass."\"><input id=\"$itemID\" name=\"$this->name\" type=\"radio\" value=\"$key\"$checked $disabled/> <label for=\"$itemID\">$value</label></li>\n";
|
$options .= "<li class=\"".$extraClass."\"><input id=\"$itemID\" name=\"$this->name\" type=\"radio\" value=\"$key\"$checked $disabled/> <label for=\"$itemID\">$value</label></li>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user