mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: #2510 - Fix setting of default country on CountryDropdownField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@57764 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
aa1a72ff04
commit
60a24885b8
@ -6,8 +6,11 @@
|
||||
* @subpackage fields-relational
|
||||
*/
|
||||
class CountryDropdownField extends DropdownField {
|
||||
function __construct($name, $title) {
|
||||
parent::__construct($name, $title, Geoip::getCountryDropDown());
|
||||
function __construct($name, $title, $source = null, $value = "") {
|
||||
if(!is_array($source)) {
|
||||
$source = Geoip::getCountryDropDown();
|
||||
}
|
||||
parent::__construct($name, $title, $source);
|
||||
}
|
||||
|
||||
function Field() {
|
||||
|
Loading…
Reference in New Issue
Block a user