aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/input/button.php9
-rw-r--r--views/default/input/checkbox.php9
-rw-r--r--views/default/input/color.php9
-rw-r--r--views/default/input/date.php9
-rw-r--r--views/default/input/datetime-local.php9
-rw-r--r--views/default/input/datetime.php9
-rw-r--r--views/default/input/default.php71
-rw-r--r--views/default/input/email.php9
-rw-r--r--views/default/input/file.php10
-rw-r--r--views/default/input/hidden.php9
-rw-r--r--views/default/input/image.php9
-rw-r--r--views/default/input/month.php9
-rw-r--r--views/default/input/number.php9
-rw-r--r--views/default/input/password.php9
-rw-r--r--views/default/input/radio.php9
-rw-r--r--views/default/input/range.php9
-rw-r--r--views/default/input/reset.php9
-rw-r--r--views/default/input/search.php9
-rw-r--r--views/default/input/submit.php9
-rw-r--r--views/default/input/tel.php9
-rw-r--r--views/default/input/text.php9
-rw-r--r--views/default/input/time.php9
-rw-r--r--views/default/input/url.php9
-rw-r--r--views/default/input/week.php9
24 files changed, 279 insertions, 0 deletions
diff --git a/views/default/input/button.php b/views/default/input/button.php
new file mode 100644
index 000000000..6fc1fb762
--- /dev/null
+++ b/views/default/input/button.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'button',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php
new file mode 100644
index 000000000..ff9a4b433
--- /dev/null
+++ b/views/default/input/checkbox.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'checkbox',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/color.php b/views/default/input/color.php
new file mode 100644
index 000000000..fa8dc7497
--- /dev/null
+++ b/views/default/input/color.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'color',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/date.php b/views/default/input/date.php
new file mode 100644
index 000000000..08195afcf
--- /dev/null
+++ b/views/default/input/date.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'date',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php
new file mode 100644
index 000000000..e3f7e1915
--- /dev/null
+++ b/views/default/input/datetime-local.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'datetime-local',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php
new file mode 100644
index 000000000..8cc9d9087
--- /dev/null
+++ b/views/default/input/datetime.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'datetime',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/default.php b/views/default/input/default.php
new file mode 100644
index 000000000..59ad357e7
--- /dev/null
+++ b/views/default/input/default.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Create an input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['internalid'] The id of the input field
+ * @deprecated $vars['js'] Use named attributes instead
+ *
+ * All other input attributes can be specified using their attribute name
+ * including javascript event attributes such as onclick.
+ */
+
+// remove all the junk that elgg_view throws into $vars
+
+unset($vars['config']);
+unset($vars['url']);
+unset($vars['page_owner']);
+unset($vars['page_owner_user']);
+foreach ($_SESSION as $key=>$value) {
+ unset($vars[$key]);
+}
+
+// backwards compatibility code
+if (isset($vars['internalname'])) {
+ $vars['name'] = $vars['internalname'];
+ unset($vars['internalname']);
+}
+
+if (isset($vars['internalid'])) {
+ $vars['id'] = $vars['internalid'];
+ unset($vars['internalid']);
+}
+
+$js = '';
+if (isset($vars['js'])) {
+ $js = $vars['js'];
+ unset($vars['js']);
+}
+
+// default attributes
+$defaults = array(
+ 'type' => 'text',
+ 'value' => '',
+);
+
+$attributes = array_merge($defaults, $vars);
+
+$attributes['value'] = htmlspecialchars($attributes['value'], ENT_QUOTES, 'UTF-8');
+
+
+//Build the input
+$element = array();
+
+$element[] = "<input";
+foreach ($attributes as $attr => $val) {
+ if ($val === TRUE) {
+ $element[] = $attr;
+ } elseif ($val !== FALSE) {
+ $val = addslashes($val);
+ $element[] = "$attr=\"$val\"";
+ }
+}
+$element[] = $js;
+$element[] = "/>";
+
+echo implode(" ", $tag); \ No newline at end of file
diff --git a/views/default/input/email.php b/views/default/input/email.php
new file mode 100644
index 000000000..2b1dcfe7b
--- /dev/null
+++ b/views/default/input/email.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'email',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/file.php b/views/default/input/file.php
new file mode 100644
index 000000000..4fdc24947
--- /dev/null
+++ b/views/default/input/file.php
@@ -0,0 +1,10 @@
+<?php
+
+$overrides = array(
+ 'type' => 'file',
+ 'value' => FALSE,
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php
new file mode 100644
index 000000000..422d6449a
--- /dev/null
+++ b/views/default/input/hidden.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'hidden',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/image.php b/views/default/input/image.php
new file mode 100644
index 000000000..8b0a6728d
--- /dev/null
+++ b/views/default/input/image.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'image',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/month.php b/views/default/input/month.php
new file mode 100644
index 000000000..cad6562a9
--- /dev/null
+++ b/views/default/input/month.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'month',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/number.php b/views/default/input/number.php
new file mode 100644
index 000000000..0944f8034
--- /dev/null
+++ b/views/default/input/number.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'number',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/password.php b/views/default/input/password.php
new file mode 100644
index 000000000..21ed2bea0
--- /dev/null
+++ b/views/default/input/password.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'password',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
new file mode 100644
index 000000000..bce969b07
--- /dev/null
+++ b/views/default/input/radio.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'radio',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/range.php b/views/default/input/range.php
new file mode 100644
index 000000000..3c93d49c2
--- /dev/null
+++ b/views/default/input/range.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'range',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/reset.php b/views/default/input/reset.php
new file mode 100644
index 000000000..eb92982c6
--- /dev/null
+++ b/views/default/input/reset.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'reset',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/search.php b/views/default/input/search.php
new file mode 100644
index 000000000..33fa4d4ff
--- /dev/null
+++ b/views/default/input/search.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'search',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/submit.php b/views/default/input/submit.php
new file mode 100644
index 000000000..32ffb8087
--- /dev/null
+++ b/views/default/input/submit.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'submit',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/tel.php b/views/default/input/tel.php
new file mode 100644
index 000000000..973bb9311
--- /dev/null
+++ b/views/default/input/tel.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'tel',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/text.php b/views/default/input/text.php
new file mode 100644
index 000000000..b952108f4
--- /dev/null
+++ b/views/default/input/text.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'text',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/time.php b/views/default/input/time.php
new file mode 100644
index 000000000..c6b1c458b
--- /dev/null
+++ b/views/default/input/time.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'time',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/url.php b/views/default/input/url.php
new file mode 100644
index 000000000..5068da207
--- /dev/null
+++ b/views/default/input/url.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'url',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file
diff --git a/views/default/input/week.php b/views/default/input/week.php
new file mode 100644
index 000000000..d34758eca
--- /dev/null
+++ b/views/default/input/week.php
@@ -0,0 +1,9 @@
+<?php
+
+$overrides = array(
+ 'type' => 'week',
+);
+
+$args = array_merge($vars, $overrides);
+
+echo elgg_view('input/default', $args); \ No newline at end of file