<?php
/**
 * Part of Showkase web site management package
 *
 * @package Showkase
 * @author Jack Hardie {@link http://www.jhardie.com}
 * @copyright Copyright (c) 2012, SimpleViewer Inc.
 */
defined('SK_ACCESS')||die('<h1>403: Forbidden</h1>');
$ds = DIRECTORY_SEPARATOR;
require_once "classes{$ds}formfield.php";
 /**
 * Html form input
 *
 * @package Showkase
 */
class TextField extends FormField
{
  
 /**
  * Formats html string
  * Used outside the print/echo context
  *
  * @return string
  */
  public function getHtml(&$tab)
  {
      $tab++;
      $label = $this->getLabel();
      $value = htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8');
      $html = <<<EOD
<div class="control-group">
  {$label}
  <div class="input">
    <input type="text" class="text" name="{$this->name}" id="{$this->id}" tabindex="{$tab}" value="{$value}">
  </div>
</div>
EOD;
      return $html;
  }
}