From 8ad07637a42059f28bfeb7bd469869d60b8f44fa Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sun, 14 Nov 2010 06:39:03 +0000 Subject: 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 --- views/default/input/button.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'views/default') 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']}\""; +} + ?> - type="" class="" value="" /> \ No newline at end of file + type="" class="" value="" /> \ No newline at end of file -- cgit v1.2.3