aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/file.php')
-rw-r--r--views/default/input/file.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/views/default/input/file.php b/views/default/input/file.php
new file mode 100644
index 000000000..452fe72b9
--- /dev/null
+++ b/views/default/input/file.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Elgg file input
+ * Displays a file input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value if any
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (!empty($vars['value'])) {
+ echo elgg_echo('fileexists') . "<br />";
+}
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-file {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-file";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'size' => 30,
+);
+
+$attrs = array_merge($defaults, $vars);
+
+?>
+<input type="file" <?php echo elgg_format_attributes($attrs); ?> />