summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorJens Klaer <kj.landwehr.software@gmail.com>2015-10-22 10:48:13 +0200
committerJens Klaer <kj.landwehr.software@gmail.com>2015-10-22 10:48:13 +0200
commitfd76b5617e3c136be2f8b5374e7629d2bea77070 (patch)
tree719eff831c25b0e557b321ed826b6d6365496b64 /framework/Web/UI/WebControls
parenta262ce578b6584ab71421a7fb59d506848f60683 (diff)
extended ISurroundable to provide the surrounding tag in addition to the id
- ISurroundable introducing getSurroundingTag(), adjusted controls implementing the interface - TActiveDataGrid/TActiveRepeater now support changing the container tag to avoid invalid html in specific situations - revised corresponding quickstart demos
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TCheckBox.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php
index a28beac7..672aa9b2 100644
--- a/framework/Web/UI/WebControls/TCheckBox.php
+++ b/framework/Web/UI/WebControls/TCheckBox.php
@@ -284,11 +284,19 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
}
/**
- * @return string the id of the surrounding tag or this clientID if no such tag needed
+ * @return string the tag used to wrap the control in.
+ */
+ public function getSurroundingTag()
+ {
+ return 'span';
+ }
+
+ /**
+ * @return string the id of the surrounding tag or this clientID if no such tag needed.
*/
public function getSurroundingTagID()
{
- return $this->getSpanNeeded() ? $this->getClientID().'_parent' : $this->getClientID();
+ return $this->getSpanNeeded() ? $this->getClientID().'_parent' : $this->getClientID();
}
/**
@@ -318,11 +326,11 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
}
else
$onclick='';
- if($needspan=$this->getSpanNeeded())
- {
- $writer->addAttribute('id',$this->getSurroundingTagID());
- $writer->renderBeginTag('span');
- }
+ if($needspan=$this->getSpanNeeded())
+ {
+ $writer->addAttribute('id',$this->getSurroundingTagID());
+ $writer->renderBeginTag($this->getSurroundingTag());
+ }
$clientID=$this->getClientID();
if(($text=$this->getText())!=='')
{