@silverstripe.com)
 * 
 * @package forms
 * @subpackage fields-formattedinput
 */
class MoneyField extends FormField {
	
	/**
	 * @var string $_locale
	 */
	protected $_locale;
	
	/**
	 * Limit the currencies
	 * @var array $allowedCurrencies
	 */
	protected $allowedCurrencies;
	
	/**
	 * @var FormField
	 */
	protected $fieldAmount = null;
	
	/**
	 * @var FormField
	 */
	protected $fieldCurrency = null;
	
	public function __construct($name, $title = null, $value = "") {
		// naming with underscores to prevent values from actually being saved somewhere
		$this->fieldAmount = new NumericField("{$name}[Amount]", _t('MoneyField.FIELDLABELAMOUNT', 'Amount'));
		$this->fieldCurrency = $this->FieldCurrency($name);
		
		parent::__construct($name, $title, $value);
	}
	
	/**
	 * @return string
	 */
	public function Field($properties = array()) {
		return "
" .
			"
" . $this->fieldCurrency->SmallFieldHolder() . "
" . 
			"
" . $this->fieldAmount->SmallFieldHolder() . "
" . 
		"