From: hickert Date: Thu, 24 Nov 2005 12:10:38 +0000 (+0000) Subject: Display text input if there are no valid entries in select list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=08949676711d11261b99c88c3cd532c8b6bdb5c9;p=gosa.git Display text input if there are no valid entries in select list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2044 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_debconfTemplate.inc b/include/class_debconfTemplate.inc index c9c4aa8ed..001f56273 100644 --- a/include/class_debconfTemplate.inc +++ b/include/class_debconfTemplate.inc @@ -286,35 +286,36 @@ class debconf { $post_name= $data['post_name']; if (preg_match('/\$\{/', $data['Choices'])){ - $choices= array("Need to use some text..."); + $result= $this->render_string($data); } else { $choices= ""; foreach (split(", ", $data['Choices']) as $choice){ $choices[]= $choice; } - } - $result=" - - -

".$data['Topic']."

".$data['Description']." - - - - "; - - $defs = split(", ",$data['Default']); - foreach($choices as $value){ - if(in_array($value,$defs)){ - $result.="\n".$value."
"; - }else{ - $result.="\n".$value."
"; + + $result=" + + +

".$data['Topic']."

".$data['Description']." + + + + "; + + $defs = split(", ",$data['Default']); + foreach($choices as $value){ + if(in_array($value,$defs)){ + $result.="\n".$value."
"; + }else{ + $result.="\n".$value."
"; + } } - } - $result .= " - - "; + $result .= " + + "; + } return ($result); } @@ -388,8 +389,8 @@ class debconf

".$data['Topic']."

".$data['Description']." - - + + ";