<?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 ImagesrcField 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="imagesrc" name="{$this->name}" id="{$this->id}" tabindex="{$tab}" value="{$value}" >
      <button type="button" name="{$this->name}" class="imagesrc btn btn-primary" title="Browse image library">
        Browse Library
      </button>
    </div>
  </div>
EOD;
        return $html;
    }
}