openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 9145f7389bf1011a90a3e0d1ab3694d661c71203
parent 71597ce9985b013ad73d39211cd5d6ae375f724e
Author: Jan Dankert <devnull@localhost>
Date:   Sat,  2 Dec 2017 00:58:20 +0100

Komponente "label" umgestellt auf eine Klasse.

Diffstat:
themes/default/include/html/label/Label.class.php | 44++++++++++++++++++++++++++++++++++++++++++++
themes/default/include/html/label/label-begin.inc.php | 3---
themes/default/include/html/label/label-end.inc.php | 2--
3 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/themes/default/include/html/label/Label.class.php b/themes/default/include/html/label/Label.class.php @@ -0,0 +1,43 @@ +<?php + +class LabelComponent extends Component +{ + + public $for; + + public $value; + + public $key; + + public $text; + + public function begin() + { + echo '<label'; + + if (! empty($this->for)) + { + + echo ' for="<?php echo REQUEST_ID ?>_' . $this->htmlvalue($this->for); + if (isset($this->value)) + echo '_' . $this->htmlvalue($this->value); + echo '"'; + } + + echo ' class="label"'; + echo '>'; + + if ( !empty($this->key)) + echo '<?php echo lang(' . $this->value($this->key) . ') ?>'; + + if (isset($this->text)) + echo $this->htmlvalue($this->text); + } + + public function end() + { + echo '</label>'; + } +} + +?>+ \ No newline at end of file diff --git a/themes/default/include/html/label/label-begin.inc.php b/themes/default/include/html/label/label-begin.inc.php @@ -1,2 +0,0 @@ -<label<?php if (isset($attr_for)) { ?> for="<?php echo REQUEST_ID ?>_<?php echo $attr_for ?><?php if (!empty($attr_value)) echo '_'.$attr_value ?>" <?php if(hasLang(@$attr_key.'_desc')) { ?> title="<?php echo lang(@$attr_key.'_desc')?>"<?php } ?> class="label"<?php } ?>> -<?php if (isset($attr_key)) { echo lang($attr_key); ?><?php if (isset($attr_text)) { echo $attr_text; } ?><?php } ?>- \ No newline at end of file diff --git a/themes/default/include/html/label/label-end.inc.php b/themes/default/include/html/label/label-end.inc.php @@ -1 +0,0 @@ -</label>- \ No newline at end of file