From d46162271a5ca3c3af690173d0abfcd1ab9f69a1 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 16 Oct 2009 21:05:54 +0000 Subject: Standardized views/failsafe/* git-svn-id: http://code.elgg.org/elgg/trunk@3558 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/failsafe/input/button.php | 82 ++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 34 deletions(-) (limited to 'views/failsafe/input/button.php') diff --git a/views/failsafe/input/button.php b/views/failsafe/input/button.php index 0f6fdf6a5..2c36841df 100644 --- a/views/failsafe/input/button.php +++ b/views/failsafe/input/button.php @@ -1,39 +1,53 @@ wwwroot)===false) $src = ""; // blank src if trying to access an offsite image. +$class = $vars['class']; +if (!$class) { + $class = "submit_button"; +} + +if (isset($vars['type'])) { + $type = strtolower($vars['type']); +} else { + $type = 'submit'; +} + +switch ($type) { + case 'button' : + $type='button'; + break; + case 'reset' : + $type='reset'; + break; + case 'submit': + default: + $type = 'submit'; +} + +$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); +$name = $vars['internalname']; +$src = $vars['src']; +// blank src if trying to access an offsite image. +if (strpos($src,$CONFIG->wwwroot)===false) { + $src = ""; +} ?> value="" src="" class="" /> \ No newline at end of file -- cgit v1.2.3