openrat-cms

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

commit 03e086ef04422e432e60410c4ff2809b44f86a70
parent 3602d1c53fdf583854c254f0e4b94097222fbf49
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 19 Dec 2017 22:14:21 +0100

Radioboxen können auch Sprachschlüssel enthalten.

Diffstat:
modules/template-engine/components/html/radiobox/component-radio-box.php | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/template-engine/components/html/radiobox/component-radio-box.php b/modules/template-engine/components/html/radiobox/component-radio-box.php @@ -10,17 +10,17 @@ function component_radio_box($name, $values, $value) { foreach ($values as $box_key => $box_value) { - if (is_array($box_value)) + if (is_array($box_value) && isset($box_value['lang'])) + { + $box_value = '<?php echo lang(\''.$box_value['lang'].'\') ?>'; + $box_title = ''; + } + elseif (is_array($box_value)) { $box_key = $box_value['key']; $box_title = $box_value['title']; $box_value = $box_value['value']; } -// elseif ($valuesAreLanguageKeys) -// { -// $box_title = lang($box_value . '_DESC'); -// $box_value = lang($box_value); -// } else { $box_title = '';