aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-14 06:39:03 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-14 06:39:03 +0000
commit8ad07637a42059f28bfeb7bd469869d60b8f44fa (patch)
tree7f0f53f6d8a9b3ce3054a2c8f338c933cf8f74b3 /views/default/input
parentf225bb716d270dcdbb313af5aec48083527d8a3e (diff)
downloadelgg-8ad07637a42059f28bfeb7bd469869d60b8f44fa.tar.gz
elgg-8ad07637a42059f28bfeb7bd469869d60b8f44fa.tar.bz2
Refs #1208: Default input/button to 'button' type (rather than 'submit' type).
git-svn-id: http://code.elgg.org/elgg/trunk@7307 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/button.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/views/default/input/button.php b/views/default/input/button.php
index 63a140524..906e41b4c 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -22,19 +22,18 @@ if (isset($vars['class'])) {
$class = "submit_button";
}
-// defaults to submit button
if (isset($vars['type'])) {
$type = strtolower($vars['type']);
} else {
- $type = 'submit';
+ $type = 'button';
}
switch ($type) {
case 'button' :
- $type='button';
+ $type = 'button';
break;
case 'reset' :
- $type='reset';
+ $type = 'reset';
break;
case 'submit':
default:
@@ -53,8 +52,14 @@ if (isset($vars['src'])) {
$src = "src=\"{$vars['src']}\"";
}
// blank src if trying to access an offsite image.
-if (strpos($src,$CONFIG->wwwroot)===false) {
+if (strpos($src, $CONFIG->wwwroot) === false) {
$src = "";
}
+
+$id = '';
+if (isset($vars['internalid'])) {
+ $id = "id=\"{$vars['internalid']}\"";
+}
+
?>
-<input name="<?php echo $name; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> /> \ No newline at end of file
+<input name="<?php echo $name; ?>" <?php echo $id; ?> type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> /> \ No newline at end of file