| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- PFBC framework extension, HTML output is controlled | |
| 3 | 2 | class AccuaForm_Element_FieldsetBegin extends Element { |
| 4 | 3 | public function __construct($legend, $name = "", $properties = array()) { |
| 5 | 4 | $properties += array("legend" => $legend); |
| 6 | 5 | parent::__construct("", $name, $properties); |
| @@ -6,21 +5,8 @@ | ||
| 6 | 5 | parent::__construct("", $name, $properties); |
| 7 | 6 | } |
| 8 | 7 | |
| 9 | 8 | public function render() { |
| 10 | - $wrapperClass = $this->getWrapperCssClass(); | |
| 11 | - if (!empty($wrapperClass)) { | |
| 12 | - $existing = isset($this->attributes['class']) ? $this->attributes['class'] . ' ' : ''; | |
| 13 | - $this->attributes['class'] = $existing . $wrapperClass; | |
| 14 | - } | |
| 15 | - $wrapperID = $this->getWrapperCssId(); | |
| 16 | - if (!empty($wrapperID)) { | |
| 17 | - $this->attributes['id'] = $wrapperID; | |
| 18 | - } | |
| 19 | - $legend = $this->attributes["legend"]; | |
| 20 | - echo '<fieldset ', $this->getAttributes(array('legend')), '>'; | |
| 21 | - if ($legend !== '') { | |
| 22 | - echo '<legend>', $legend, '</legend>'; | |
| 23 | - } | |
| 9 | + echo '<fieldset ', $this->getAttributes(array('legend')), ' ><legend>', $this->attributes["legend"], '</legend>'; | |
| 24 | 10 | } |
| 25 | 11 | |
| 26 | 12 | } |