aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-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
16 files changed, 90 insertions, 66 deletions
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>