From 756f15a4acb66ea12ce0a4fe193dc57f3e486b0c Mon Sep 17 00:00:00 2001 From: Fred Condo Date: Wed, 24 Apr 2013 09:57:33 -0700 Subject: [PATCH] Restore the EditableCountryDropdownField class Reverts "MINOR Removed the country dropdown field due to the framework has removed the CountryDropdownField" This reverts commit cbe1dce4ff08476a19e4bdea9d12da4e6cd55ad0. Framework has not, in fact, removed CountryDropdownField. This commit restores the EditableCountryDropdownField class. --- .../EditableCountryDropdownField.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 code/model/formfields/EditableCountryDropdownField.php diff --git a/code/model/formfields/EditableCountryDropdownField.php b/code/model/formfields/EditableCountryDropdownField.php new file mode 100644 index 0000000..c0d235e --- /dev/null +++ b/code/model/formfields/EditableCountryDropdownField.php @@ -0,0 +1,28 @@ +Name, $this->Title); + } + + public function getValueFromData($data) { + if(isset($data[$this->Name])) { + + return Geoip::countryCode2name($data[$this->Name]); + } + } + + public function getIcon() { + return 'userforms/images/editabledropdown.png'; + } +} \ No newline at end of file