aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--documentation/css/preview/forms.php2
-rw-r--r--install/ElggInstaller.php2
-rw-r--r--mod/blog/views/default/forms/blog/save.php4
-rw-r--r--mod/blog/views/default/input/datetime.php2
-rw-r--r--mod/blog/views/default/widgets/blog/edit.php2
-rw-r--r--mod/embed/views/default/embed/upload/content.php4
-rw-r--r--mod/file/views/default/widgets/filerepo/edit.php2
-rw-r--r--mod/garbagecollector/views/default/settings/garbagecollector/edit.php2
-rw-r--r--mod/groups/views/default/forms/discussion/save.php2
-rw-r--r--mod/groups/views/default/settings/groups/edit.php2
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/edit.php2
-rw-r--r--mod/logrotate/views/default/settings/logrotate/edit.php2
-rw-r--r--mod/messages/views/default/forms/messages/send.php2
-rw-r--r--mod/pages/views/default/widgets/pages/edit.php2
-rw-r--r--mod/reportedcontent/views/default/widgets/reportedcontent/edit.php2
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfrontsimple.php2
-rw-r--r--mod/tagcloud/views/default/widgets/tagcloud/edit.php2
-rw-r--r--mod/twitterservice/views/default/settings/twitterservice/edit.php2
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php2
-rw-r--r--views/default/admin/plugins/advanced.php4
-rw-r--r--views/default/admin/site/advanced.php2
-rw-r--r--views/default/admin/site/basic.php2
-rw-r--r--views/default/core/river/filter.php2
-rw-r--r--views/default/core/settings/account/language.php2
-rw-r--r--views/default/css/admin.php2
-rw-r--r--views/default/forms/admin/menu/save.php2
-rw-r--r--views/default/input/access.php2
-rw-r--r--views/default/input/dropdown.php58
-rw-r--r--views/default/input/pulldown.php54
-rw-r--r--views/default/output/dropdown.php13
-rw-r--r--views/default/output/pulldown.php3
-rw-r--r--views/default/widgets/content_stats/edit.php2
-rw-r--r--views/default/widgets/friends/edit.php4
-rw-r--r--views/default/widgets/new_users/edit.php2
-rw-r--r--views/default/widgets/online_users/edit.php2
-rw-r--r--views/installation/input/access.php2
-rw-r--r--views/installation/input/dropdown.php (renamed from views/installation/input/pulldown.php)6
37 files changed, 115 insertions, 91 deletions
diff --git a/documentation/css/preview/forms.php b/documentation/css/preview/forms.php
index d3a3e7647..8dd028dc5 100644
--- a/documentation/css/preview/forms.php
+++ b/documentation/css/preview/forms.php
@@ -54,7 +54,7 @@ require dirname(__FILE__) . '/head.php';
</p>
<p>
<label for="f5">Dropdown input:</label><br />
- <?php echo elgg_view('input/pulldown', array(
+ <?php echo elgg_view('input/dropdown', array(
'internalname' => 'f5',
'internalid' => 'f5',
'options' => array('option 1', 'option 2'),
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index ff19c8676..9fcb15a42 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -383,7 +383,7 @@ class ElggInstaller {
'required' => TRUE,
),
'language' => array(
- 'type' => 'pulldown',
+ 'type' => 'dropdown',
'value' => 'en',
'options_values' => $languages,
'required' => TRUE,
diff --git a/mod/blog/views/default/forms/blog/save.php b/mod/blog/views/default/forms/blog/save.php
index 9d6265a2a..14e95ac48 100644
--- a/mod/blog/views/default/forms/blog/save.php
+++ b/mod/blog/views/default/forms/blog/save.php
@@ -55,7 +55,7 @@ if ($vars['publish_date']) {
}
$status_label = elgg_echo('blog:status');
-$status_input = elgg_view('input/pulldown', array(
+$status_input = elgg_view('input/dropdown', array(
'internalname' => 'status',
'internalid' => 'blog_status',
'value' => $vars['status'],
@@ -66,7 +66,7 @@ $status_input = elgg_view('input/pulldown', array(
));
$comments_label = elgg_echo('comments');
-$comments_input = elgg_view('input/pulldown', array(
+$comments_input = elgg_view('input/dropdown', array(
'internalname' => 'comments_on',
'internalid' => 'blog_comments_on',
'value' => $vars['comments_on'],
diff --git a/mod/blog/views/default/input/datetime.php b/mod/blog/views/default/input/datetime.php
index f4bad188c..7933c7bd7 100644
--- a/mod/blog/views/default/input/datetime.php
+++ b/mod/blog/views/default/input/datetime.php
@@ -14,7 +14,7 @@ for ($i=1; $i <= 12; $i++) {
$months[$value] = date('M', strtotime("$value/01/2010"));
}
-$month = elgg_view('input/pulldown', array(
+$month = elgg_view('input/dropdown', array(
'internalname' => 'publish_month',
'value' => date('m', $publish_date),
'options_values' => $months,
diff --git a/mod/blog/views/default/widgets/blog/edit.php b/mod/blog/views/default/widgets/blog/edit.php
index fbf86833f..fa2dac9aa 100644
--- a/mod/blog/views/default/widgets/blog/edit.php
+++ b/mod/blog/views/default/widgets/blog/edit.php
@@ -13,7 +13,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/mod/embed/views/default/embed/upload/content.php b/mod/embed/views/default/embed/upload/content.php
index c0b7afb11..bac8e1393 100644
--- a/mod/embed/views/default/embed/upload/content.php
+++ b/mod/embed/views/default/embed/upload/content.php
@@ -12,7 +12,7 @@ if ($upload_sections) {
$options[$id] = $info['name'];
}
- $input = elgg_view('input/pulldown', array(
+ $input = elgg_view('input/dropdown', array(
'name' => 'download_section',
'options_values' => $options,
'internalid' => 'embed_upload',
@@ -32,7 +32,7 @@ if ($upload_sections) {
<script type="text/javascript">
$(document).ready(function() {
- // change for pulldown
+ // change for dropdown
$('#embed_upload').change(function() {
var upload_section = $(this).val();
var url = '<?php echo elgg_get_site_url(); ?>pg/embed/embed?active_section=upload&active_upload_section=' + upload_section;
diff --git a/mod/file/views/default/widgets/filerepo/edit.php b/mod/file/views/default/widgets/filerepo/edit.php
index 695d16afc..7da7e9401 100644
--- a/mod/file/views/default/widgets/filerepo/edit.php
+++ b/mod/file/views/default/widgets/filerepo/edit.php
@@ -16,7 +16,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php b/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
index e05b5d778..e736f9f9f 100644
--- a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
+++ b/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
@@ -15,7 +15,7 @@ if (!$period) {
<?php echo elgg_echo('garbagecollector:period'); ?>
<?php
- echo elgg_view('input/pulldown', array(
+ echo elgg_view('input/dropdown', array(
'internalname' => 'params[period]',
'options_values' => array(
'weekly' => elgg_echo('garbagecollector:weekly'),
diff --git a/mod/groups/views/default/forms/discussion/save.php b/mod/groups/views/default/forms/discussion/save.php
index 39f273f3e..418a7532f 100644
--- a/mod/groups/views/default/forms/discussion/save.php
+++ b/mod/groups/views/default/forms/discussion/save.php
@@ -28,7 +28,7 @@ $guid = elgg_get_array_value('guid', $vars, null);
<p>
<label><?php echo elgg_echo("groups:topicstatus"); ?></label><br />
<?php
- echo elgg_view('input/pulldown', array(
+ echo elgg_view('input/dropdown', array(
'internalname' => 'status',
'value' => $status,
'options_values' => array(
diff --git a/mod/groups/views/default/settings/groups/edit.php b/mod/groups/views/default/settings/groups/edit.php
index 25feed3aa..362d355af 100644
--- a/mod/groups/views/default/settings/groups/edit.php
+++ b/mod/groups/views/default/settings/groups/edit.php
@@ -11,7 +11,7 @@ if (!isset($vars['entity']->hidden_groups)) {
echo '<p>';
echo elgg_echo('groups:allowhiddengroups');
echo ' ';
-echo elgg_view('input/pulldown', array(
+echo elgg_view('input/dropdown', array(
'internalname' => 'params[hidden_groups]',
'options_values' => array(
'no' => elgg_echo('option:no'),
diff --git a/mod/groups/views/default/widgets/a_users_groups/edit.php b/mod/groups/views/default/widgets/a_users_groups/edit.php
index 7465f4b70..c7391620e 100644
--- a/mod/groups/views/default/widgets/a_users_groups/edit.php
+++ b/mod/groups/views/default/widgets/a_users_groups/edit.php
@@ -16,7 +16,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/mod/logrotate/views/default/settings/logrotate/edit.php b/mod/logrotate/views/default/settings/logrotate/edit.php
index db439eaa0..8a2dabba6 100644
--- a/mod/logrotate/views/default/settings/logrotate/edit.php
+++ b/mod/logrotate/views/default/settings/logrotate/edit.php
@@ -15,7 +15,7 @@ if (!$period) {
<?php echo elgg_echo('logrotate:period'); ?>
<?php
- echo elgg_view('input/pulldown', array(
+ echo elgg_view('input/dropdown', array(
'internalname' => 'params[period]',
'options_values' => array(
'weekly' => elgg_echo('logrotate:weekly'),
diff --git a/mod/messages/views/default/forms/messages/send.php b/mod/messages/views/default/forms/messages/send.php
index 0a251091b..214ff23f9 100644
--- a/mod/messages/views/default/forms/messages/send.php
+++ b/mod/messages/views/default/forms/messages/send.php
@@ -15,7 +15,7 @@ foreach ($vars['friends'] as $friend) {
$recipients_options[$friend->guid] = $friend->name;
}
-$recipient_drop_down = elgg_view('input/pulldown', array(
+$recipient_drop_down = elgg_view('input/dropdown', array(
'internalname' => 'recipient_guid',
'value' => $recipient_guid,
'options_values' => $recipients_options,
diff --git a/mod/pages/views/default/widgets/pages/edit.php b/mod/pages/views/default/widgets/pages/edit.php
index 7e76e69d5..a67f76ab0 100644
--- a/mod/pages/views/default/widgets/pages/edit.php
+++ b/mod/pages/views/default/widgets/pages/edit.php
@@ -15,7 +15,7 @@ $params = array(
'value' => $vars['entity']->pages_num,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php b/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php
index e47cf9740..e247a9299 100644
--- a/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php
+++ b/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php
@@ -13,7 +13,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php b/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
index e750ee69f..c01c13f23 100644
--- a/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
+++ b/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
@@ -51,7 +51,7 @@ $welcome_intro = elgg_echo('sitepages:welcomeintro');
$sidebar_intro = elgg_echo('sitepages:sidebarintro');
$ownfrontpage_message = elgg_echo('sitepages:ownfront');
-$ownfrontpage = elgg_view('input/pulldown', array(
+$ownfrontpage = elgg_view('input/dropdown', array(
'internalname' => 'params[ownfrontpage]',
'value' => isset($vars['entity']->ownfrontpage) ? $vars['entity']->ownfrontpage : 'no',
'options_values' => array(
diff --git a/mod/tagcloud/views/default/widgets/tagcloud/edit.php b/mod/tagcloud/views/default/widgets/tagcloud/edit.php
index 449266f13..b3b0f43ef 100644
--- a/mod/tagcloud/views/default/widgets/tagcloud/edit.php
+++ b/mod/tagcloud/views/default/widgets/tagcloud/edit.php
@@ -6,7 +6,7 @@
echo elgg_echo('tagcloud:widget:numtags');
- echo elgg_view('input/pulldown', array(
+ echo elgg_view('input/dropdown', array(
'internalname' => 'params[num_items]',
'options_values' => array( '10' => '10',
'20' => '20',
diff --git a/mod/twitterservice/views/default/settings/twitterservice/edit.php b/mod/twitterservice/views/default/settings/twitterservice/edit.php
index 01897db23..93de0d993 100644
--- a/mod/twitterservice/views/default/settings/twitterservice/edit.php
+++ b/mod/twitterservice/views/default/settings/twitterservice/edit.php
@@ -19,7 +19,7 @@ $consumer_secret_view = elgg_view('input/text', array(
));
$sign_on_with_twitter_string = elgg_echo('twitterservice:login');
-$sign_on_with_twitter_view = elgg_view('input/pulldown', array(
+$sign_on_with_twitter_view = elgg_view('input/dropdown', array(
'internalname' => 'params[sign_on]',
'options_values' => array(
'yes' => elgg_echo('option:yes'),
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index 88cc88a7e..6a541f88e 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -48,7 +48,7 @@ if ($users) {
return;
}
-$form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view('input/pulldown', array(
+$form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view('input/dropdown', array(
'internalname' => 'action_type',
'options_values' => array(
'validate' => elgg_echo('uservalidationbyemail:admin:validate'),
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php
index 1c01b2708..0815739f5 100644
--- a/views/default/admin/plugins/advanced.php
+++ b/views/default/admin/plugins/advanced.php
@@ -43,7 +43,7 @@ $ts = time();
$token = generate_action_token($ts);
$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories);
-$category_pulldown = elgg_view('input/pulldown', array(
+$category_dropdown = elgg_view('input/dropdown', array(
'internalname' => 'category',
'options_values' => $categories,
'value' => $show_category
@@ -55,7 +55,7 @@ $category_button = elgg_view('input/submit', array(
));
$category_form = elgg_view('input/form', array(
- 'body' => $category_pulldown . $category_button
+ 'body' => $category_dropdown . $category_button
));
// @todo Until "en/deactivate all" means "All plugins on this page" hide when not looking at all.
diff --git a/views/default/admin/site/advanced.php b/views/default/admin/site/advanced.php
index 49c5de6ac..d3daf0c8e 100644
--- a/views/default/admin/site/advanced.php
+++ b/views/default/admin/site/advanced.php
@@ -49,7 +49,7 @@ $form_body .= elgg_view("input/checkboxes", array(
$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
$form_body .= "<p>" . elgg_echo('installation:debug');
-$form_body .= elgg_view('input/pulldown', array(
+$form_body .= elgg_view('input/dropdown', array(
'options_values' => $debug_options,
'internalname' => 'debug',
'value' => elgg_get_config('debug'),
diff --git a/views/default/admin/site/basic.php b/views/default/admin/site/basic.php
index 2c50cf89f..4adef7e45 100644
--- a/views/default/admin/site/basic.php
+++ b/views/default/admin/site/basic.php
@@ -24,7 +24,7 @@ foreach (array('sitename','sitedescription', 'siteemail') as $field) {
$languages = get_installed_translations();
$form_body .= "<p>" . elgg_echo('installation:language');
-$form_body .= elgg_view("input/pulldown", array(
+$form_body .= elgg_view("input/dropdown", array(
'internalname' => 'language',
'value' => elgg_get_config('language'),
'options_values' => $languages,
diff --git a/views/default/core/river/filter.php b/views/default/core/river/filter.php
index 08e211d44..94956a0fb 100644
--- a/views/default/core/river/filter.php
+++ b/views/default/core/river/filter.php
@@ -31,7 +31,7 @@ $selector = $vars['selector'];
if ($selector) {
$params['value'] = $selector;
}
-echo elgg_view('input/pulldown', $params);
+echo elgg_view('input/dropdown', $params);
?>
<script type="text/javascript">
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php
index 3391a3733..15d6ebea5 100644
--- a/views/default/core/settings/account/language.php
+++ b/views/default/core/settings/account/language.php
@@ -18,7 +18,7 @@ if ($user) {
<p>
<?php echo elgg_echo('user:language:label'); ?>:
<?php
- echo elgg_view("input/pulldown", array(
+ echo elgg_view("input/dropdown", array(
'internalname' => 'language',
'value' => $value,
'options_values' => get_installed_translations()
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index 4aa1b5b52..f8806ff35 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -968,7 +968,7 @@ ul.admin_plugins {
.configure_menuitems {
margin-bottom:30px;
}
-.admin_settings.menuitems .input-pulldown {
+.admin_settings.menuitems .input-dropdown {
margin-right:15px;
margin-bottom:10px;
}
diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php
index 6c9cd9bd5..e5f66f53e 100644
--- a/views/default/forms/admin/menu/save.php
+++ b/views/default/forms/admin/menu/save.php
@@ -37,7 +37,7 @@ for ($i=0; $i<6; $i++) {
$current_value = '';
}
- echo elgg_view('input/pulldown', array(
+ echo elgg_view('input/dropdown', array(
'options_values' => $dropdown_values,
'internalname' => 'featured_menu_names[]',
'value' => $current_value
diff --git a/views/default/input/access.php b/views/default/input/access.php
index 56123d49a..da7853b8b 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -1,7 +1,7 @@
<?php
/**
* Elgg access level input
- * Displays a pulldown input field
+ * Displays a dropdown input field
*
* @package Elgg
* @subpackage Core
diff --git a/views/default/input/dropdown.php b/views/default/input/dropdown.php
new file mode 100644
index 000000000..b4d38fb00
--- /dev/null
+++ b/views/default/input/dropdown.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Elgg dropdown input
+ * Displays a dropdown (select) input field
+ *
+ * NB: Default values of FALSE or NULL will match '' (empty string) and not 0.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the select tag
+ * @uses $vars['internalname'] The name of the select field
+ * @uses $vars['options'] An array of strings representing the options for the dropdown field
+ * @uses $vars['options_values'] An associative array of "value" => "option"
+ * where "value" is an internal name and "option" is
+ * the value displayed on the button. Replaces
+ * $vars['options'] when defined.
+ */
+
+$class = $vars['class'];
+if (!$class) {
+ $class = "elgg-input-dropdown";
+}
+
+if (!isset($vars['value'])) {
+ $vars['value'] = elgg_get_sticky_value($vars['internalname']);
+}
+
+?>
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
+
+if ($vars['options_values']) {
+ foreach($vars['options_values'] as $value => $option) {
+
+ $encoded_value = htmlentities($value, ENT_QUOTES, 'UTF-8');
+ $encoded_option = htmlentities($option, ENT_QUOTES, 'UTF-8');
+
+ if ((string)$value == (string)$vars['value']) {
+ echo "<option value=\"$encoded_value\" selected=\"selected\">$encoded_option</option>";
+ } else {
+ echo "<option value=\"$encoded_value\">$encoded_option</option>";
+ }
+ }
+} else {
+ foreach($vars['options'] as $option) {
+ $encoded_option = htmlentities($option, ENT_QUOTES, 'UTF-8');
+
+ if ((string)$option == (string)$vars['value']) {
+ echo "<option selected=\"selected\">$encoded_option</option>";
+ } else {
+ echo "<option>$encoded_option</option>";
+ }
+ }
+}
+?>
+</select>
diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php
index 25e3e3c37..994de5297 100644
--- a/views/default/input/pulldown.php
+++ b/views/default/input/pulldown.php
@@ -1,56 +1,8 @@
<?php
/**
- * Elgg pulldown input
- * Displays a pulldown input field
+ * Deprecated pulldown input view - use 'input/dropdown' instead.
*
- * NB: Default values of FALSE or NULL will match '' (empty string) and not 0.
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the pulldown field
- * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
- * the value displayed on the button. Replaces $vars['options'] when defined.
+ * @deprecated 1.8
*/
-$class = $vars['class'];
-if (!$class) {
- $class = "elgg-input-dropdown";
-}
-
-if (!isset($vars['value'])) {
- $vars['value'] = elgg_get_sticky_value($vars['internalname']);
-}
-
-?>
-<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
-
-if ($vars['options_values']) {
- foreach($vars['options_values'] as $value => $option) {
-
- $encoded_value = htmlentities($value, ENT_QUOTES, 'UTF-8');
- $encoded_option = htmlentities($option, ENT_QUOTES, 'UTF-8');
-
- if ((string)$value == (string)$vars['value']) {
- echo "<option value=\"$encoded_value\" selected=\"selected\">$encoded_option</option>";
- } else {
- echo "<option value=\"$encoded_value\">$encoded_option</option>";
- }
- }
-} else {
- foreach($vars['options'] as $option) {
- $encoded_option = htmlentities($option, ENT_QUOTES, 'UTF-8');
-
- if ((string)$option == (string)$vars['value']) {
- echo "<option selected=\"selected\">$encoded_option</option>";
- } else {
- echo "<option>$encoded_option</option>";
- }
- }
-}
-?>
-</select> \ No newline at end of file
+echo elgg_view('input/dropdown', $vars);
diff --git a/views/default/output/dropdown.php b/views/default/output/dropdown.php
new file mode 100644
index 000000000..691382734
--- /dev/null
+++ b/views/default/output/dropdown.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Elgg dropdown display
+ * Displays a value that was entered into the system via a dropdown
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
diff --git a/views/default/output/pulldown.php b/views/default/output/pulldown.php
index c597eb5c9..2d5468409 100644
--- a/views/default/output/pulldown.php
+++ b/views/default/output/pulldown.php
@@ -8,6 +8,7 @@
*
* @uses $vars['text'] The text to display
*
+ * @deprecated 1.8
*/
-echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value']; \ No newline at end of file
+echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8'); \ No newline at end of file
diff --git a/views/default/widgets/content_stats/edit.php b/views/default/widgets/content_stats/edit.php
index 681a96d48..d0746a534 100644
--- a/views/default/widgets/content_stats/edit.php
+++ b/views/default/widgets/content_stats/edit.php
@@ -14,7 +14,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(5, 8, 10, 12, 15, 20),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/views/default/widgets/friends/edit.php b/views/default/widgets/friends/edit.php
index d36ebcdb8..025f5f98b 100644
--- a/views/default/widgets/friends/edit.php
+++ b/views/default/widgets/friends/edit.php
@@ -14,7 +14,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100),
);
-$display_dropdown = elgg_view('input/pulldown', $params);
+$display_dropdown = elgg_view('input/dropdown', $params);
// handle upgrade to 1.7.2 from previous versions
@@ -37,7 +37,7 @@ $params = array(
'tiny' => elgg_echo('friends:tiny'),
),
);
-$size_dropdown = elgg_view('input/pulldown', $params);
+$size_dropdown = elgg_view('input/dropdown', $params);
?>
diff --git a/views/default/widgets/new_users/edit.php b/views/default/widgets/new_users/edit.php
index 78c8941ad..e951264bf 100644
--- a/views/default/widgets/new_users/edit.php
+++ b/views/default/widgets/new_users/edit.php
@@ -14,7 +14,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(5, 8, 10, 12, 15, 20),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/views/default/widgets/online_users/edit.php b/views/default/widgets/online_users/edit.php
index 192e901ba..dfbe6ecd6 100644
--- a/views/default/widgets/online_users/edit.php
+++ b/views/default/widgets/online_users/edit.php
@@ -13,7 +13,7 @@ $params = array(
'value' => $vars['entity']->num_display,
'options' => array(5, 8, 10, 12, 15, 20),
);
-$dropdown = elgg_view('input/pulldown', $params);
+$dropdown = elgg_view('input/dropdown', $params);
?>
<p>
diff --git a/views/installation/input/access.php b/views/installation/input/access.php
index 3accdaf0c..ab4064ef1 100644
--- a/views/installation/input/access.php
+++ b/views/installation/input/access.php
@@ -1,7 +1,7 @@
<?php
/**
* Elgg access level input
- * Displays a pulldown input field
+ * Displays a dropdown input field
*
* @package Elgg
* @subpackage Core
diff --git a/views/installation/input/pulldown.php b/views/installation/input/dropdown.php
index 2f4ff1631..11802a669 100644
--- a/views/installation/input/pulldown.php
+++ b/views/installation/input/dropdown.php
@@ -1,7 +1,7 @@
<?php
/**
- * Elgg pulldown input
- * Displays a pulldown input field
+ * Elgg dropdown input
+ * Displays a dropdown input field
*
* @package Elgg
* @subpackage Core
@@ -9,7 +9,7 @@
* @uses $vars['value'] The current value, if any
* @uses $vars['js'] Any Javascript to enter into the input tag
* @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the pulldown field
+ * @uses $vars['options'] An array of strings representing the options for the dropdown field
* @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
* the value displayed on the button. Replaces $vars['options'] when defined.
*/