FEATURE: MoneyField currency dropdown can be made from an associate array like array('NZD'=>'New Zealand Dollor', 'USD'=>"United States Dollor') as well (from r100966)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111550 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-04 04:27:09 +00:00
parent 11b1367c8c
commit 67db4ce22a

View File

@ -55,7 +55,7 @@ class MoneyField extends FormField {
$field = new DropdownField(
"{$this->name}[Currency]",
_t('MoneyField.FIELDLABELCURRENCY', 'Currency'),
array_combine($allowedCurrencies,$allowedCurrencies)
ArrayLib::is_associative($allowedCurrencies)?$allowedCurrencies:array_combine($allowedCurrencies,$allowedCurrencies)
);
} else {
$field = new TextField(