aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2011-05-19 15:59:07 -0700
committerEvan Winslow <evan@elgg.org>2011-05-19 15:59:07 -0700
commit1b1908d4c05392d07b0a0af086a567cbc53606ba (patch)
treed2a484e8a84dd5cb863f1d56ad43fc3f9e7ba3c3 /views
parentba3410e1ed5b8a23214b14f0fd0ce8c55c35391d (diff)
downloadelgg-1b1908d4c05392d07b0a0af086a567cbc53606ba.tar.gz
elgg-1b1908d4c05392d07b0a0af086a567cbc53606ba.tar.bz2
Cleaned up all the input views
Diffstat (limited to 'views')
-rw-r--r--views/default/input/color.php13
-rw-r--r--views/default/input/datetime-local.php10
-rw-r--r--views/default/input/datetime.php11
-rw-r--r--views/default/input/email.php13
-rw-r--r--views/default/input/image.php12
-rw-r--r--views/default/input/month.php11
-rw-r--r--views/default/input/number.php12
-rw-r--r--views/default/input/range.php7
-rw-r--r--views/default/input/search.php7
-rw-r--r--views/default/input/tel.php7
-rw-r--r--views/default/input/time.php7
-rw-r--r--views/default/input/url.php7
-rw-r--r--views/default/input/week.php9
13 files changed, 106 insertions, 20 deletions
diff --git a/views/default/input/color.php b/views/default/input/color.php
index 8bc4ad2a3..be8154fc9 100644
--- a/views/default/input/color.php
+++ b/views/default/input/color.php
@@ -1 +1,12 @@
-<input type="color" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<?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/views/default/input/datetime-local.php b/views/default/input/datetime-local.php
index 52902f543..468843901 100644
--- a/views/default/input/datetime-local.php
+++ b/views/default/input/datetime-local.php
@@ -1,6 +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 type="datetime-local" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php
index 61262f234..69e4bd7f7 100644
--- a/views/default/input/datetime.php
+++ b/views/default/input/datetime.php
@@ -1,6 +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 type="datetime" <?php echo elgg_format_attributes($vars); ?> />
+<input <?php echo elgg_format_attributes($vars); ?> />
diff --git a/views/default/input/email.php b/views/default/input/email.php
index 15e36f145..de98d9c4f 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -1 +1,12 @@
-<input type="email" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<?php
+$defaults = array(
+ 'class' => 'elgg-input-email',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'email';
+
+?>
+
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/image.php b/views/default/input/image.php
index bb6a44045..cf740f782 100644
--- a/views/default/input/image.php
+++ b/views/default/input/image.php
@@ -1 +1,11 @@
-<input type="image" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<?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/views/default/input/month.php b/views/default/input/month.php
index 4eaf91048..c99b3f34c 100644
--- a/views/default/input/month.php
+++ b/views/default/input/month.php
@@ -1,7 +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 type="month" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/number.php b/views/default/input/number.php
index 908e9382e..ec4938734 100644
--- a/views/default/input/number.php
+++ b/views/default/input/number.php
@@ -1 +1,11 @@
-<input type="number" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<?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/views/default/input/range.php b/views/default/input/range.php
index 8d4d7f13d..235687257 100644
--- a/views/default/input/range.php
+++ b/views/default/input/range.php
@@ -1,10 +1,13 @@
<?php
$defaults = array(
-
+ 'class' => 'elgg-input-range',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'range';
+
?>
-<input type="range" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/search.php b/views/default/input/search.php
index 29adba5fc..becf8a11b 100644
--- a/views/default/input/search.php
+++ b/views/default/input/search.php
@@ -1,10 +1,13 @@
<?php
$defaults = array(
- 'placeholder' => elgg_echo('placeholder:search'),
+ 'class' => 'elgg-input-search',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'search';
+
?>
-<input type="search" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/tel.php b/views/default/input/tel.php
index 329554501..0704344a8 100644
--- a/views/default/input/tel.php
+++ b/views/default/input/tel.php
@@ -1,9 +1,12 @@
<?php
$defaults = array(
- 'placeholder' => elgg_echo('placeholder:tel'),
+ 'class' => 'elgg-input-tel',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'tel';
+
?>
-<input type="tel" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/time.php b/views/default/input/time.php
index 58c8b0928..6bb557266 100644
--- a/views/default/input/time.php
+++ b/views/default/input/time.php
@@ -1,10 +1,13 @@
<?php
$defaults = array(
- 'placeholder' => elgg_echo('placeholder:time'),
+ 'class' => 'elgg-input-time',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'time';
+
?>
-<input type="time" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/url.php b/views/default/input/url.php
index d42d7c056..ed3cd08a2 100644
--- a/views/default/input/url.php
+++ b/views/default/input/url.php
@@ -1,10 +1,13 @@
<?php
$defaults = array(
- 'placeholder' => elgg_echo('placeholder:url'),
+ 'class' => 'elgg-input-url',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'url';
+
?>
-<input type="url" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/week.php b/views/default/input/week.php
index 59cf5d7f1..3d09ba07f 100644
--- a/views/default/input/week.php
+++ b/views/default/input/week.php
@@ -1,10 +1,13 @@
<?php
-$defauts = array(
- 'placeholder' => elgg_echo('placeholder:week'),
+$defaults = array(
+ 'class' => 'elgg-input-week',
);
$vars = array_merge($defaults, $vars);
+
+$vars['type'] = 'week';
+
?>
-<input type="week" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file