From 9ff9d71952db26c06fe2eb1bf98b53340242e524 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 17:46:39 +0000 Subject: Removed html/tag view -- all we really needed was a function to form an attribute string from an array. This is now being used in each input view and there is not so much view nesting going on... --- views/default/html/tag.php | 64 ---------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 views/default/html/tag.php (limited to 'views/default/html/tag.php') diff --git a/views/default/html/tag.php b/views/default/html/tag.php deleted file mode 100644 index 67a7d067c..000000000 --- a/views/default/html/tag.php +++ /dev/null @@ -1,64 +0,0 @@ -$value) { - unset($vars[$key]); -} - -// backwards compatibility code -if (isset($vars['internalname'])) { - //@todo put deprecated notice - $vars['name'] = $vars['internalname']; - unset($vars['internalname']); -} - -if (isset($vars['internalid'])) { - //@todo put deprecated notice - $vars['id'] = $vars['internalid']; - unset($vars['internalid']); -} - -$js = ''; -if (isset($vars['js'])) { - //@todo put deprecated notice - $js = $vars['js']; - unset($vars['js']); -} - -$tag = $vars['tag']; -unset($vars['tag']); - -$body = $vars['body']; -unset($vars['body']); - -//Build the input -$element = array(); - -$element[] = "<$tag"; -foreach ($vars as $attr => $val) { - if ($val === TRUE) { - $element[] = $attr; - } elseif (!empty($val)) { - $val = htmlspecialchars($val); - $element[] = "$attr=\"$val\""; - } -} - -if (!empty($js)) { - $element[] = $js; -} - -if (!isset($body)) { - $element[] = '/'; -} - -echo implode(" ", $element).">"; - -if (isset($body)) { - echo "$body"; -} \ No newline at end of file -- cgit v1.2.3