From f5f3f205e97c2a3219897dd14de7d57659ce1181 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 2 Jul 2011 09:21:30 -0400 Subject: Fixes #3624 input views use class extending rather than overriding --- views/default/input/autocomplete.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'views/default/input/autocomplete.php') diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php index 0a4057ddf..421541e24 100644 --- a/views/default/input/autocomplete.php +++ b/views/default/input/autocomplete.php @@ -7,20 +7,25 @@ * * @todo This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page. * - * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype) + * @uses $vars['value'] Current value for the text input + * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype) * @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user. - * + * @uses $vars['class'] Additional CSS class */ +if (isset($vars['class'])) { + $vars['class'] = "elgg-input-autocomplete {$vars['class']}"; +} else { + $vars['class'] = "elgg-input-autocomplete"; +} + $defaults = array( - 'class' => '', 'value' => '', + 'disabled' => false, ); $vars = array_merge($defaults, $vars); -$vars['class'] = trim("elgg-input-autocomplete {$vars['class']}"); - $ac_url_params = http_build_query(array( 'match_on' => $vars['match_on'], 'match_owner' => $vars['match_owner'], @@ -38,4 +43,3 @@ elgg.provide('elgg.autocomplete'); elgg.autocomplete.url = ""; /> - -- cgit v1.2.3