diff options
Diffstat (limited to 'mod/html5/views/default/input')
| -rw-r--r-- | mod/html5/views/default/input/color.php | 12 | ||||
| -rw-r--r-- | mod/html5/views/default/input/datetime-local.php | 14 | ||||
| -rw-r--r-- | mod/html5/views/default/input/datetime.php | 15 | ||||
| -rw-r--r-- | mod/html5/views/default/input/image.php | 11 | ||||
| -rw-r--r-- | mod/html5/views/default/input/month.php | 16 | ||||
| -rw-r--r-- | mod/html5/views/default/input/number.php | 11 | ||||
| -rw-r--r-- | mod/html5/views/default/input/option.php | 13 | ||||
| -rw-r--r-- | mod/html5/views/default/input/range.php | 13 | ||||
| -rw-r--r-- | mod/html5/views/default/input/search.php | 13 | ||||
| -rw-r--r-- | mod/html5/views/default/input/tel.php | 12 | ||||
| -rw-r--r-- | mod/html5/views/default/input/time.php | 13 | ||||
| -rw-r--r-- | mod/html5/views/default/input/week.php | 13 | 
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 | 
