<?php
/*
 * shopping/order/option/type/Text.class.php
 * 
 * CopyRight(C) 2010 Shopformer Development Team. All Right Reserved
 * URL: http://sourceforge.jp/projects/shopformer/
 * 
 * 
 * Mail: m_nakashima@users.sourceforge.jp
 * Auther: Masanori Nakashima
 * Last Update: 2010-06-18
 */
require_once( dirname(dirname(dirname(dirname(__FILE__))))
.DIRECTORY_SEPARATOR.'DaoShoppingOrderOption.class.php' );
class shopping_order_option_type_TextCountCharge extends shopping_DaoShoppingOrderOption {
	/**
	 * Constructor
	 */
	function shopping_order_option_type_TextCountCharge() {
	}
	/**
	 * 入力フォームを表示する抽象メソッド 
	 * @param $request spider_HttpRequestオブジェクトインスタンス参照
	 * @param $value 入力値
	 * @return strings 入力フォームHTML文字列
	 */
	function getInputForm( & $request, $value='', $background=null, $formNameNames=null, $formNameValue=null ) {
		$inputNameName	= 'option_names';
		if( !is_null($formNameNames) || strlen($formNameNames) > 0 ) {
			$inputNameName	= $formNameNames;
		}
		$inputNameValue	= 'option_values';
		if( !is_null($formNameValue) || strlen($formNameValue) > 0 ) {
			$inputNameValue	= $formNameValue;
		}
		$strings	= '<input type="hidden" name="'.$inputNameName.'['.$this->optionNumber.']" value="'.$this->optionName.'" />';
		$strings	.= '<input type="text" name="'.$inputNameValue.'['.$this->optionNumber.']" value="'.htmlspecialchars($value).'" size="'.$this->width.'"';
		if( strlen($background) > 0 ) {
			$strings	.= ' style="background-color:'.$background.';"';
		}
		$strings	.= ' />';
		return $strings;
	}
}
?>