commit dcd455e9addc3185cf6e73974eeb1d5346986cd6
parent e9901bffb30e11bf920b5a1573e399aba8308a71
Author: dankert <devnull@localhost>
Date: Fri, 26 Mar 2010 23:51:40 +0100
Radiobutton-Liste muss auch Textschlüssel korrekt ausgeben können.
Diffstat:
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/actionClasses/ElementAction.class.php b/actionClasses/ElementAction.class.php
@@ -347,10 +347,17 @@ class ElementAction extends Action
$format = 'wiki,html';
$this->setTemplateVar('format', $format );
- $formatlist = array('none'=>'raw','html'=>'html','wiki'=>'wiki','wiki,html'=>'wikihtml');
-
+
+ $formatlist = array();
+ $formatlist['none' ] = 'raw'; // Nur Text, ohne Auszeichnungen
+ // Für einfache Textelemente gibt es keinen HTML-Editor
+ if ( $this->element->type == 'longtext' )
+ $formatlist['html' ] = 'html'; // Text mit HTML-Editor
+ $formatlist['wiki' ] = 'wiki'; // Text mit Markup, HTML nicht erlaubt
+ $formatlist['wiki,html'] = 'wikihtml'; // Text mit Markup, HTML erlaubt
+
foreach( $formatlist as $t=>$v )
- $formatlist[$t] = lang('EL_PROP_'.$v);
+ $formatlist[$t] = array('lang'=>'EL_PROP_'.$v);
$this->setTemplateVar('formatlist', $formatlist );
//Html::debug($this->templateVars);
diff --git a/themes/default/include/html/radiobox.inc.php b/themes/default/include/html/radiobox.inc.php
@@ -8,6 +8,7 @@
foreach( $attr_tmp_list as $box_key=>$box_value )
{
+ $box_value = is_array($box_value)?(isset($box_value['lang'])?langHtml($box_value['lang']):$box_value['value']):$box_value;
$id = 'id_'.$attr_name.'_'.$box_key;
echo '<input id="'.$id.'" name="'.$attr_name.'" type="radio" class="'.$attr_class.'" value="'.$box_key.'"';
if ($box_key==$attr_tmp_default)