"radio"); protected $inline; protected $maxheight; public function jQueryDocumentReady() { if(!empty($this->inline)) echo 'jQuery("#', $this->attributes["id"], ' .pfbc-radio:last").css("margin-right", "0");'; else echo 'jQuery("#', $this->attributes["id"], ' .pfbc-radio:last").css({ "padding-bottom": "0", "border-bottom": "none" });'; if(!empty($this->maxheight) && is_numeric($this->maxheight)) { echo <<attributes["id"]} .pfbc-radio-buttons"); if(radiobuttons.outerHeight() > {$this->maxheight}) { radiobuttons.css({ "height": "{$this->maxheight}px", "overflow": "auto", "overflow-x": "hidden" }); } JS; } } public function render() { $count = 0; $checked = false; echo '
'; foreach($this->options as $value => $text) { $value = $this->getOptionValue($value); echo '
getAttributes(array("id", "value", "checked")), ' value="', $this->filter($value), '"'; if(isset($this->attributes["value"]) && $this->attributes["value"] == $value) echo ' checked="checked"'; echo '/>
'; ++$count; } echo '
'; if(!empty($this->inline)) echo '
'; echo '
'; } public function renderCSS() { if(!empty($this->inline)) echo '#', $this->attributes["id"], ' .pfbc-radio { float: left; margin-right: 0.5em; }'; else echo '#', $this->attributes["id"], ' .pfbc-radio { padding: 0.5em 0; border-bottom: 1px solid #f4f4f4; }'; } }