aboutsummaryrefslogtreecommitdiff
path: root/views/installation/input/checkbox.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-15 19:38:49 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-15 19:38:49 +0000
commit77897d4efad074d9434a97a67052bc788c315dee (patch)
tree1bcce8494ca5840393ecf4c849e0efc34e575707 /views/installation/input/checkbox.php
parentb7ea2e2e377568a3730ed46b8df1751cc747323f (diff)
downloadelgg-77897d4efad074d9434a97a67052bc788c315dee.tar.gz
elgg-77897d4efad074d9434a97a67052bc788c315dee.tar.bz2
Refs #3453 an implementation of creating the data directory. This capability is turned off due to security concerns.
git-svn-id: http://code.elgg.org/elgg/trunk@9088 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/installation/input/checkbox.php')
-rw-r--r--views/installation/input/checkbox.php37
1 files changed, 17 insertions, 20 deletions
diff --git a/views/installation/input/checkbox.php b/views/installation/input/checkbox.php
index 898fe8458..378eae6fd 100644
--- a/views/installation/input/checkbox.php
+++ b/views/installation/input/checkbox.php
@@ -2,32 +2,29 @@
/**
* Elgg checkbox input
* Displays a checkbox input tag
- *
- * @package Elgg
- * @subpackage Core
*
- *
- * Pass input tag attributes as key value pairs. For a list of allowable
- * attributes, see http://www.w3schools.com/tags/tag_input.asp
- *
- * @uses mixed $vars['default'] The default value to submit if not checked.
- * Optional, defaults to 0. Set to false for no default.
+ * @uses $var['name']
+ * @uses $vars['value']
+ * @uses $vars['id']
+ * @uses $vars['class']
*/
-$defaults = array(
- 'class' => 'elgg-input-checkbox',
- 'default' => 0,
-);
-
-$vars = array_merge($defaults, $vars);
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+} else {
+ $id = '';
+}
-$default = $vars['default'];
-unset($vars['default']);
+if (isset($vars['class'])) {
+ $id = "class=\"{$vars['class']}\"";
+} else {
+ $id = '';
+}
-if (isset($vars['name']) && $default !== false) {
- echo "<input type=\"hidden\" name=\"{$vars['name']}\" value=\"$default\"/>";
+if (!isset($vars['value'])) {
+ $vars['value'] = $vars['name'];
}
?>
-<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input type="checkbox" <?php echo $id; ?> <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" /> \ No newline at end of file