aboutsummaryrefslogtreecommitdiff
path: root/mod/html5/views/default/input
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-12-29 20:45:58 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-12-29 20:45:58 -0200
commit97e689213ff4e829f251af526ed4e796a3cc2b71 (patch)
treeb04d03ec56305041216b72328fc9b5afde27bc76 /mod/html5/views/default/input
parent0ab6351abb7a602d96c62b0ad35413c88113a6cf (diff)
parent69e2d8c5d8732042c9319aef1fdea45a82b63e42 (diff)
downloadelgg-97e689213ff4e829f251af526ed4e796a3cc2b71.tar.gz
elgg-97e689213ff4e829f251af526ed4e796a3cc2b71.tar.bz2
Merge branch 'master' into saravea
Conflicts: .gitmodules mod/admins mod/assemblies mod/audio_html5 mod/beechat mod/crud mod/elgg-activitystreams mod/elggman mod/elggpg mod/favorites mod/federated-objects mod/friendly_time mod/group_alias mod/group_operators mod/languages mod/lightpics mod/openid_client mod/spotlight mod/suicide mod/tasks mod/videolist
Diffstat (limited to 'mod/html5/views/default/input')
-rw-r--r--mod/html5/views/default/input/color.php12
-rw-r--r--mod/html5/views/default/input/datetime-local.php14
-rw-r--r--mod/html5/views/default/input/datetime.php15
-rw-r--r--mod/html5/views/default/input/image.php11
-rw-r--r--mod/html5/views/default/input/month.php16
-rw-r--r--mod/html5/views/default/input/number.php11
-rw-r--r--mod/html5/views/default/input/option.php13
-rw-r--r--mod/html5/views/default/input/range.php13
-rw-r--r--mod/html5/views/default/input/search.php13
-rw-r--r--mod/html5/views/default/input/tel.php12
-rw-r--r--mod/html5/views/default/input/time.php13
-rw-r--r--mod/html5/views/default/input/week.php13
12 files changed, 156 insertions, 0 deletions
diff --git a/mod/html5/views/default/input/color.php b/mod/html5/views/default/input/color.php
new file mode 100644
index 000000000..be8154fc9
--- /dev/null
+++ b/mod/html5/views/default/input/color.php
@@ -0,0 +1,12 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-color',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'color';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/datetime-local.php b/mod/html5/views/default/input/datetime-local.php
new file mode 100644
index 000000000..468843901
--- /dev/null
+++ b/mod/html5/views/default/input/datetime-local.php
@@ -0,0 +1,14 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-datetime-local',
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']);
+}
+
+$vars['type'] = 'datetime-local';
+?>
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/datetime.php b/mod/html5/views/default/input/datetime.php
new file mode 100644
index 000000000..69e4bd7f7
--- /dev/null
+++ b/mod/html5/views/default/input/datetime.php
@@ -0,0 +1,15 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-datetime',
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("c", $vars['value']);
+}
+
+$vars['type'] = 'datetime';
+
+?>
+<input <?php echo elgg_format_attributes($vars); ?> />
diff --git a/mod/html5/views/default/input/image.php b/mod/html5/views/default/input/image.php
new file mode 100644
index 000000000..cf740f782
--- /dev/null
+++ b/mod/html5/views/default/input/image.php
@@ -0,0 +1,11 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-image',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'image';
+
+?>
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/month.php b/mod/html5/views/default/input/month.php
new file mode 100644
index 000000000..c99b3f34c
--- /dev/null
+++ b/mod/html5/views/default/input/month.php
@@ -0,0 +1,16 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-month',
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['value']) && is_int($vars['value'])) {
+ $vars['value'] = date("Y-m", $vars['value']);
+}
+
+$vars['type'] = 'month';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/number.php b/mod/html5/views/default/input/number.php
new file mode 100644
index 000000000..ec4938734
--- /dev/null
+++ b/mod/html5/views/default/input/number.php
@@ -0,0 +1,11 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-number',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'number';
+
+?>
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/option.php b/mod/html5/views/default/input/option.php
new file mode 100644
index 000000000..05d5d649f
--- /dev/null
+++ b/mod/html5/views/default/input/option.php
@@ -0,0 +1,13 @@
+<?php
+
+$text = $vars['text'];
+
+if (!isset($text)) {
+ $text = $vars['value'];
+ unset($vars['value']);
+}
+
+$text = htmlentities($text, ENT_QUOTES, 'UTF-8');
+$attributes = elgg_format_attributes($vars);
+
+echo "<option $attributes>$text</option>"; \ No newline at end of file
diff --git a/mod/html5/views/default/input/range.php b/mod/html5/views/default/input/range.php
new file mode 100644
index 000000000..235687257
--- /dev/null
+++ b/mod/html5/views/default/input/range.php
@@ -0,0 +1,13 @@
+<?php
+
+$defaults = array(
+ 'class' => 'elgg-input-range',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'range';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/search.php b/mod/html5/views/default/input/search.php
new file mode 100644
index 000000000..becf8a11b
--- /dev/null
+++ b/mod/html5/views/default/input/search.php
@@ -0,0 +1,13 @@
+<?php
+
+$defaults = array(
+ 'class' => 'elgg-input-search',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'search';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/tel.php b/mod/html5/views/default/input/tel.php
new file mode 100644
index 000000000..0704344a8
--- /dev/null
+++ b/mod/html5/views/default/input/tel.php
@@ -0,0 +1,12 @@
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-tel',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'tel';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/time.php b/mod/html5/views/default/input/time.php
new file mode 100644
index 000000000..6bb557266
--- /dev/null
+++ b/mod/html5/views/default/input/time.php
@@ -0,0 +1,13 @@
+<?php
+
+$defaults = array(
+ 'class' => 'elgg-input-time',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'time';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/html5/views/default/input/week.php b/mod/html5/views/default/input/week.php
new file mode 100644
index 000000000..3d09ba07f
--- /dev/null
+++ b/mod/html5/views/default/input/week.php
@@ -0,0 +1,13 @@
+<?php
+
+$defaults = array(
+ 'class' => 'elgg-input-week',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'week';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file