X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fhtmloutputter.php;h=1e164933ce0404adec94f0967bbf568440580a5d;hb=6a3204d08e035812cf111e20f72bf0c7ffb4c601;hp=75a995bef190dbcbc4ff99c43a1159254c62a81e;hpb=f0b4e7094c509bf5830586e3e05382e754adf3db;p=quix0rs-gnu-social.git diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 75a995bef1..1e164933ce 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -155,20 +155,17 @@ class HTMLOutputter extends XMLOutputter function input($id, $label, $value=null, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $attrs = array('name' => $id, 'type' => 'text', - 'class' => 'input_text', 'id' => $id); if ($value) { $attrs['value'] = htmlspecialchars($value); } $this->element('input', $attrs); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -192,7 +189,6 @@ class HTMLOutputter extends XMLOutputter function checkbox($id, $label, $checked=false, $instructions=null, $value='true', $disabled=false) { - $this->elementStart('p'); $attrs = array('name' => $id, 'type' => 'checkbox', 'class' => 'checkbox', @@ -208,14 +204,13 @@ class HTMLOutputter extends XMLOutputter } $this->element('input', $attrs); $this->text(' '); - $this->element('label', array('class' => 'checkbox_label', + $this->element('label', array('class' => 'checkbox', 'for' => $id), $label); $this->text(' '); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -240,7 +235,6 @@ class HTMLOutputter extends XMLOutputter function dropdown($id, $label, $content, $instructions=null, $blank_select=false, $selected=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $this->elementStart('select', array('id' => $id, 'name' => $id)); if ($blank_select) { @@ -257,9 +251,8 @@ class HTMLOutputter extends XMLOutputter } $this->elementEnd('select'); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -296,7 +289,6 @@ class HTMLOutputter extends XMLOutputter function password($id, $label, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $attrs = array('name' => $id, 'type' => 'password', @@ -304,9 +296,8 @@ class HTMLOutputter extends XMLOutputter 'id' => $id); $this->element('input', $attrs); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } /** @@ -322,15 +313,14 @@ class HTMLOutputter extends XMLOutputter * @todo add a $name parameter */ - function submit($id, $label, $cls='submit', $name=null) + function submit($id, $label, $cls='submit', $name=null, $title=null) { - $this->elementStart('p'); $this->element('input', array('type' => 'submit', 'id' => $id, 'name' => ($name) ? $name : $id, 'class' => $cls, - 'value' => $label)); - $this->elementEnd('p'); + 'value' => $label, + 'title' => $title)); } /** @@ -350,7 +340,6 @@ class HTMLOutputter extends XMLOutputter function textarea($id, $label, $content=null, $instructions=null) { - $this->elementStart('p'); $this->element('label', array('for' => $id), $label); $this->element('textarea', array('rows' => 3, 'cols' => 40, @@ -358,8 +347,7 @@ class HTMLOutputter extends XMLOutputter 'id' => $id), ($content) ? $content : ''); if ($instructions) { - $this->element('span', 'input_instructions', $instructions); + $this->element('p', 'form_guide', $instructions); } - $this->elementEnd('p'); } }