commit 13142ebf18f1913dc62c5d638cc367311f33d222 parent e34144b884a1fa8bd924dd978a93813d2f7beeea Author: dankert <devnull@localhost> Date: Thu, 11 Sep 2008 22:32:49 +0200 Auswahlliste ggf. deaktivieren. Diffstat:
themes/default/include/html/selectbox.inc.php | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/themes/default/include/html/selectbox.inc.php b/themes/default/include/html/selectbox.inc.php @@ -1,4 +1,5 @@ <?php +if ($this->isEditable() && $this->getRequestVar('mode')!='edit') $attr_readonly=true; if ( $attr_addempty!==FALSE ) { if ($attr_addempty===TRUE) @@ -6,7 +7,7 @@ if ( $attr_addempty!==FALSE ) else $$attr_list = array(''=>'- '.lang($attr_addempty).' -')+$$attr_list; } -?><select id="id_<?php echo $attr_name ?>" name="<?php echo $attr_name; if ($attr_multiple) echo '[]'; ?>" onchange="<?php echo $attr_onchange ?>" title="<?php echo $attr_title ?>" class="<?php echo $attr_class ?>"<?php +?><select<?php if ($attr_readonly) echo ' disabled="disabled"' ?> id="id_<?php echo $attr_name ?>" name="<?php echo $attr_name; if ($attr_multiple) echo '[]'; ?>" onchange="<?php echo $attr_onchange ?>" title="<?php echo $attr_title ?>" class="<?php echo $attr_class ?>"<?php if (count($$attr_list)<=1) echo ' disabled="disabled"'; if ($attr_multiple) echo ' multiple="multiple"'; if (in_array($attr_name,$errors)) echo ' style="background-color:red; border:2px dashed red;"';