diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
commit | dccc333c765bb28da55b4a55d9c916acdb88413a (patch) | |
tree | bdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /views/default/input/autocomplete.php | |
parent | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff) | |
parent | 003cb81c7888f4d2fd763e5814027c6f8d71186f (diff) | |
download | elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2 |
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'views/default/input/autocomplete.php')
-rw-r--r-- | views/default/input/autocomplete.php | 16 |
1 files changed, 10 insertions, 6 deletions
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 = "<?php echo elgg_get_site_url() . 'livesearch?' . $ac_url_params; ?>"; </script> <input type="text" <?php echo elgg_format_attributes($vars); ?> /> - |