diff --git a/web/includes/functions.php b/web/includes/functions.php index ef91fa6f0..d7ffbc606 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -609,6 +609,27 @@ function truncText( $text, $length, $deslash=1 ) return( preg_replace( "/^(.{".$length.",}?)\b.*$/", "\\1…", ($deslash?stripslashes($text):$text) ) ); } +function htmlSelect( $name, $contents, $values, $behaviors=false ) { + + $behaviourText = ""; + if ( !empty($behaviours) ) { + if ( is_array($behaviours) ) { + foreach ( $behaviours as $event=>$action ) { + $behaviourText .= ' '.$event.'="'.$action.'"'; + } + } else { + $behaviourText = ' onchange="'.$behaviours.'"'; + } + } + $html = ""; + return $html; +} + function buildSelect( $name, $contents, $behaviours=false ) { $value = "";